Split string in Powershell

PowerShell strings have a split function that enables the simple splitting of a string into an array of strings based on a delimiter character. The example below splits based on the space character and removes any entries that have no actual content. $FullName = “John Savill ” $Names = $FullName.Split(” “,[StringSplitOptions]’RemoveEmptyEntries’) $Names would contain two …read more →

Difference between where-object and select-object

The two cmdlets perform very different things. Where-object restricts which objects are returned, for example: Get-Process | Where-Object {$_.Name -eq “WmiPrvSE”} Will only return objects whose name is WmiPrvSE. Now compare to Select-Object, e.g. Get-Process | Select-Object -Property Name, ID Returns the name and process ID for every process. You could put these together: Get-Process …read more →

Windows Installer Coordinator

Installation hangs on “Windows Installer Coordinator” When you receive a “Please wait while the application is preparing for the first use” on Citrix / Terminal server while installing an MSI: 1. Open gpedit.msc. 2. Go to Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Application Compatibility. 3. Put policy Turn off Windows Installer RDS Compatibility …read more →

Powershell – Download File