<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Powershell scripting in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Powershell-scripting/m-p/343650#M5358</link>
    <description>&lt;P&gt;Just starting to look at this but any help here is appreciated. &lt;BR /&gt;
A coworker asked me the following:&lt;BR /&gt;
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.&lt;/P&gt;

&lt;P&gt;Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:591 char:62&lt;BR /&gt;
+                                     "POST"          { $xml = Invoke-HTTPPost     ...&lt;BR /&gt;
+                                                              ~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost&lt;/P&gt;

&lt;P&gt;Get-SplunkAuthToken :  [Get-SplunkAuthToken] :: No value returned from Server [servernamehere]&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Authentication\Splunk-Authentication.psm1:127 char:21&lt;BR /&gt;
+     $AuthTokenObject = Get-SplunkAuthToken @GetSplunkAuthTokenParams&lt;BR /&gt;
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-SplunkAuthToken&lt;/P&gt;

&lt;P&gt;Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:579 char:62&lt;BR /&gt;
+                                     "POST"          { $xml = Invoke-HTTPPost     ...&lt;BR /&gt;
+                                                              ~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost&lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 14:17:04 GMT</pubDate>
    <dc:creator>MikeBertelsen</dc:creator>
    <dc:date>2018-03-09T14:17:04Z</dc:date>
    <item>
      <title>Powershell scripting</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Powershell-scripting/m-p/343650#M5358</link>
      <description>&lt;P&gt;Just starting to look at this but any help here is appreciated. &lt;BR /&gt;
A coworker asked me the following:&lt;BR /&gt;
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.&lt;/P&gt;

&lt;P&gt;Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:591 char:62&lt;BR /&gt;
+                                     "POST"          { $xml = Invoke-HTTPPost     ...&lt;BR /&gt;
+                                                              ~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost&lt;/P&gt;

&lt;P&gt;Get-SplunkAuthToken :  [Get-SplunkAuthToken] :: No value returned from Server [servernamehere]&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Authentication\Splunk-Authentication.psm1:127 char:21&lt;BR /&gt;
+     $AuthTokenObject = Get-SplunkAuthToken @GetSplunkAuthTokenParams&lt;BR /&gt;
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-SplunkAuthToken&lt;/P&gt;

&lt;P&gt;Invoke-HTTPPost : Exception calling "GetRequestStream" with "0" argument(s): "The operation has timed out"&lt;BR /&gt;
At C:\Users\marks\Documents\WindowsPowerShell\Modules\Splunk\Splunk-Core\Splunk-Core.psm1:579 char:62&lt;BR /&gt;
+                                     "POST"          { $xml = Invoke-HTTPPost     ...&lt;BR /&gt;
+                                                              ~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException&lt;BR /&gt;
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-HTTPPost&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 14:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Powershell-scripting/m-p/343650#M5358</guid>
      <dc:creator>MikeBertelsen</dc:creator>
      <dc:date>2018-03-09T14:17:04Z</dc:date>
    </item>
  </channel>
</rss>

