Four Ways to Create a Directory with PowerShell

This tutorial shows you for different methods to create a directory with the help of PowerShell. First, open the PowerShell console with administrative privileges. Then use one of the following four ways to create directories. Creating a Directory by using PowerShell So how to create directory a now? Here are 5 create directory cmd variants ... Read more

How to Delete a Folder Using Command Prompt of Windows

Delete Folder in Windows

To delete a folder using the command prompt of Windows, follow this procedure. Open a command prompt (Press the Windows icon key and R to open the run window). Type cmd and hit enter from the keyboard. On a command prompt, enter the following command and hit enter from the keyboard. Syntax rmdir /s <complete ... Read more

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 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 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

How to Get a List of Windows PowerShell Modules that can be Imported

Modules are collections of cmdlets that are stored in the path %WINDIR%\System32\WindowsPowerShell\. Get a List of Windows PowerShell Modules Now execute the following command to display the location of each directory where these modules are stored at your computer: write-host "$PSModulePath" You can get a list of all available modules on your Windows system by ... Read more

How to Set Date and Time Using PowerShell on Windows

PowerShell set Date and Time

To change or adjust the system date and time using PowerShell, use the following steps: Step 1: Log in to your Windows desktop or server with a user that has administrative privileges. Step 2: Open PowerShell, type the following command and then press enter from your keyboard: set-date -date "06/06/2022 18:53" Make sure to change ... Read more