Common Windows Active Directory Powershell scripts
Here are some common Windows Active Directory PowerShell scripts with explanations:
- Get-ADUser: This script retrieves a user object or performs a search to retrieve multiple user objects. You can specify different search criteria such as name, user principal name, etc.
- Set-ADUser: This script modifies the properties of a user object. You can use it to update the name, email address, or password of a user, among other things.
- New-ADUser: This script creates a new user object in Active Directory. You can specify various properties such as the name, password, and email address of the user.
- Remove-ADUser: This script deletes a user object from Active Directory. You can specify the identity of the user object to delete.
- Get-ADGroup: This script retrieves a group object or performs a search to retrieve multiple group objects. You can specify different search criteria such as name, group scope, etc.
- Set-ADGroup: This script modifies the properties of a group object. You can use it to update the name or description of a group, among other things.
- New-ADGroup: This script creates a new group object in Active Directory. You can specify various properties such as the name, group scope, and group type of the group.
- Remove-ADGroup: This script deletes a group object from Active Directory. You can specify the identity of the group object to delete.
- Get-ADComputer: This script retrieves a computer object or performs a search to retrieve multiple computer objects. You can specify different search criteria such as name, operating system, etc.
- Set-ADComputer: This script modifies the properties of a computer object. You can use it to update the name or operating system of a computer, among other things.
- New-ADComputer: This script creates a new computer object in Active Directory. You can specify various properties such as the name, operating system, and domain of the computer.
- Remove-ADComputer: This script deletes a computer object from Active Directory. You can specify the identity of the computer object to delete.