Search found 2 matches

by Vinny vinchenzo
Mon Mar 21, 2022 2:56 pm
Forum: PowerShell
Topic: Difficulty to access array values
Replies: 2
Views: 2082

Difficulty to access array values

Hi, I am querying an API that returns something like this: $InvokeResponse = VariableA : 0 VariableB : 10 records : {@{id=1234; name=Vince1; secretTemplateId=1111}, @{id=5678; name=Vince2; secretTemplateId=2222}} Then I am trying to loop over the ids but powershell does not like it: foreach ($recor...
by Vinny vinchenzo
Wed Sep 22, 2021 3:27 pm
Forum: PowerShell
Topic: Need to pass only NOT NULL Hash Table values
Replies: 3
Views: 4898

Need to pass only NOT NULL Hash Table values

Hi, I need to create a wrapper for a command line executable that accepts 3 optional parameters. To be able to read those parameters, I did add a Param keyword and that works fine: Param( [Parameter(Mandatory=$false)] [string] $SERVER_PROXY, [Parameter(Mandatory=$false)] [string] $SITE_TOKEN, [Param...