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 $src
    Write-Host $dest
}
 
main
  • powershell_examples.1654789867.txt.gz
  • Last modified: 2022/06/09 15:51
  • by mgupton