automatic-variable Questions

3

Problem I am working with Jenkins to deploy PowerShell scripts remotely. As such, I am trying to figure out if there will be problems utilizing $PSScriptRoot over $MyInvocation.MyCommand.Path for ...
Gid asked 10/8, 2017 at 13:32

3

Solved

I am trying to pipe an array of strings to write-host and explicitly use $_ to write those strings: 'foo', 'bar', 'baz' | write-host $_ However, it fails with: The input object cannot be boun...
Vasty asked 13/4, 2019 at 12:37

2

Solved

I'm trying to figure out how I can pass multiple strings as an array to a powershell function. function ArrayCount([string[]] $args) { Write-Host $args.Count } ArrayCount "1" "2" "3" ArrayCount ...
Segregationist asked 12/11, 2019 at 11:55
1

© 2022 - 2024 — McMap. All rights reserved.