LockedHot!Powershell script to clear an Active Directory attribute value for an organization

Author
andy
Member
  • Total Posts : 38
  • Reward points: 0
  • Joined: 2009/06/23 22:06:25
  • Status: offline
2018/10/23 00:47:14 (permalink)

Powershell script to clear an Active Directory attribute value for an organization

Need assistance to have a powershell command to clear a specific attribute value for all users under an organization.. can you please help?
#1

1 Reply Related Threads

    Tahir
    HC Staff
    • Total Posts : 477
    • Reward points: 0
    • Joined: 2008/10/01 00:00:00
    • Status: offline
    Re: Powershell script to clear an Active Directory attribute value for an organization 2018/10/24 01:10:37 (permalink)
    Below is the sample command to clear a DesktopProfile attribute value
     
    For single AD User:
    Get-ADUser -Identity tony | Set-ADUser -Clear desktopProfile
     
    Apply for all users under an OU:
    Get-ADUser -Filter * -SearchBase ‘OU=OrganizationName,DC=lab13,DC=COM' | Set-ADUser -Clear desktopProfile

    Tahir Shah
    www.hostingcontroller.com
    Phone: +1 (647) 799-1000
    Fax: +1(604) 227-0273 
    Contact us: http://portal.hostingcontroller.com
    HC Online Helphttp://help.hostingcontroller.com
    #2
    Jump to: