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 {
 
    Wite-Host "testing..."
    Write-Host $Param1
    Write-Host $Param2
}
 
main
  • powershell_examples.1635264721.txt.gz
  • Last modified: 2021/10/26 16:12
  • by mgupton