Showing archive results for July 2013

Jul 19, 2013
Post comments count0
Post likes count0

Use PowerShell to Create First and Last Names for Test Users

Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to use Windows PowerShell to create first and last names in Active Directory for test users.  Hey, Scripting Guy! I have a test environment set up, and I created a bunch of users in an organizational unit in Active Directory. But I only created the user name—I did not create the firs...

Scripting Guy!Windows PowerShellActive Directory
Jul 18, 2013
Post comments count0
Post likes count0

PowerTip: Find Number Elements in a PowerShell Array

Doctor Scripto

Summary: Easily find the number of elements in a Windows PowerShell array.  How can I find how many elements are in a Windows PowerShell array?  You can find the number of elements in a Windows PowerShell array in the following ways: [array]$a = 1,2,3,4,5 $a.Count $a.Length $a.GetUpperBound(0)

Scripting Guy!Windows PowerShellPowerTip
Jul 18, 2013
Post comments count0
Post likes count0

Use PowerShell to Set AD DS Users’ Display Names

Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to use Windows PowerShell to set the users’ display names in Active Directory Domain Services.  Hey, Scripting Guy! I have a number of user names that were hastily created. I thought at first they were going to be temporary workers, but it seems that temporary is hanging around a lot...

Scripting Guy!Windows PowerShellActive Directory
Jul 17, 2013
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Return Random Computer Names

Doctor Scripto

Summary: Learn how to use Windows PowerShell to return random computer names from Active Directory.  How can I easily obtain random computer names in Active Directory for audit purposes?  Use the Get-ADComputer cmdlet and pipe the results to the Get-Random cmdlet. The following script selects two random computer names ...

Scripting Guy!Windows PowerShellPowerTip
Jul 17, 2013
Post comments count0
Post likes count0

Set Telephone Numbers for All Users in an OU via PowerShell

Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to set office telephone numbers for all users in an organizational unit.  Hey, Scripting Guy! I have a problem. We just moved our offices to a new location, and now the phone numbers stored in Active Directory are wrong. I need to at least update the phone number...

Scripting Guy!Windows PowerShellActive Directory