powershell_examples

This is an old revision of the document!


Powershell Examples

Basic script with parameters

param(
    [Parameter(Mandatory=$true)]  [String]$Param1 = "alpha",
    [Parameter(Mandatory=$true)]  [String]$Param2 = "beta"
)
 
function main {
    Write-Host "testing..."
    Write-Host $Param1
    Write-Host $Param2
}
 
main
  • powershell_examples.1635341807.txt.gz
  • Last modified: 2021/10/27 13:36
  • by mgupton