<?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: Updates missing force install via XDR in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/updates-missing-force-install-via-xdr/m-p/594403#M7050</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/307134"&gt;@tlmarques&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It could be possible by calling the required powershell commands from the Python code supported by the agent.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look and use this example I have created to automatically lock the screen after 10 minutes of inactivity:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import subprocess

# Set the auto screen lock timeout comand, the value in seconds is defined at "-Value"

result = subprocess.run(['powershell.exe', '-command','New-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" -Name "InactivityTimeoutSecs" -Value 10 -PropertyType DWord -Force'], shell=True, capture_output=True, text=True)

# Check if the PowerShell command ran successfully and returns a message
if result.returncode == 0:
    print("Auto screen lock timeout set successfully.")
else:
    print("Error setting auto screen lock timeout:")
    print(result.stderr)&lt;/LI-CODE&gt;
&lt;P&gt;If this post answers your question, please mark it as the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2024 17:51:45 GMT</pubDate>
    <dc:creator>jmazzeo</dc:creator>
    <dc:date>2024-08-08T17:51:45Z</dc:date>
    <item>
      <title>Updates missing force install via XDR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/updates-missing-force-install-via-xdr/m-p/594401#M7049</link>
      <description>&lt;P&gt;anyone know if is possible to run script on &lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;and force windows update installation on machines?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:09:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/updates-missing-force-install-via-xdr/m-p/594401#M7049</guid>
      <dc:creator>tlmarques</dc:creator>
      <dc:date>2024-08-08T17:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updates missing force install via XDR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/updates-missing-force-install-via-xdr/m-p/594403#M7050</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/307134"&gt;@tlmarques&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It could be possible by calling the required powershell commands from the Python code supported by the agent.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look and use this example I have created to automatically lock the screen after 10 minutes of inactivity:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import subprocess

# Set the auto screen lock timeout comand, the value in seconds is defined at "-Value"

result = subprocess.run(['powershell.exe', '-command','New-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" -Name "InactivityTimeoutSecs" -Value 10 -PropertyType DWord -Force'], shell=True, capture_output=True, text=True)

# Check if the PowerShell command ran successfully and returns a message
if result.returncode == 0:
    print("Auto screen lock timeout set successfully.")
else:
    print("Error setting auto screen lock timeout:")
    print(result.stderr)&lt;/LI-CODE&gt;
&lt;P&gt;If this post answers your question, please mark it as the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:51:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/updates-missing-force-install-via-xdr/m-p/594403#M7050</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-08-08T17:51:45Z</dc:date>
    </item>
  </channel>
</rss>

