<?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 Unconventional GP upgrade through XDR action script - works, but could use optimization. in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/unconventional-gp-upgrade-through-xdr-action-script-works-but/m-p/578701#M6199</link>
    <description>&lt;P&gt;I have a script to silently upgrade GlobalProtect clients to 6.2.2 using an msi, while avoiding disconnecting active users and reboots.&amp;nbsp; It's simple and it works, but I looking to improve it by having successful upgrade status or reason for failure reported instead of just getting the success of the script.&amp;nbsp; Also if the agent doesn't upgrade, I'd like it to retry during the script deployment, but maybe that's not possible as long as the script successfully runs on the agent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Why am I not using GlobalProtect to push out upgrade?&amp;nbsp; It's a long story.&amp;nbsp; Ability to have separate agent configs based on user/group broke and I need to be able to isolate testing of the upgrade process to communicate to users ahead of time exactly what to expect.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scenarios:&lt;/P&gt;
&lt;P&gt;Agent on LAN: script runs msi from network drive - gp agent upgrades&lt;/P&gt;
&lt;P&gt;Agent on VPN: script sees agent connected - gp doesn't get upgraded&lt;/P&gt;
&lt;P&gt;Agent not on LAN or VPN but connected to Internet: script doesn't see network drive, gp doesn't get upgraded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All above scenarios would show script was successfully executed.&amp;nbsp; &amp;nbsp;I would like to differentiate the computers that didn't upgrade due to being connected to VPN and those that weren't connected to LAN or VPN from the ones that got successfully upgraded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know I can separately run the get_registry script and put in&amp;nbsp;HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\Version and that will return the values.&amp;nbsp; &amp;nbsp;I tried incorporating that into my script, but couldn't figure it out.&amp;nbsp; &amp;nbsp; Also returning statuses to indicate that agent could not be upgraded due to being connected to VPN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe the action script stays active for 4 days.&amp;nbsp; I was wondering if even though a script ran, but did not upgrade, could it check in again the next day when, for instance, it is not on vpn and can actually install at that time.&amp;nbsp; I'm guessing not, but that would be ideal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script for reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;import wmi&lt;BR /&gt;import os&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;c = wmi.WMI()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;network = c.Win32_NetworkAdapterConfiguration()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for adapter in network:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if adapter.Description == "PANGP Virtual Ethernet Adapter" and not adapter.IPEnabled:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; os.system('msiexec /i "\\\\SERVER\\.......\\GlobalProtect64-6.2.2.msi" /qn /norestart')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 19:51:44 GMT</pubDate>
    <dc:creator>FluffyPancakes</dc:creator>
    <dc:date>2024-02-28T19:51:44Z</dc:date>
    <item>
      <title>Unconventional GP upgrade through XDR action script - works, but could use optimization.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/unconventional-gp-upgrade-through-xdr-action-script-works-but/m-p/578701#M6199</link>
      <description>&lt;P&gt;I have a script to silently upgrade GlobalProtect clients to 6.2.2 using an msi, while avoiding disconnecting active users and reboots.&amp;nbsp; It's simple and it works, but I looking to improve it by having successful upgrade status or reason for failure reported instead of just getting the success of the script.&amp;nbsp; Also if the agent doesn't upgrade, I'd like it to retry during the script deployment, but maybe that's not possible as long as the script successfully runs on the agent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Why am I not using GlobalProtect to push out upgrade?&amp;nbsp; It's a long story.&amp;nbsp; Ability to have separate agent configs based on user/group broke and I need to be able to isolate testing of the upgrade process to communicate to users ahead of time exactly what to expect.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scenarios:&lt;/P&gt;
&lt;P&gt;Agent on LAN: script runs msi from network drive - gp agent upgrades&lt;/P&gt;
&lt;P&gt;Agent on VPN: script sees agent connected - gp doesn't get upgraded&lt;/P&gt;
&lt;P&gt;Agent not on LAN or VPN but connected to Internet: script doesn't see network drive, gp doesn't get upgraded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All above scenarios would show script was successfully executed.&amp;nbsp; &amp;nbsp;I would like to differentiate the computers that didn't upgrade due to being connected to VPN and those that weren't connected to LAN or VPN from the ones that got successfully upgraded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know I can separately run the get_registry script and put in&amp;nbsp;HKEY_LOCAL_MACHINE\SOFTWARE\Palo Alto Networks\GlobalProtect\Version and that will return the values.&amp;nbsp; &amp;nbsp;I tried incorporating that into my script, but couldn't figure it out.&amp;nbsp; &amp;nbsp; Also returning statuses to indicate that agent could not be upgraded due to being connected to VPN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe the action script stays active for 4 days.&amp;nbsp; I was wondering if even though a script ran, but did not upgrade, could it check in again the next day when, for instance, it is not on vpn and can actually install at that time.&amp;nbsp; I'm guessing not, but that would be ideal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script for reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;import wmi&lt;BR /&gt;import os&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;c = wmi.WMI()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;network = c.Win32_NetworkAdapterConfiguration()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for adapter in network:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if adapter.Description == "PANGP Virtual Ethernet Adapter" and not adapter.IPEnabled:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; os.system('msiexec /i "\\\\SERVER\\.......\\GlobalProtect64-6.2.2.msi" /qn /norestart')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 19:51:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/unconventional-gp-upgrade-through-xdr-action-script-works-but/m-p/578701#M6199</guid>
      <dc:creator>FluffyPancakes</dc:creator>
      <dc:date>2024-02-28T19:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unconventional GP upgrade through XDR action script - works, but could use optimization.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/unconventional-gp-upgrade-through-xdr-action-script-works-but/m-p/578980#M6226</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/261785"&gt;@FluffyPancakes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out on LiveCommunity!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="c-scrollbar__hider" role="presentation" data-qa="slack_kit_scrollbar"&gt;
&lt;DIV class="c-scrollbar__child" role="presentation"&gt;
&lt;DIV class="c-virtual_list__scroll_container" tabindex="-1" role="list" data-qa="slack_kit_list" aria-label="Emre Tugriceri (direct message, away)"&gt;
&lt;DIV id="1709213917.991709" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1709213917.991709"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--default"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;Cortex XDR just execute script and wait for output. It&amp;nbsp;&lt;SPAN&gt;does not care what are you doing with that script.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="1709213971.716769" class="c-virtual_list__item" tabindex="-1" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1709213971.716769"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;4 days active because, it waits for agent connection status. If agent is connected script runs and completes.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="c-scrollbar__track" role="presentation"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Mar 2024 08:05:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/unconventional-gp-upgrade-through-xdr-action-script-works-but/m-p/578980#M6226</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-03-01T08:05:13Z</dc:date>
    </item>
  </channel>
</rss>

