Powershell Needful Things put that in your pipeline


Find specific group membership

One of our administrators needed to present a report, which could show a list of users, and whether or not, they belonged to a specific group or groups, which control their browsing privileges.

Doing this manually was an immense task, but obviously using Powershell, it becomes a job you can do while reading your news paper.

The script example is a very basic solution, but it gets the job done. It uses the Quest Active Roles commands in an expression, which displays yet again, the magic of Powershell and how much time it could save you as an administrator, when working with thousands of items this way.

Although this is not groundbreaking stuff, I share this in the hope that it could save someone else some time.

$websense = @{Name="WebSense Group";expression={Get-QADMemberOf -sizelimit 0 -identity $_ | where {($_.Name -like "*Websense*") -or ($_.Name -match "Global Browsing")}}}
(gc .\users.txt) | foreach {Get-QADUser -sizelimit 0 -identity $_} | select Name, $websense | Export-Csv .\websense.csv
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.