Category "powershell"

How can I use pester v5 configuration or container with four standard arguments?

I'm trying to invoke a pester script, moving from pester V4.6.0 to V5.3.1 The V4 arguments I used to use, when invoking pester were: -supplying custom parameter

PowerShell Script to implement ipsec rule

I am troubleshooting an issue in our local IT infrastructure. Some time ago a GPO was pushed that blocked traffic from our IT administration program to our prod

Visual Studio Code Terminal keeps running Python script in Powershell

I recently installed both Python and Visual Studio Code. After taking an intro class I wrote a basic script and ran it in Visual Studio Code. That's when I no

Command to Redis Cluster healthcheck

Is there any windows PowerShell command to check Redis cluster healthcheck running on windows?

Cannot display emojis in Windows Powershell or WSL Linux Terminal using Python

I am trying to print emojis in both Windows Powershell and WSL Linux Terminal using Python3. I have tried using unicode, CLDR names and also installed the emoji

PowerShell script to SSH to Multiple Linux devices and restart/reboot them

I am comfortable with writing single queries. I am new to writing bash scripts trying to automate the daily stuff. I need help on creating a PowerShell or bash

How to make a filename by date with powershell

I'm pretty new to Powershell and would like to output the result of a command to a file name. I try the following within the powershell shell: $a = (Get-Date)

How to fix 'rimraf is not a recognized command' in Windows 10

After creating the .NET Core / React & Redux project template and attempting to start the application, the react compile crashes with rimraf not recognized.

How to modify the output of PowerShell Jobs if they take too long

I have a relatively long/complex script that blindly runs a batch of commands against several devices (as jobs). Once in awhile, a couple of these jobs continu

How to suppress "keyboard-interactive" prompts in plink.exe

I have a PowerShell script that calls plink.exe regularly. Normally, the two output lines about keyboard-interactive prompts are simply annoying. However, when

Windows Power Shell doesn't recognize anything

I am starting the process to try and get my machine to run WSL 2, and I began by following the first step of a tutorial by Microsoft that asks you to run: dism.

Unable to get WindowsUpdateLog in Windows 2016

While trying to run Get-WindowsUpdateLog I get the error below. I come across a blog to copy SymSrv.dll file over to the server. This doesn't make sense as I ha

"No such file or directory" when synchronizing a local file with percent sign to remote directory with WinSCP

I have file with name %253csvg%2fonload=alert(1)%253e.jpg-131x94 I am trying to sync the files to remote server using WinSCP .NET assembly Session.SynchronizeD

Removing Members in Groups in Azure AD Powershell Automatically (App API Permission)

I'm trying to remove members of groups automatically via a PowerShell Script. There's an Azure AD app created, with User.ReadWrite.All (Application) and as User

How to speed up my SUPER SLOW search script

I am building a script to search for $name through a large batch of CSV files. These files can be as big as 67,000 KB. This is my script that I use to search th

How to parse/pipe cmd line output using Powershell to an object

I have an *.exe that outputs this data when I run this PowerShell command: & $myExe list Where $myExe is something like C:\Temp\MyExe.exe and list is an a

When generating a unique username in Active Directory, numbers do not increment correctly

I am updating a script we use to generate new users and update users based on a csv we download from a feed every night. I need to generate a unique username fo

How to pass arguments in command line using dotnet?

the command dotnet myapp.dll -- [4, 3, 2] throws the exception System.FormatException: Input string was not in a correct format. I do not know the syntax. How s

Upload byte array without actually creating a local file to SFTP server using WinSCP .NET assembly?

I need to write a PowerShell script that reads some data and writes it to a file on a remote SFTP location. I'd rather not generate a local file first before i

Updating Path multiple times in the same RUN command

Consider the following Dockerfile. On the last lines, first git is installed, and then something is appended to the path environment variable. FROM mcr.microsof