Answers for "powershell command line parameter variable"

5

parameter powershell

Param (
	[Parameter(Mandatory=$True, Position=1)]
	[string]$String,
    
    [Parameter(Mandatory=$True)]
    [int]$Int,
    
    [switch]$Switch = $false
)
Posted by: Guest on March-02-2020
0

powershell command line variables

write-host "There are a total of $($args.count) arguments"
for ( $i = 0; $i -lt $args.count; $i++ ) {
    write-host "Argument  $i is $($args[$i])"
}
Posted by: Guest on June-24-2020

Code answers related to "powershell command line parameter variable"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language