You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to send an array of Strings. When I send a JS array it reads it as one long string in the powershell script (i.e. it only loops through once in my powershell foreach loop) . I've also tried sending it formatted as a powershell array @()
JS
let users = ["account1", "account2"]
let params = [{name: 'Accounts', value: users}]
ps.addCommand(filePath + 'Enable-ADUser.ps1', params)
return ps.invoke()
I am unable to send an array of Strings. When I send a JS array it reads it as one long string in the powershell script (i.e. it only loops through once in my powershell foreach loop) . I've also tried sending it formatted as a powershell array @()
JS
Powershell
Not sure where I'm going wrong. Are we able to send an array to powershell?
Thank you!
The text was updated successfully, but these errors were encountered: