List users from 3 different Active Directory Groups with PowerShell

Here is a quick sample of Power Shell snippet to list users from 3 different Active Directory groups: Import-Module ActiveDirectory $groups = "AWS-IAM-PCI-Prod-Admin","AWS-IAM-PCI-Prod-Deploy","AWS-IAM-PCI-Prod-Monitoring" foreach($group in $groups){Get-ADGroupMember -Identity $group -Recursive |…

Continue ReadingList users from 3 different Active Directory Groups with PowerShell

Find out the current version of the Active Directory Schema

Quick one liner to find out current version of the Active Directory Schema on your network especially of you have mix of servers. Using dsquery utility: dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope…

Continue ReadingFind out the current version of the Active Directory Schema

Stop opening Server Manager at logon in Windows Server 2012 R2

The Server Manager wizard provides information of installed roles and features in [easyazon_link identifier="1118289420" locale="US" tag="wn0d5-20"] Windows Server 2012 R2 [/easyazon_link]. This Server Manager wizard will be automatically launched at…

Continue ReadingStop opening Server Manager at logon in Windows Server 2012 R2

How to repair corrupted USB storage and reset to defaults

Whenever I connect my USB to PC it says “you need to format the disk in drive before you can use it”. When I try to format, it shows the disk capacity as 662MB which is the Linux image file size and not the original size of 8GB. How do I format the USB drive and start using it like before?

Continue ReadingHow to repair corrupted USB storage and reset to defaults

Remove all Group Membership from Disabled user except Domain User Group in PowerShell

Here is quick PowerShell script to remove ALL Group Membership from Disabled user in Active Directory. We will remove all Group membership from this user except Domain User group. So…

Continue ReadingRemove all Group Membership from Disabled user except Domain User Group in PowerShell

List Direct Reports to Manager in PowerShell

Here is the task for today to use [easyazon_link identifier="1787122042" locale="US" tag="wn0d5-20"] PowerShell [/easyazon_link]. I was asked to find the list of employees under a specific manager. In [easyazon_link identifier="1449361420"…

Continue ReadingList Direct Reports to Manager in PowerShell

Change or Update UPN for users of specific group in Active Directory

Here is a quick almost one liner in [easyazon_link identifier="B07883YKV1" locale="US" tag="wn0d5-20"] PowerShell [/easyazon_link] to update/change UPN for users of specific group in [easyazon_link identifier="1449361420" locale="US" tag="wn0d5-20"]Active Directory [/easyazon_link]. Lets…

Continue ReadingChange or Update UPN for users of specific group in Active Directory

How to install PowerShell on Google Chromebook Linux mode

Here is quick code for installation of PowerShell on Google ChromeBook Pixel when [easyazon_link identifier="1118999878" locale="US" tag="wn0d5-20"] Linux [/easyazon_link] support is turned on: [cc lang="Bash"]sudo apt install curl gnupg apt-transport-https…

Continue ReadingHow to install PowerShell on Google Chromebook Linux mode