Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

This script will Grant usb exception by asking the admin to place the machine name

$
0
0

$machine= Read-Host "what machine would you like to give usb exception too" 

 

Enter-PSSession -ComputerName $machine

cd hklm:

    Set-ItemProperty -Path  SYSTEM\CurrentControlSet\Control\StorageDevicePolicies writeprotect -Value 0

 

 

    "$machine now has usb exception"


Viewing all articles
Browse latest Browse all 6937

Trending Articles