PowerShell: Parameters cheat sheet

Very quick examples of possible PS parameters Function Test-Parameters { [CmdletBinding(SupportsShouldProcess=$True, ConfirmImpact=”High”, DefaultParameterSetName=”Folder”)] Param ( [Parameter(Position=0,HelpMessage=”Some help tip”,Manatory,ParameterSetName=’Set1′)] [string]$Foo, [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$Bar, [ValidateSet(“Allowed1″,”Allowed2”)] $Whatever, [ValidateScript({Test-Path $_ -PathType ‘Container’})] [int]$Make, [ValidateRange(21,65)] [Int]$Age ) Begin{} Process{} End{} }  

Azure: previous deployment from ‘MM/dd/yyyy hh:mm:ss’ is still active

Another helpful Azure error message: New-AzureRmResourceGroupDeployment : 08:46:04 – Resource Microsoft.Resources/deployments ‘linkedTemplate-VM’ failed with message ‘{ “error”: { “code”: “DeploymentActive”, “message”: “Unable to edit or replace deployment ‘linkedTemplate-VM’: previous deployment from ‘6/28/2017 7:45:57 AM’ is still active (expiration time is…