Day: December 4, 2020

PowerShell: connectWinRM Function to Create New-PSSession

This reusable function may be included into PoSh scripts for better connection toward Windows machines…

PowerShell: Install Apps On List of Computers

[string[]]$computers=@( 'SERVER01', 'SERVER02', 'SERVER03' ) [string]$chocoAppName='notepad2' [version]$minVersion='4.2.25.20160422' $results=[hashtable]@{} foreach ($computer in $computers){ $result=invoke-command -computer $computer…

PowerShell: Installing or Including an Application On a Computer or Scripting Session

Sample Usage: PS C:\WINDOWS\system32> includeapp -appName notepadplusplus -appExe notepad++notepadplusplus version 7.91.0.0 already exists.True function includeApp($appName,$appExe=$False,$version){…

PowerShell: Renaming a System File

System files are typically owned by the TrustedInstaller account and protected from deletion or changes.…

PowerShell: Replacing Notepad with Notepad Plus Plus

Update 12/04/2020: there's a simpler solution - install notepad2! choco install notepad2 -y The command…