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


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

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. Creating a Directory by using PowerShell Method 1: Use the new-item command new-item <path of directory suppose c:\dir1> -itemtype directory Method 2: Use ... 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 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

How to Start Multiple Services With the Help of PowerShell

Run multiple PowerShell Commands at once

This short guide will show you how to start multiple services simultaneously with the help of PowerShell. Start Multiple Services or Applications with PowerShell 1. Open PowerShell with administrative privileges. 2. Execute the following command (Suppose when you are required to search all exchange related services and start them, just replace the parameter). Get-Service "*Exchange*" ... Read more

How to View Office 365 User Account Details in PowerShell

PowerShell get-msoluser command

In this article, I'll show you to retrieve Office 365 user account details with the help of PowerShell using get-msoluser. Prerequisites Download and install the following modules. Microsoft Online Service Sign-in Assistant for IT Professionals RTW Windows Azure Active Directory Module for Windows PowerShell (64-bit version) View Office 365 User Account Details in PowerShell - ... Read more