Showing posts with label Powershell. Show all posts
Showing posts with label Powershell. Show all posts

Wednesday, March 20, 2013

Powershell execution of scripts is disabled on this system

Issue:-

First time when you launch PowerShell and try to run any PowerShell scripts file, it will not run and gives the below error. Here I am trying to run a simple ps script “directory.ps1” with Get-Chitditem cmdlet inside it.

"File C:\ZAid\Testing\Script.ps1 cannot be loaded because the execution of scripts is disabled on this system. "


When PowerShell is first installed the default execution policy is “Restricted.” This means PowerShell will not run scripts or configuration files. Here is a list of policy levels:

Monday, April 9, 2012

Delete AD multiple user accounts using PowerShell

Deleting bulk user accounts made easy using Powershell.

We have tested the below script in Windows Server 2008 R2 AD infrastructure.
Users are present in Sales OU as shown below.


Saturday, April 7, 2012

Create AD multiple user accounts using PowerShell

Many times we come across a scenario where we need to create bulk of AD user accounts. But who wants to spend a whole bunch of time for creating users? So we at Deskperts went ahead and made a PowerShell Script that will create users from a CSV file. Hope you find it useful!!!!

We have tested the below script in Windows Server 2008 R2 AD infrastructure.

Azure Policy support for remediating tags for existing resources

Use Azure policy to remediate tags for existing resources. https://azure.microsoft.com/en-us/updates/azure-provides-at-scale-tags-managem...