fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


microsoft:powershell:scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
microsoft:powershell:scripts [2022/01/13 13:28] – [Spezifischen Drucker entfernen] gsysmicrosoft:powershell:scripts [2026/07/12 22:13] (current) gsys
Line 1: Line 1:
 ====== PowerShell Scripts ====== ====== PowerShell Scripts ======
 +<code powershell>
 +Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine
 +Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
 +Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope Process
 +</code>
 +
 +| AllSigned | FIXME |
 +| Default | FIXME |
 +| RemoteSigned | FIXME|
 +| Restricted | FIXME |
 +| Undefined | FIXME |
 +| Unrestricted | FIXME|
  
 ===== Spezifischen Drucker entfernen ====== ===== Spezifischen Drucker entfernen ======
Line 6: Line 18:
 $Printer = Get-Printer -Name "Microsoft XPS Document Writer" $Printer = Get-Printer -Name "Microsoft XPS Document Writer"
 Remove-Printer -InputObject $Printer Remove-Printer -InputObject $Printer
 +</code>
 +
 +===== Compare File Hash ======
 +
 +<code powershell compareHash.ps1>
 +write-host $(If ($fileHash -eq $knownHash) {"hash matches"} Else {"hash doesn't match"})
 </code> </code>
microsoft/powershell/scripts.1642076887.txt.gz · Last modified: (external edit)