PowerShell Script for setting WMI Permissions for User-ID

by npiagentini on ‎12-17-2012 02:00 PM (21,692 Views)


The attached Microsoft script can be used to set the WMI permissions for both Agent-less User-ID and WMI Probing. It is designed to be run from a PowerShell prompt and can be used to set the local WMI settings, or the settings of a remote computer. It could be deployed as a logon script for workstations or run from a central system against various domain controllers.

The following is the syntax for setting local rights:

.\Set-WmiNamespaceSecurity.ps1 root/cimv2 add <user-Account> Enable,RemoteAccess

The following is to modify a remote system:

.\Set-WmiNamespaceSecurity.ps1 root/cimv2 add <user-Account> Enable,RemoteAccess -co <FQDN of DC>

by dbatrankov
on ‎08-16-2017 05:17 AM

<user-Account> should be in format domain\account 

Ignite 2018, Amsterdam, Netherlands
Ask Questions Get Answers Join the Live Community