powershell_examples

This is an old revision of the document!


Powershell Examples

Common Script Structure

param(
    [Parameter(Mandatory=$true)] [String]$src = "alpha",
    [Parameter(Mandatory=$true)] [String]$dest = "beta",
    [Parameter(Mandatory=$false)] [switch]$recurse
)
 
function main {
    Write-Host "$recurse"
    Write-Host $src
    Write-Host $dest
}
 
main
  • powershell_examples.1656176904.txt.gz
  • Last modified: 2022/06/25 17:08
  • by mgupton