Archive

Powershell scripting

MikeBertelsen
Communicator

Just starting to look at this but any help here is appreciated.
A coworker asked me the following:
Mike, I was trying to work on a PowerShell script I wanted to be able to query Splunk. I pulled open one of my old queries that is being utilized now as automated process to start testing and it appears even when I run that known working script I get I believe connection errors.

Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:591 char:62
+ "POST" { $xml = Invoke-HTTPPost ...
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost

Get-SplunkAuthToken : [Get-SplunkAuthToken] :: No value returned from Server [servernamehere]
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Authentication\Splunk-Authentication.psm1:127 char:21
+ $AuthTokenObject = Get-SplunkAuthToken @GetSplunkAuthTokenParams
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-SplunkAuthToken

Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:579 char:62
+ "POST" { $xml = Invoke-HTTPPost ...
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost

0 Karma