How to Fix WinRm Firewall Exception Rule When Enabling PS Remoting

When you are enabling PowerShell remoting using the command Enable-PSRemoting, you may get the following error because your system is connected to the network trough a Wi-Fi connection. PS C:\WINDOWS\system32> winrm quickconfig The following changes must be made: Start the WinRM service. Set the WinRM service type to delayed auto start. Make these changes [y/n]? y ... Read more

How to display dialog box containing Lock, Suspend, Restart, and Shutdown icons from command line in Ubuntu

If you are an Ubuntu user, you might have observed the dialog box that gets displayed when you quickly press and leave the power button. The dialog box contains icons to Lock, Suspend, Restart, and Shutdown the system. Have you ever found yourself wondering how this box can be launched from the command line? Well, ... Read more

How to Install Docker on Windows Without Internet Connection

If you don't have an internet connection on a Windows system, then you can download the Docker file from another (Internet enabled) machine and then copy it to target. Install Docker without Internet Connection Afterward, follow these steps: Execute the following commands to install docker packages: Install-PackageProvider -Name DockerMsftProvider Import-PackageProvider -Name DockerMsftProvider -Force List all Docker ... 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