-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
524014a
commit d018a81
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
# PowerShell-Skript zur Erstellung einer Zulassungsliste der derzeit angeschlossenen USB-Geräte | ||
# PowerShell script to create an allowlist of currently connected USB devices | ||
|
||
# Funktion zur Erstellung der Zulassungsliste | ||
# Function for creating the approval list | ||
function CreateWhitelist { | ||
# Erstellen einer Liste der derzeit angeschlossenen USB-Geräte | ||
# Create a list of currently connected USB devices | ||
$usbDevices = Get-PnpDevice -Class USB | Where-Object { $_.Status -eq "OK" } | ||
|
||
# Speichern der Geräte-IDs in einer Datei | ||
# Saving the device IDs to a file | ||
$usbDevices | ForEach-Object { $_.InstanceId } | Out-File ".\USBWhitelist.txt" | ||
Write-Host "Zulassungsliste erstellt und gespeichert." | ||
Write-Host "Approval list created and saved." | ||
} | ||
|
||
# Erstellung der Zulassungsliste | ||
# Creation of the approval list | ||
CreateWhitelist |