<?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: Running as targetusername in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401069#M79634</link>
    <description>&lt;P&gt;Hi @Kaizen101 Cyber​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked this link here can help, it seems a question similar to your problem and some tips on how to follow even using autoit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://community.cyberark.com/s/feed/0D55000005wsKqnCAE&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 01:40:22 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2021-06-15T01:40:22Z</dc:date>
    <item>
      <title>Running as targetusername</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401068#M79633</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to launch powershell as targetusername.  This PS session will server as interactive session to manage AD domain. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the setup. &lt;/P&gt;&lt;P&gt;Preveileged user/Targetusername = ADMUSER1&lt;/P&gt;&lt;P&gt;Global Const $CLIENT_EXECUTABLE = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe" ;&lt;/P&gt;&lt;P&gt;$ConnectionClientPID = RunAs($TargetUsername, $TargetDomain, $TargetPassword,2, $CLIENT_EXECUTABLE, "", @SW_SHOWMAXIMIZED) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All fine, am able to launch powershell session. But this session is launched as shadow user ($env:username gives shadow username).  May be this is all expected behavior. However shadow user will not have any permission to manage AD. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question is, how to start powershell session as targetusername instead of shadow user? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help/insights appreciated. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 17:11:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401068#M79633</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-06-14T17:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running as targetusername</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401069#M79634</link>
      <description>&lt;P&gt;Hi @Kaizen101 Cyber​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked this link here can help, it seems a question similar to your problem and some tips on how to follow even using autoit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://community.cyberark.com/s/feed/0D55000005wsKqnCAE&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 01:40:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401069#M79634</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-06-15T01:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Running as targetusername</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401070#M79635</link>
      <description>&lt;P&gt;Thanks for the reply. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get it working with changing logon_flag to 0 with RunAs command. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 15:45:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/running-as-targetusername/m-p/1401070#M79635</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-06-16T15:45:28Z</dc:date>
    </item>
  </channel>
</rss>

