I am looking at enabling certain features of mailing lists depending on how many users there are. The following script generates this report with group recursion.

By default it outputs to grouplisting.csv in the same folder you run the script from.

Comment and share

Setting permissions for PRTG to monitor WMI on systems is a bit of a chore. The script below sets the appropriate permissions for a lot of the WMI sensors in PRTG.

Run by using script.ps1 -Username "domain\user"

Please note that this needs ntrights.exe, which is included in the Windows Server 2003 Resource Kit

I may look in to making this a group policy script in the future but for starters this will do. It saves around 3-5 minutes of time per server, depending how fast you can click.

Comment and share

I manage security for service accounts through access with least privilege. Monitoring with PRTG however means that most of the WMI sensors need local Administrator access, which I’m not too happy about. One such situation is if you need to access the state of running services. To get around this, use the script below.

One example:

sddlset.ps1 -Username "domain\monitoring" -Service w3svc -Rights Read -Computer webserver

This will then resolve the SID for the user, add it to the SDDL with necessary permissions and then spit out the result. To allow any access at all you will first need to give the user permissions on scmanager, so run sddlset.ps1 -Username "domain\monitoring" -Service scmanager -Rights Read -Computer webserver.

Edit 12/02/2015: Added help function to script, added ability to perform remotely.

Comment and share

Jacob Ludriks

author.bio


author.job