Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 589845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:27:59+00:00 2026-05-13T15:27:59+00:00

In a Windows Server 2003 R2 environment, using Powershell v2.0, how would one duplicate

  • 0

In a Windows Server 2003 R2 environment, using Powershell v2.0, how would one duplicate the functionality of Set-QADUser to update user properties in Active Directory, like their phone number and title?

The trick here being, I would like to do this without depending on Set-QADUser and I do not have the option to use the Server 2008’s commandlets, yet.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:27:59+00:00Added an answer on May 13, 2026 at 3:27 pm

    Piecing things together from around the internet, I came up with this…

    function Get-ADUser( [string]$samid=$env:username){
         $searcher=New-Object DirectoryServices.DirectorySearcher
         $searcher.Filter="(&(objectcategory=person)(objectclass=user)(sAMAccountname=$samid))"
         $user=$searcher.FindOne()
          if ($user -ne $null ){
              $user.getdirectoryentry()
         }
    }
    
    $user = Get-ADUser 'UserName'
    
    # Output all properties
    $user.psbase.properties
    
    # Change some properties
    $user.title = 'New Title'
    $user.telephoneNumber = '5555551212'
    $user.SetInfo()
    
    # Output the results
    $user.title
    $user.telephoneNumber
    

    More Information

    • Using PowerShell to work with ADSI to manage an Active Directory environment
    • SelfADSI : The ADSI Scripting Tutorial / The LDAP Scripting Tutorial
    • IADsUser Interface
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Windows Server 2003 in a multi-user environment (via Remote Desktop, using it as
Our production environment runs 3 32-Bit Java 6 JVMs on each Windows 2003 server.
I'm using IIS 6 on Windows Server 2003. The vision is to create a
I have a development environment set up in Windows using WAMP. The production environment
I am using SharePoint Server 2007 Enterprise with Windows Server 2003 R2 Enterprise. I
Our current environment has TFS on a single server installation: Windows Server 2003 Standard
Environment: MS Windows 2003 Server R2 SP2 Server is a member of domain IIS
For some reason OpenCover is not covering tests using moles on Windows Server 2003
I want to set up a Subversion server installation on Windows Server 2003 64-bit
Environment: Windows Server 2003 R2 Enterprise 64bit, SP2 .NET framework is supposedly installed (2.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.