fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


microsoft:powershell:scripts

PowerShell Scripts

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope Process
AllSigned FIXME
Default FIXME
RemoteSigned FIXME
Restricted FIXME
Undefined FIXME
Unrestricted FIXME

Spezifischen Drucker entfernen

deletePrinter.ps1
$Printer = Get-Printer -Name "Microsoft XPS Document Writer"
Remove-Printer -InputObject $Printer

Compare File Hash

compareHash.ps1
write-host $(If ($fileHash -eq $knownHash) {"hash matches"} Else {"hash doesn't match"})
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.  More information about cookies 
microsoft/powershell/scripts.txt · Last modified: by gsys