powerBTremover
powerBTremover copied to clipboard
An Error
I've tried your code, but it returns an error: **Get-PnpDevice : The term 'Get-PnpDevice' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:14 char:2
-
Get-PnpDevice -class Bluetooth |
-
~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (Get-PnpDevice:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException**
I assume the code has to verify if the function exists
weird; I never saw this error... are you sure you're using powershell?
Can you give more details about the system? Windows version, powershell version, and the results of this command Get-ExecutionPolicy -list
?
I think the module where "Get-PnpDevice" is located just not installed in my system
Windows 8.1 Name Value
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.19170
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
Scope ExecutionPolicy
MachinePolicy Undefined UserPolicy Undefined Process Undefined CurrentUser Undefined LocalMachine RemoteSigned
ah, yes; PnpDevice is new in Windows 10. I wasn't aware of this. https://docs.microsoft.com/en-us/powershell/module/pnpdevice/ There does seem to be an alternative which you could look into and perhaps send a pull-request 😎: https://community.spiceworks.com/topic/2137123-get-pnpdevice-not-working-in-powershell