Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main() {
- [CmdletBinding()]
- param(
- [Parameter(Mandatory = $true)]
- [string]$Name,
- [Parameter(Mandatory = $true)]
- [string]$CsrPath
- )
- Test-Func $Name $CsrPath
- }
- function Test-Func($name, $path) {
- Write-Host $name
- Write-Host $path
- }
- main
- pwsh> powershell .\paramTest.ps1 -Name "myname" -CsrPath "this/isa/path"
- cmdlet main at command pipeline position 1
- Supply values for the following parameters:
- Name: whyisitprompting?
- CsrPath: theparametershavebeensupplied
- whyisitprompting?
- theparametershavebeensupplied
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement