I'm working on a script that automates the process of disabling multiple Devices in Windows 10. This is my attempt:
Get-PnpDevice something | Disable-PnpDevice
That code asks the user to enter y or n to confirm the process of disabling the device.
How to bypass the confirmation prompt to make the script full automatic?
*I always run the script as Administrator.
If the script uses PowerShell cmdlets, you can specify -Confirm:$false to suppress the prompt.
Get-PnpDevice something | Disable-PnpDevice -Confirm:$false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With