Category "powershell"

Powershell GUI auto generate buttons with functions

TLDR: How can I make a generated variable, and then call that variable later within a Add_click. I am sure some kind of serialization of each Object/button I ma

Retrieve Outlook info account from multi profile

I am working on an Outlook inventory powershel script (see also powershell calculated properties for multiple values) This code work great, but only with the d

How to enable "Allow Azure services and resources to access this server" through PowerShell (Azure CLI)?

After creating a new Azure SQL server using az sql server create, how can I enable the following options through PowerShell(Azure CLI)?

How to format output of Export-Excel in order to get colored header in PowerShell?

The code below is working fine to export data, but I need the header / first row to have custom background and text colors. I would like the header to be filled

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