<?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 Re: Why does Splunk only run my PowerShell script once after reloading the deployment server? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/652344#M27331</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using both interval and schedule but the script only runs on splunk restart or after reloading the deployment server. Any suggestions ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jul 2023 09:31:52 GMT</pubDate>
    <dc:creator>SudarshanChakra</dc:creator>
    <dc:date>2023-07-28T09:31:52Z</dc:date>
    <item>
      <title>Why does Splunk only run my PowerShell script once after reloading the deployment server?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/217658#M8126</link>
      <description>&lt;P&gt;I'm a new Splunk user. &lt;/P&gt;

&lt;P&gt;I created a new Powershell script and i don't know why Splunk runs it only once after reloading the Deployment Server&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My input file:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[powershell://dq]
script = . "$SplunkHome\etc\apps\wins_inputs\local\dq.ps1"
source = dq
sourcetype = Powershell:dq
interval = 10
index = powershell
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Powershell script:&lt;BR /&gt;
&lt;STRONG&gt;dq.ps1&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$computer         = $ENV:Computername
$instance         = "_total"

@("\\$Computer\PhysicalDisk(*)\Current Disk Queue Length",
  "\\$Computer\PhysicalDisk(*)\Avg. Disk Queue Length",
  "\\$Computer\PhysicalDisk(*)\Avg. Disk Read Queue Length",
  "\\$Computer\PhysicalDisk(*)\Avg. Disk Write Queue Length") |% {
    (Get-Counter $_.replace("*",$instance)).CounterSamples } |
    Select-Object Path,CookedValue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you have any ideas why?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 13:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/217658#M8126</guid>
      <dc:creator>wstefanczyk</dc:creator>
      <dc:date>2015-11-03T13:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk only run my PowerShell script once after reloading the deployment server?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/217659#M8127</link>
      <description>&lt;P&gt;I found resolutions &lt;/P&gt;

&lt;P&gt;i used schedule not interval &lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 13:50:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/217659#M8127</guid>
      <dc:creator>wstefanczyk</dc:creator>
      <dc:date>2015-11-05T13:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk only run my PowerShell script once after reloading the deployment server?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/652344#M27331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using both interval and schedule but the script only runs on splunk restart or after reloading the deployment server. Any suggestions ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 09:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Why-does-Splunk-only-run-my-PowerShell-script-once-after/m-p/652344#M27331</guid>
      <dc:creator>SudarshanChakra</dc:creator>
      <dc:date>2023-07-28T09:31:52Z</dc:date>
    </item>
  </channel>
</rss>

