How to Get all Active Directory Users Created in the Last 24 Hours using PowerShell

You may require in some cases to check an active directory for newly created users so you can send them an email. You may also require to get newly added users for auditing or security purposes. You can get the active directory users created in last 24 hours by using this script. Feel free to change it for ... Read more

How to Execute PowerShell Scripts Without Pop-Up Window

PowerShell scripts are hard to run without any kind of popup. Without using the small workaround that I will show you here, it may even be impossible. Even if you specify the -WindowStyle Hidden switch - this will only result in the PowerShell window blinking up for a split second and disappearing afterward. You can ... Read more

How to Create NIC Teaming With PowerShell

NIC Teaming with PowerShell

This short guide shows you step-by-step on how to create NIC teaming with Windows PowerShell. Step 1. Open PowerShell with elevated privileges Step 2. Execute the following command, new-NetLBFOTeam [TEAMNAME] “[NIC1]”, “[NIC2]” [TEAMNAME] the name of team of network adapters. [NIC1] the name of first NIC adapter. [NIC2] the name of second NIC adapter. Example: ... Read more

How to Shutdown or Reboot Debian 11

Shutdown and Reboot on Debian

Since Debian 10, the Debian Linux distribution uses systemd to control starting and stopping of services, and Systemd also controls the whole boot and shutdown process of the operating system. The consequence of switching from init.d to Systemd is that some commands to stop or restart Debian like 'shutdown -h now' or 'reboot' do not ... Read more

How to Comment Out Code in PowerShell Script

PowerShell Code Commenting

This guide gives you an overview of code commenting options in PowerShell. Just like any other programming language, you can comment out code in a PowerShell script for documentation purposes. Single-line comments in PowerShell To comment out a single line, put '#' in the beginning: Multiline Comments in PowerShell To comment out multiple lines, put ... Read more

[Solved] Verification of prerequisites for Domain Controller promotion failed.

You may get the following error while promoting a machine to a Windows domain controller. Below is the complete error message with its solution. The Error Message: Verification of prerequisites for Domain Controller promotion failed. The local Administrator account becomes the domain Administrator account when you create a new domain. The new domain cannot be ... Read more