Hey guys,
I'm trying to implement a GPO that will prevent all USB Mass Storage devices from being used on domain systems, except for ones that are specifically allowed.
The specific GPOs are "Allow installation of devices that match any of these device IDs" and "prevent installation of devices not described by other policies" under
computer config>admin templates>system>device installation>restrictions
The problem is that if a device was installed prior the the implementation of the GPO, the GPO won't block it and the user can still use it.
To solve this, I need to uninstall both present and non-present USB Mass Storage Devices from the system. I found that going through device manager manually will work (with a little manipulation to get nonpresent devices to show up), but it isn't practical for large scale deployment.
Is there a way to create a script using powershell or regular CMD commands that will uninstall these devices in the same manner that device manager does (on Windows 7 systems)?
I've tried devcon.exe, but it doesn't remove nonpresent devices. I've also tried pnputil.exe, but that doesn't work in the way I want either.
Any help would be appreciated, and I can provide more info if necessary.
Thanks
I'm trying to implement a GPO that will prevent all USB Mass Storage devices from being used on domain systems, except for ones that are specifically allowed.
The specific GPOs are "Allow installation of devices that match any of these device IDs" and "prevent installation of devices not described by other policies" under
computer config>admin templates>system>device installation>restrictions
The problem is that if a device was installed prior the the implementation of the GPO, the GPO won't block it and the user can still use it.
To solve this, I need to uninstall both present and non-present USB Mass Storage Devices from the system. I found that going through device manager manually will work (with a little manipulation to get nonpresent devices to show up), but it isn't practical for large scale deployment.
Is there a way to create a script using powershell or regular CMD commands that will uninstall these devices in the same manner that device manager does (on Windows 7 systems)?
I've tried devcon.exe, but it doesn't remove nonpresent devices. I've also tried pnputil.exe, but that doesn't work in the way I want either.
Any help would be appreciated, and I can provide more info if necessary.
Thanks