powershell_examples

This is an old revision of the document!


Powershell Examples

Basic script with parameters

param(
    [Parameter(Mandatory=$true)]  [String]$src = "alpha",
    [Parameter(Mandatory=$true)]  [String]$dest = "beta",
    [Parameter(Mandatory=$false)] [switch]$recurse
)
 
function main {
    Write-Host "testing..."
    Write-Host $Param1
    Write-Host $Param2
}
 
main
  • powershell_examples.1652467249.txt.gz
  • Last modified: 2022/05/13 18:40
  • by mgupton