Replace a character with new line
Powershell ver 4. Windows 7
I wanted to replace , with new lines in a text file. I tried below script
(Get-Content C:\Test\test.txt).Replace(',','`n...
4 years ago
Import-CSV add data Export
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...
4 years ago
PowerShell exit() kills shell and ISE
So I've written a series of functions and inserted them into a PS Module (.psm1). One of which is a simple ErrorAndExit function that writes a message...
4 years ago
Powershell Create a New Windows 10 VM
When creating a new style VM in azure via powershell i always use this to specify the image
Set-AzureRmVMSourceImage -VM $VirtualMachine -PublisherNa...
4 years ago
Remove XML Node
I have an XML file which contains a <Notes> node that I wish to remove.
<APPOrganisationUnits>
<APPOrganisationUnitsRow num="1">
...
4 years ago
DrawString with outline in image
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 ...
4 years ago
Powershell Math CSV
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...
4 years ago
Count specific strings with wildcard
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...
4 years ago
Usage of | in PowerShell regex
I'm trying to split some text using PowerShell, and I'm doing a little experimenting with regex, and I would like to know exactly what the "|" charact...
4 years ago
Window Size in Powershell
I'm trying to set size of powershell window using a powershell script. The code I'm using is
$pshost = Get-Host
$psWindow = $pshost.UI.RawUI
$newSi...
4 years ago