<?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: Check GlobalProtect VPN users with PowerShell GUI in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202792#M59802</link>
    <description>&lt;P&gt;Are you running PowerShell version 4 or higher? You can check my running "$psversiontable.PSVersion" in PowerShell.&lt;/P&gt;&lt;P&gt;You would also need Microsoft .NET Framework. Not sure on version, but it works with 4.6.01590.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 15:03:12 GMT</pubDate>
    <dc:creator>molander</dc:creator>
    <dc:date>2018-02-28T15:03:12Z</dc:date>
    <item>
      <title>Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/187699#M57075</link>
      <description>&lt;P&gt;I wrote a simple PowerShell GUI script that can check for GlobalProtectVPN users connected currently, or at a past date.&lt;/P&gt;&lt;P&gt;It uses the&amp;nbsp;Rest API to grab the information. Not sure if anyone would find it useful.&lt;/P&gt;&lt;P&gt;Here is the Github link:&amp;nbsp;&lt;A title="PaltoShell" href="https://github.com/marcusit/PaltoShell" target="_self"&gt;https://github.com/marcusit/PaltoShell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paltoshell" style="width: 585px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/12509i39166F8B71E5FCEB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="paltoshell" alt="paltoshell" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 14:50:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/187699#M57075</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2017-11-17T14:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202683#M59770</link>
      <description>&lt;P&gt;Thank you for building this. I get an error after I try and genereate the API key 'The remote name could not be resolved'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I treid both the hostname and IP for the variable in the script but still get this same error. Any ideas on what I may be missing? I do get prompted for authentication, could it be an authentication issue?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:28:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202683#M59770</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-02-28T01:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202718#M59777</link>
      <description>&lt;P&gt;I noticed that I had left a static variable in the function to generate a new API key (line 82).&lt;/P&gt;&lt;P&gt;I updated the code on GitHub, so if you download the script again it should work for you now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The authentication comes from the script itself, it stores the credentials in a variable that it then passess to the firewall to be able to generate the API key.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:01:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202718#M59777</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-02-28T13:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202780#M59793</link>
      <description>&lt;P&gt;Thanks for the quick update. Now I seem to be getting -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Exception calling "DownloadString" with "1" argument(s): "The underlying connection was closed: An unexpected error occurred on a send."
+   [xml]$get_api_key = $KeyClient.DownloadString($key_url)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:30:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202780#M59793</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-02-28T14:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202792#M59802</link>
      <description>&lt;P&gt;Are you running PowerShell version 4 or higher? You can check my running "$psversiontable.PSVersion" in PowerShell.&lt;/P&gt;&lt;P&gt;You would also need Microsoft .NET Framework. Not sure on version, but it works with 4.6.01590.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:03:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202792#M59802</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-02-28T15:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202832#M59819</link>
      <description>&lt;P&gt;Yes. Version 5 and .NET 4.6&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 17:43:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202832#M59819</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-02-28T17:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202849#M59822</link>
      <description>&lt;P&gt;To me this sounds like the TLS version does not mat or the server/client where you run the script does not trust the firewall certificate. As far as I know by default powershell only connects to trusted certs and I am sure that by default TLS1.0 (and only 1.0) is used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By adding this line you can force TLS1.2:&lt;/P&gt;&lt;PRE&gt;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 18:45:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202849#M59822</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2018-02-28T18:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202866#M59824</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/16592"&gt;@Remo&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;To me this sounds like the TLS version does not mat or the server/client where you run the script does not trust the firewall certificate. As far as I know by default powershell only connects to trusted certs and I am sure that by default TLS1.0 (and only 1.0) is used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By adding this line you can force TLS1.2:&lt;/P&gt;&lt;PRE&gt;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This might be correct. You can check for cert errors by going to the firewall GUI and see if you receive a cert warning.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can do some testing by just running this code snippet:&lt;/P&gt;&lt;PRE&gt;  $fw_hostname = "Your firweall hostname or IP here"
  $pass = Get-Credential -Credential $env:userdomain\$env:username
  $plainpass = $pass.GetNetworkCredential().Password
  $key_url = "https://"+$fw_hostname+"/api/?type=keygen&amp;amp;user="+$env:username+"&amp;amp;password="+$plainpass
  $KeyClient = New-Object System.Net.WebClient
  $KeyClient.DownloadString($key_url)&lt;/PRE&gt;&lt;P&gt;Be sure to change the first line. You should get text output similar to below:&lt;/P&gt;&lt;P&gt;&amp;lt;response status = 'success'&amp;gt;&amp;lt;result&amp;gt;&amp;lt;key&amp;gt;YOUR&amp;nbsp;API KEY&amp;lt;/key&amp;gt;&amp;lt;/result&amp;gt;&amp;lt;/response&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally you can test it in a browser too, to make sure you are able to generate an API key:&lt;/P&gt;&lt;P&gt;https://&amp;lt;FIREWALL HOSTNAME OR IP&amp;gt;/api/?type=keygen&amp;amp;user=&amp;lt;YOUR FW USERNAME&amp;gt;&amp;amp;password=&amp;lt;YOUR FW PASSWORD&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 19:02:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202866#M59824</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-02-28T19:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202869#M59826</link>
      <description>&lt;P&gt;I really apprecaite all of the help. It looks like the TLS fix worked and am now able to generate the API key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i get this when i try and query the users. I am assuming this is a permission thing -&lt;/P&gt;&lt;PRE&gt;Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (403) Forbidden."
