Add and Remove Computers from Groups Using PowerShell

These two scripts will add and remove a domain-joined computer to and from, respectively, a domain group. It’s much quicker than typing out the whole cmdlet string each time you need it. Script One: Add a computer to a group. Usage: Add_ComputerToGroup <ComputerName> <GroupName> # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Filename : Add_ComputerToGroup.ps1 # Purpose : Adds a computer object to an Active Directory group. The group # […]

Read Me 3 Comments

PowerShell to Add a Workstation to a User’s Log On To Property

It’s easy enough to use ADUC or ADAC to change the list of computers that a user account is authorized to logon to, but sometimes (like, whenever possible!) you need to use PowerShell. Let’s start by seeing what workstations the user is allowed to logon to now… PS C:\> Get-ADUser jay.test -Properties LogonWorkstations | Format-List Name, LogonWorkstations Name : Jay Test LogonWorkstations : testpc This tells […]

Read Me 20 Comments

3 Steps to Get Control of Your Local Admin Account Passwords

A few years ago, Microsoft removed the ability to store passwords in Group Policy Objects using the cPassword method that Active Directory domain administrators had been using for over a decade because it was too easy to extract the password from the GPO files on the domain controller. LAPS provides a way to securely set and retrieve a random password for local administrator accounts on […]

Read Me Leave comment

Troubleshooting a Recurring Account Lockout

If you haven’t had to deal with a mysterious, recurring account lockout, then you haven’t been on the job very long. Almost all Active Directory installations include a Group Policy Object specifying basic account security options such as password length and account lockout thresholds. These settings are essential for adequate data security, but they can become a real pain when a user keeps getting locked […]

Read Me 2 Comments

Two Ways to Add Multiple Users or Contacts to a Distribution Group

Say you just created a large number of new Mail Contacts or you just created a new Distribution Group and you need to add the new contacts or a large number of users to the new group. There are multiple ways to do this. I’ll show you two of them that are useful in two different scenarios. Method One: If all of the objects are […]

Read Me 1 Comment

PowerShell Script for Automating Personnel Changes

I just finished coding a PowerShell script designed to automate changes to Active Directory, Exchange, and Lync accounts based on input from a human resources database. With resources continually getting thinner, I’m hoping this allows the help desk to focus on more important tasks, like the software, hardware, and training issues of thousands of end users. As I’ve pointed out elsewhere, I’m not a programmer; I’m […]

Read Me 1 Comment

Adding an Employee ID Number to Active Directory

The Active Directory database contains two fields that can be used to store an employee ID number: EmployeeID EmployeeNumber Neither field is used for anything currently, and neither one shows up in Active Directory Users & Computers or Active Directory Administrative Center by default. ADUC can be modified to display one or both of the two available fields (See here for example), but I don’t […]

Read Me Leave comment