Category Archives: Active Directory

Powershell Script for Day-to-Day Active Directory Operations

Hi fellow scripters, I’m pretty sure this handy script will help system admins to make a day-to-day AD operation super easy. You can quickly jump into the screenshots to get an overview idea. Note that Powershell module for AD is … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Set Any Attribute of AD users by using PowerShell Script

Updated Post: In version 1.2 of this script, there is no limitation that prevents you from setting the SamAccountName. And since the SamAccountName now becomes a modifiable attribute, to identify the existing user, you need to use the Identity in … Continue reading

Posted in Active Directory, Powershell | Tagged , | Leave a comment

Lockup Domain User in Specific Computer and Escalate Permissions

Sometimes, you will need to give some domain users (may be the desktop support) Network Configuration Operators role or even Local Administrator permissions on specific client machines so that they can fix something with the elevated permissions.  You can do … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Updated v2.1: Create Users in New AD Domain with Old Users’ Domain Info

It is the updated version [v2.1] of the script that will create users in nested OU. If you do not know how to use this script, you can see here.I made some update changes so users ‘Names’ do not need … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Create Users in New AD Domain with Old Users’ Domain Info

It has been nearly 2 years that I wrote the script to create new AD users with the automatic nested OU creation. The original idea is to create the users from the csv file in which AD users properties are … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Active Directory Recycle Bin: Restore Deleted Objects or Wipe Off your Bin ?

Active Directory Recycle Bin is available from Server 2008R2 but it is disabled by default and it is one of the most useful feature for system admins in that he can restore any directory objects (user/computer or system accounts) that … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Find which users stay with the oldest passwords in Workgroup/Domain Computers

Updated: As of Feb 2022, I have fixed/updated the script so that it runs faster in workgroup computers. The changes as marked in the Changed Log section of the script. Moreover, you can run the script with -WriteVerbose  switch to … Continue reading

Posted in Active Directory, Powershell, Windows | Leave a comment

Script to Join Active Directory Domain with Local user Profile migration

Writing a long, quality script can be both a tiresome and interesting task in terms of its look and feel. It’s been quite a while since I last wrote a substantial script, as I’ve mostly been occupied with small utility … Continue reading

Posted in Active Directory, Powershell | 1 Comment

Powershell: Find AD Users’ Logon History with their Logged on Computers

One of the daily system admin task is to check the user login history throughout the domain. It becomes quite a tough task if you have to go through thousands of event logs to find the correct security events of … Continue reading

Posted in Active Directory, Powershell | 3 Comments

How to Digitally Sign the Powershell Scripts with Microsoft CA in Domain – A step-by-step Guide – Part 4

Go to >> Part-1:Install ADCS service and configure Code Signing Certificate Template Go to >> Part-2: Request the certificate to sign the script by user1Go to >> Part-3: Configure GPO to allow only signed scripts and add user1’s certificate to … Continue reading

Posted in Active Directory, Group Policy, Powershell | Leave a comment