Configure rights on WMI for monitoring

If you have PRTG and want to monitor thru wmi i´ve put together a guide based on two scripts (not created by me) what you need to do….

  1. You need an service-account in your domain, not with domain-admin-rights, only a domain user.
  2. You need two scripts (se later in blogpost) to add service-account to two local groups on the windows server and to add the service-account to have read-rights in wmi.
  3. When you run the scripts you need to be a admin-user on the server/servers you want to add the service-account.

You need both scripts från Niklas Åkerlund to automate the “adding” of service-account to local group and wmi-namespace.

The way to use the scripts…

You can use it with a script (se below) or you can use it by one-liner, your choice…

One-liners…

Add user to wmi root

Remove user from wmi root

Add user to local groups

Remove user from local groups

Script

This script require a txt-fil with the servers you what to add the serviceaccount to local groups and wmi root.

 

The first script did i found at Niklas Åkerlunds site https://vniklas.djungeln.se.

The second script did i found at Niklas Åkerlunds site https://vniklas.djungeln.se.

 

Add a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.