Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Remote Server Administration Tools (RSAT) is a set of tools that allows IT administrators to manage Windows Server roles and features from a Windows client machine. One of the key components of RSAT is the Active Directory PowerShell module, which provides a powerful way to manage Active Directory (AD) environments using PowerShell. This article will guide you through the process of installing RSAT and using the AD PowerShell module to perform common administrative tasks.
Windows 10 Version 1809 and Later:
Windows 10 Version 1803 and Earlier:
Once RSAT is installed, you can start using the Active Directory module for PowerShell. Here are some examples of how to perform common tasks:
Before using any AD cmdlets, you need to import the module:
Import-Module ActiveDirectory
To find a user by their username:
Get-ADUser -Identity johndoe
To create a new user in a specific Organizational Unit (OU):
New-ADUser -Name "Jane Doe" -GivenName "Jane" -Surname "Doe" -SamAccountName "janedoe" -UserPrincipalName "janedoe@example.com" -Path "OU=Users,DC=example,DC=com" -AccountPassword (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force) -Enabled $true
To add a user to a group:
Add-ADGroupMember -Identity "Sales Team" -Members "janedoe"
To remove a user from a group:
Remove-ADGroupMember -Identity "Sales Team" -Members "janedoe" -Confirm:$false
To delete a user:
Remove-ADUser -Identity "janedoe" -Confirm:$false
Using RSAT-AD-PowerShell provides a flexible and efficient way to manage Active Directory environments directly from a Windows client machine. With these tools, administrators can automate repetitive tasks, manage users and groups, and perform complex queries with ease.