Changing one field in a CSV file fails using pipes

PowerShell
I need to modify one (1) field in a CSV file. I can do it with separate commands, but the CSV file may be large (GiB+). My understanding is that Impor...
2 years ago

DrawString with outline in image

PowerShell
How I can draw outlined string? For example: solid color of string white, border is black. Which method I must use to get this effect? Maybe somebody ...
2 years ago

Powershell Math CSV

PowerShell
Very little out there about this subject so over to the experts. Say I import a csv into powershell with three columns A, B and Result I wish to di...
2 years ago

Count specific strings with wildcard

PowerShell
How can I count specific strings in a text file with PowerShell? (I know how I can count normal specific strings) My plan is to count domain accounts...
2 years ago

Get a list of users who are not part of ANY group in the active directory

PowerShell
On the internet as well as SO, I can see solutions for finding out all the users in AD or users who are not part of some particular group/groups. But ...
2 years ago

While loop continuously looping comparing times

PowerShell
$time = Get-Date -DisplayHint Time $addTime = Read-Host -Prompt "How many minutes until computer turns off?" $addTimeConvert = [timespan]::FromMinute...
2 years ago

Remove XML Node

PowerShell
I have an XML file which contains a <Notes> node that I wish to remove. <APPOrganisationUnits> <APPOrganisationUnitsRow num="1"> ...
2 years ago

Can I make powershell tab complete show me all options, rather than picking a specific one?

PowerShell
In Powershell, if I type: install-<tab> Powershell tab completion will complete with a single command that starts with install- Install-Pack...
2 years ago

Zabbix script timeout

PowerShell
I'm trying to run powershell script for cleaning disk on agent from Zabbix. Seems that script is running too long and instead response I got error. p...
2 years ago

Import-CSV add data Export

PowerShell
I'm having a heck of a time trying to import a CSV and run a Invoke-WebRequest to get data to add to a new Column.. $username = "Username" $password...
2 years ago

Restricting Powershell Commands by Version

PowerShell
I'm writing a Powershell script (on a Win10 machine) that needs to be backward-compatible all the way to Win7 machines - which shipped with Powershell...
2 years ago

GCE Windows Instance not running startup scripts

PowerShell
I have been trying to apply my startup scripts to new Windows instances on Google Compute Engine as described here, however when I check the instances...
2 years ago

Is there a shorthand for the IF statement in PowerShell?

PowerShell
In bash, I often did things like: [ -z "${someEnvVar}" ] && someEnvVar="default value" Instead of creating a full-fledge if statement: if ...
2 years ago

Powershell

PowerShell
5 months ago

Replace in Powershell

PowerShell
I am trying to print out Microsoft update hot fix URLs and change them $link=Get-MSHotfix|Where-Object {$_.Installedon -gt ((Get-Date).Adddays(-2...
2 years ago

Powershell Array to comma separated string with Quotes

PowerShell
I have an array that I need to output to a comma separated string but I also need quotes "". Here is what I have. $myArray = "file1.csv","file2.csv" ...
2 years ago

Upload file to SFTP using PowerShell

PowerShell
We were asked to set up an automated upload from one of our servers to an SFTP site. There will be a file that is exported from a database to a filer ...
2 years ago

powershell- mv file problems when moving file back in path

PowerShell
I am a programming newbie so please stick with me. I am completing Zed Shaw's Learn Python the Hard Way and unfortunately am stuck on a concept in the...
2 years ago

Parse string in PowerShell to create output using variables

Powershell
I want to create little script that takes particular type of string and uses it in a way I can process things easily %1g.%s which basically means 1 ...
2 years ago

How to get Azure PowerShell modules versions listing running in a Azure Function?

Powershell
I have created a Timer Trigger Azure Function using PowerShell as the programming langauge. I want to know what are the Azure PowerShell modules and ...
2 years ago