Saturday, 30 May 2020

How to Add Logon Workstation in Active Directory PowerShell Command.


How to Add Logon Workstation in Active DirectoryPowerShell Command.


# Add Bulk LogonWorkstation

$Users = (Get-ADUser -Identity pri10 -Properties LogonWorkstations)
ForEach($User in $Users)
{
$User.LogonWorkstations +=",test1,test2,test3"
Set-ADUser -Instance $User
}

#Check User
Get-ADUser pri10 –Properties LogonWorkstations





1 comment: