Category "powershell"

Add the result of a Powershell Start-Process to a file instead of replacing it with -RedirectStandardOutput

I use the following command in Powershell to convert files in the background but would like to log the results all in one file. Now the -RedirectStandardOutput

Powershell WPF checkbox binding

I have a MenuItem Checkbox in my main window as well as in another two windows: <MenuItem x:Name = 'FileMenu' Header = '_File'> <MenuItem x

Set-Clipboard only remembering the last value when called in rapid succession

I am trying to create a powershell snippet that will copy the first column of a multi-line piped input to clipboard. The intended usage is: kubectl get pods | c

Trying to export tickets/incidents from SCSM to csv file using powershell

I am trying to do a simple ticket/incident file export using PowerShell. All of our tickets go into the Service manager 2019 Console. What I am trying to do is

How to copy connection security firewall rules,SSL,TLS from one azure DB for mysql to another azure DB for my sql server using powershell

I have restored Azure Database for MySQL single server using powershell script below. Now, post restore the DB I had to copy all the firewall rules and other se

Why is Winver showing another Version than Powershell?

Hello Guys! Why is Winver showing me Windows Version 21H2 but Powershell Command 2009? Get-ComputerInfo | select WindowsProductName, WindowsVersion Info: With

How to get a specific value from a link? Powershell

let's imagine I have a link - https://chromedriver.storage.googleapis.com/LATEST_RELEASE where I can get the latest Chrome release version. I need to retrieve t

Issue with variable in REST API powershell

Background : The REST API request works correctly when I remove the variable $Description and put a string in line 11 . If I leave the variable then it doesn't

Powershell - Script to determine dawn/dusk and run exe

I am working on a Powershell script to adjust configs of security cameras at dusk and dawn (you'd think the vendor would have a scheduling function...). What i

How to get PowerShell to play nice with classes in different files?

I am a student trying to complete an assignment in Java. I use VS Code to write, but I use PowerShell to compile and run the code to ensure compatibility outsid

How to add a symbol in a middle of a file name in PS

I have modified several thousand files with a various things requested by the owners. Now, I need to add one final thing and I am not 100% on how to do it. Scen

Quickest way to do a [adsisearcher] and store in a hashtable or dictionary collection list

I am using [adsisearcher] to grab AD User info because it's way faster than get-aduser. I am also trying to figure out how to add it into a hashtable or diction

Why should I avoid using the increase assignment operator (+=) to create a collection

The increase assignment operator (+=) is often used in [PowerShell] questions and answers at the StackOverflow site to construct a collection objects, e.g.: $C

find User in a list of servers PowerShell

I have a list of servers where I have to find a specific user 'adtuser', and if it is part of the admin group in each server, and output a text file. For the mo

How do I amend this PS script to move files into the correct folders?

My current PS script is: $loc = "C:\Users\USER\Desktop\New folder1" $files = Get-ChildItem -Path $loc for ($i=0; $i -lt $files.Count; $i++) { $outfile = $file

Combine PowerShell Defender outlets into a combined CSV file for monitoring

We cancelled our antivirus software (Kaspersky Anti-Virus, duh) and depend on the Windows Defender in the meantime. We won’t be getting any SIEM server to

Filter out all occurrences of given properties from json object

I'm using PowerShell to extract data from an API call, update it and then pass it back to the API. What I would like to know is whether or not there is a simple

Powershell script to create folder for groups with extensionAttribute1 set

Hi I want to write a powershell scrip that creates a folder for groups in a specific OU where I have set the extensionAttribute1. Get-ADGroup -filter * -Search

How to update all Azure Powershell Az modules?

The Azure Powershell Az module comes with an assortment of modules such as Az.Accounts, Az.Aks, etc. Is it possible to update all these Az.* modules at once?

Create unique variables in a loop powershell/Jenkins

I am trying save urls created from an array into unique variables created in a loop in a Jenkins freestyle project. I need to use these variables in the next st