Skip to content

Commit

Permalink
Update CreateWhitelist.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
LizenzFass78851 authored Sep 8, 2024
1 parent 524014a commit d018a81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DIY USB Whitelisting/CreateWhitelist.ps1
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

0 comments on commit d018a81

Please sign in to comment.