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

PowerShell: How to Create an AD User in a Specific OU

You can create a Windows Active Directory (AD) user in a specific OU by using the -path parameter in 'New-ADuser' PowerShell command. The following example will create a user in the 'students' OU of the 'pel.com' Active Directory domain. New-ADUser -Name “Karim Buzdar" -GivenName Karim -Surname Buzdar -SamAccountName kbuzdar -UserPrincipalName kbuzdar@pel.com -path "OU=students, DC=pel, DC=com

How to Change Your IP Address in Windows Using PowerShell

Set IP address with PowerShell

You may know how to change the IP address via the GUI. It's pretty simple. Just go to Control Panel > Network and Internet, select the IPv4 properties and change the IP address. The whole process takes about a minute. But what if you have to do this on multiple systems and repeat all these ... Read more

Windows Powershell – “Running scripts is disabled on this system”

PowerShell

Powershell scripts can be run on any Windows server or desktop as long as they are run from the ISE by pushing the green play button. As soon as you want to run it from the cmd or the desktop file you'll get this error: script1.ps1 cannot be loaded because running scripts is disabled on ... Read more

How to Create Multiple Hyper-V Virtual Machines Using PowerShell

Hyper-V PowerShell

Creating multiple Hyper-V virtual machines using Hyper-V manager is not a quick method. The quickest and time-saving method is to create them via Windows PowerShell. This tutorial has been written to show you how to create three Hyper-V virtual machines with a PowerShell script. Create Multiple Hyper-V Virtual Machines Using PowerShell Step 1. Open notepad editor ... Read more

Save List of Services to a File using PowerShell in Windows 10

List services using PowerShell

Microsoft Windows services allow running long-running applications in the background. When the computer is booted, the services start automatically and continue running until the computer is turned off, but you can also pause and disable the service. The Windows Services application lists all services, including those that are running and those that are stopped. If ... Read more

How to Find Out Specifications of Server Using PowerShell

Get Server specs using PowerShell

When you are running a Windows server core version and you need to find out the specs of your server then this tutorial will show you how to do that with a small PowerShell script. Get Server Details with PowerShell Step 1. Open PowerShell with elevated privileges. Step 2. Execute the following two commands (as ... Read more

How to Read a File using PowerShell

If you are working as an admin on Windows Core Server and want to check the contents of a file, you can execute the following command: get-content C:\testfile.txt This command will display the contents of the file using PowerShell. To save the contents in a variable, you can execute: $FileContent = get-content C:\testfile.txt To read the ... Read more