With this PowerShell script you can check if a device is NOT a member of a specific group. A colleague and I created this script because our AD computers should be a member of 1 out of 3 AD groups. If the device is not member of one of these groups certain group policy’s wont be loaded and some thing won’t work properly. With the results of this script we know that devices have to be added to a AD group to function properly.
PowerShell
Use the Run Scripts feature in MECM (SCCM) to deploy PowerShell scripts
Run Scripts feature in MECM (SCCM) in allows you to do the following things:
- Create and edit PowerShell scripts for use with Configuration Manager.
- Manage script usage through roles and security scopes.
- Run scripts on collections or individual managed devices.
- Get Realtime script results from client devices.
- Monitor script execution and view reporting results directly after deploying your script.
PowerShell Active Directory Module on Windows 10
The PowerShell active directory module allows you to do the following things:
- Manage and automate standard domain-related tasks
- Check domain user Active Directory attributes and group memberships on the users workstation, if installed on users workstation (described in this post)