Powershell Execution Policies Part II

While working with Allsigned Execution Policy, we need to have all scripts digitally signed, Otherwise Script execution will fail, with error mentioned in below Screen shot. PS C:\> Get-ExecutionPolicy AllSigned PS C:\> & '.\HashTables and Array.ps1' & : File C:\HashTables and Array.ps1 cannot be loPowershell Execution Policies Part IIaded. The fileC:\HashTables and Array.ps1 is not … Continue reading Powershell Execution Policies Part II

Advertisements

Powershell Execution Policies Part I

Details About PS Execution Policies is available at : Help about_Execution_Policies Windows PowerShell execution policies let you determine the conditions under which Windows PowerShell loads configuration files and runs scripts. You can set an execution policy for the local computer, for the current user, or for a particular session. You can also use a Group … Continue reading Powershell Execution Policies Part I

How to Identify CMDLET’S based on Parameter

Get-Command is your primary tool when you need to find a command to achieve something.  You can search for verbs /  nouns as shown below: # find all cmdlets/functions that can rename things Get-Command -Verb Rename # find all cmdlets/functions that can deal with Eventlogs Get-Command -Noun Eventlog Beginning in PowerShell 3.0, Get-Command can also … Continue reading How to Identify CMDLET’S based on Parameter

Powershell Help System Part IV : About Help Topics

Applies To: Windows PowerShell 2.0, Windows PowerShell 3.0, Windows PowerShell 4.0, Windows PowerShell 5.0 PowerShell has a collection of about_ files. It's a pity that these trees-of-wisdom stay in the shadows of the help for Verb-Noun cmdlets. The purpose of this page is to alert you to the interesting information in these lesser known about_Topic … Continue reading Powershell Help System Part IV : About Help Topics

Powershell Help System Part III

Types of Parameters in Powershell Parameter Sets: Mandatory Parameters: If the -<parameter_name> <parameter_value> both are not enclosed in square bracket, then that parameter is called as mandatory parameter. E.g. -DisplayName <String[]> Optional Parameters: If the -<parameter_name> <parameter_value> both are enclosed in square bracket, then that parameter is called as Optional parameter. E.g. [-ComputerName <String[]>] Parameter … Continue reading Powershell Help System Part III