At C:\WINDOWS\System32\WindowsPowerShell\PaltoShell-GUI.ps1:121 char:5
+     [xml]$global:result = $WebClient.DownloadString($query_url)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 19:16:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202869#M59826</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-02-28T19:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202874#M59828</link>
      <description>&lt;P&gt;You might not have the correct API permissions on the firewall. I have not had a chance to pinpoint exactly what permissions are needed as I have superuser rights, and no lower account to test with.&lt;/P&gt;&lt;P&gt;You can create custom admin roles and grant API permissions under Device &amp;gt; Admin Roles. You would then tie this role to your administrative account.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 19:27:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202874#M59828</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-02-28T19:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202879#M59832</link>
      <description>&lt;P&gt;I seem to be able to a query with just the "Operational Request" API right (Device &amp;gt; Admin Roles &amp;gt; &amp;lt;custom role&amp;gt; &amp;gt; "XML API" tab). I can't guarantee that more permissions will not be needed.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 20:09:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/202879#M59832</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-02-28T20:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203048#M59863</link>
      <description>&lt;P&gt;Able to get it up and running thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that the tool will only query a specific day - is it possible to select a date and see all users connected from that date until now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: enter the date 2/1/18 and see all users that connected to GP from then until now with date/time stamps associated? Similar to what you see when you view the Monitor logs on the firewall, but jsut with the username and timestamp?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 15:32:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203048#M59863</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-03-01T15:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203055#M59864</link>
      <description>&lt;P&gt;Try using the "all time" option, and save the results which will create a spreadsheet that you can filter by connection date. I use that myself for reporting on VPN users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I might be able to add that feature in if I get some free cycles.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 15:53:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203055#M59864</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-03-01T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203067#M59866</link>
      <description>&lt;P&gt;Thats odd - I dont have an All Time option similar to your original screenshot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.PNG" style="width: 585px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/14045i14204F3453A9226D/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="11.PNG" alt="11.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:23:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203067#M59866</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-03-01T16:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203069#M59867</link>
      <description>&lt;P&gt;I had added that feature when I took the screenshot but did not actually push it to the git repo.&lt;/P&gt;&lt;P&gt;If you re-download the script the feature will be in. Everything else should be the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/marcusit/PaltoShell" target="_blank"&gt;https://github.com/marcusit/PaltoShell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:35:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203069#M59867</guid>
      <dc:creator>molander</dc:creator>
      <dc:date>2018-03-01T16:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Check GlobalProtect VPN users with PowerShell GUI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203172#M59881</link>
      <description>&lt;P&gt;Everything appears to be working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for all of your help, and building this tool.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 21:59:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/check-globalprotect-vpn-users-with-powershell-gui/m-p/203172#M59881</guid>
      <dc:creator>IanRiley</dc:creator>
      <dc:date>2018-03-01T21:59:12Z</dc:date>
    </item>
  </channel>
</rss>

