Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Use RSAT-AD-PowerShell to Manage Active Directory on Windows

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.

Installing RSAT on Windows

  1. Windows 10 Version 1809 and Later:

    • Open Settings and go to Apps.
    • Click on Optional Features.
    • Click on Add a feature.
    • Search for RSAT: Active Directory Domain Services and Lightweight Directory Tools and install it.
  2. Windows 10 Version 1803 and Earlier:

Using RSAT-AD-PowerShell

Once RSAT is installed, you can start using the Active Directory module for PowerShell. Here are some examples of how to perform common tasks:

Example 1: Import the Active Directory Module

Before using any AD cmdlets, you need to import the module:

Import-Module ActiveDirectory

Example 2: Find a User in Active Directory

To find a user by their username:

Get-ADUser -Identity johndoe

Example 3: Create a New User in Active Directory

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

Example 4: Add a User to a Group

To add a user to a group:

Add-ADGroupMember -Identity "Sales Team" -Members "janedoe"

Example 5: Remove a User from a Group

To remove a user from a group:

Remove-ADGroupMember -Identity "Sales Team" -Members "janedoe" -Confirm:$false

Example 6: Delete a User from Active Directory

To delete a user:

Remove-ADUser -Identity "janedoe" -Confirm:$false

Conclusion

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.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.