ServiceNow module working over pwsh Linux #166
Replies: 2 comments 1 reply
-
UPDATE: After reboot the Linux box where testing this, I reduce the errors to be (2) then I get the answer now (Please note that initially, there was not answer just (3) errors posted above) InvalidOperation: /root/.local/share/powershell/Modules/ServiceNow/3.1.2/Public/Get-ServiceNowRecord.ps1:198 InvalidOperation: /root/.local/share/powershell/Modules/ServiceNow/3.1.2/Private/Invoke-ServiceNowRestMethod.ps1:81 |
Beta Was this translation helpful? Give feedback.
-
This was a typo, Config instead of config, Linux and it's darn case sensitivity :). Fixed in 3.1.3. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Just wonder if any of you guys have got this amazing module working over PowerShell for Linux, I was able to install it however, when try to use it, I get errors that I do not get under Windows OS instance of PowerShell.
ie:
InvalidOperation: /root/.local/share/powershell/Modules/ServiceNow/3.1.2/Public/Get-ServiceNowRecord.ps1:198
Line |
198 | … re-Object { $.Name.ToLower() -eq $Table.ToLower() -or $.ClassName.T …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: /root/.local/share/powershell/Modules/ServiceNow/3.1.2/Private/Invoke-ServiceNowRestMethod.ps1:81
Line |
81 | … re-Object { $.Name.ToLower() -eq $Table.ToLower() -or $.ClassName.T …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
Exception: /root/.local/share/powershell/Modules/ServiceNow/3.1.2/Public/New-ServiceNowQuery.ps1:156
Line |
156 | … throw ('Operator ''{0}'' is not valid' -f $thisFilter[1]) …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Operator '-eq' is not valid
when trying this one:
$filter = @('cat_item', '-eq','eeec211f0f1006007fbd317ce1050e5e')
Get-ServiceNowRecord -Table sc_cat_item -Filter $filter
NOTE: ServiceNow session was done prior run above.
Thanks in advance.
Juan Fernando Esparza
Beta Was this translation helpful? Give feedback.
All reactions