How to Configure an IP Address Using PowerShell on Windows

If you are coming from Linux to Windows and you are used to working on the shell, then the following PowerShell commands might be the right ones for you. Get an IP Address Configuration You can use the following command to check the IP address configuration of your computer. It works the same way as ipconfig ... Read more

How to Set Up an Active Directory on Windows Server 2016 Using PowerShell

In this tutorial, I will explain how to install an active directory on Windows Core Server 2016 using a few PowerShell commands. If you have already configured an AD Domain Service before, you may be aware that there are the following two high-level steps: Installing Active Domain itself. Promoting the server as domain controller. Install ... Read more

How to Check if a User or Group Exists in AD using PowerShell

If you want to check the existence of any user or group in Windows Active Directory, use the following PowerShell script. PowerShell: Check if AD User or Group Exists Step 1. Open PowerShell with elevated privileges. Step 2. Execute the following script: $userobj = Get-ADUser -LDAPFilter "(SAMAccountName=$username)" $vlanobj = Get-ADGroup -LDAPFilter "(SAMAccountName=$vlangroupname)" if ($userobj -eq ... Read more

How to Prevent Users from Shutting Down the Domain Joined Client Computers

Domain users are by default allowed to shutdown, restart, or put the domain-joined client computers to sleep. However, you can use a group policy to prevent them from shutting down or restarting the client computers. Following are step by step instructions written for this purpose. Prevent Users from Shutting Down their Computer Step 1. Open Group ... Read more

How to Hide Specific OU in Active Directory Users and Computers

When you open an active directory users and computers console, you will see some of the following containers or OUs. These are the available OUs or container types: Builtin Computers Domain Controllers ForeignSecurityPrincipals Managed Service Accounts Users Show all OU in Active Directory Console But these are not the only containers or organizational units in ... Read more

How to Migrate Print Services from Server 2012 to Server 2016

These instructions describe how to migrate print services from Windows Server 2012 R2 to Windows Server 2016. Windows Server 2016 has built-in migration wizard. Install Print Services on Server 2016 Step 1: Open the server manager. Click on the Add Roles and Features wizard. Step 2: Click on Next. Step 3: Choose Role-based or feature-based installation ... Read more

samAccountName Vs userPrincipalName

In this article, I am going to explain the difference between a samAccountName and a userPrincipalName which are often used in an Active Directory context. samAccountName It was used with an earlier version of windows (pre-windows 2000). User login name is in the format of DomainName\testUser. It should be less than 20 characters. It should be ... Read more