PowerShell – RegEx

I have 2 lines that look like: Microsoft Outlook Note|46,647 Plain Text,360 ​ I want it to look like: Microsoft Outlook Note|46,647 Plain Text|360 ​ Right now, I only have a sequence of replaces that get me to where I am right now. $importCsv = (Get-Content “foobartest.csv”) -replace ‘,”‘,’|’ -replace ‘,’,” -replace ‘”‘,” ​ Currently […]

Running into remote IP address script changing errors

I am working on a script to change a large number of systems (mostly windows 7, making net-ip unavailable) moving to a new location by one octet of their IP address. I currently have as follows $computer = Read-Host “Enter Computer name” $GetIp = Test-Connection -ComputerName $computer -Count 1 $MakeIp = $GetIp.IPV4Address.IPAddressToString $MakeNewIp = $MakeIp.Split(‘.’) […]

DDM vol 1.2: Declarative DevOps

Background I used to work on the DevOps pipeline for microsoft.com and recently presented a talk called “Delete Your Codebase” at Microsoft’s internal SRE con about how thoughtful idiomatic PowerShell techniques enabled us to reduce our code volume by 95%, while adding maintainability and support for many common DevOps features. This talk has been adapted […]