Activedirectory

From Piszczynski
Revision as of 17:25, 8 June 2021 by piszczynski>Aleks (→‎Active Directory)

Active Directory

Handy PowerShell script to add AD group members from one group to another:

Add-ADGroupMember -Identity 'New Group' -Members (Get-ADGroupMember -Identity 'Old Group' -Recursive)

Reset password in powershell

  • $pw = Read-Host "password" -AsSecureString
    • Set-ADAccountPassword <username> -Reset -NewPassword $pw