<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RunAs | KC's Blog</title>
	<atom:link href="https://www.kjctech.net/tag/runas/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kjctech.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2023 18:20:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.kjctech.net/wp-content/uploads/2016/12/cropped-KC-Logo.png?fit=32%2C32&#038;ssl=1</url>
	<title>RunAs | KC's Blog</title>
	<link>https://www.kjctech.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">24634607</site>	<item>
		<title>Impersonate Another User in Windows</title>
		<link>https://www.kjctech.net/impersonate-another-user-in-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=impersonate-another-user-in-windows</link>
					<comments>https://www.kjctech.net/impersonate-another-user-in-windows/#respond</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Thu, 17 May 2018 23:23:02 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[RunAs]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=3919</guid>

					<description><![CDATA[<p>I have a folder full of obsolete roaming profile folders that I really want to tidy up. Due to the very restrict folder permissions on these folders, I found it would be a lot faster and easier if I can impersonate an individual user on the server and perform the archive job using RoboCopy command line. The built-in &#8220;RunAs&#8221; seems [&#8230;]</p>
The post <a href="https://www.kjctech.net/impersonate-another-user-in-windows/">Impersonate Another User in Windows</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>I have a folder full of obsolete roaming profile folders that I really want to tidy up. Due to the very restrict folder permissions on these folders, I found it would be a lot faster and easier if I can impersonate an individual user on the server and perform the archive job using RoboCopy command line.</p>



<p>The built-in &#8220;<strong>RunAs</strong>&#8221; seems to be a perfect command line made for the job. Typically, you can execute the command like:</p>



<pre class="wp-block-preformatted">runas /user:username@domainame "command and argument"</pre>



<p>Moreover, it performs even quick with switch /noprofile that tells the command line to not load the user&#8217;s profile.</p>



<p>So, I could use the following command line if I would like to move a roaming profile folder from one server to another server.</p>



<pre class="wp-block-preformatted">runas /noprofile /user:username@domainname "robocopy \\server1\profiles\user1 \\server2\profiles\user1 /s /move"</pre>



<p>If you prefer to open a command prompt window so you can interactive with the server, use &#8220;cmd&#8221; as the command.</p>



<pre class="wp-block-preformatted">runas /noprofile /user:username@domainname "cmd"</pre>



<p>Type in the password for that user, a new command prompt window opens up with &#8220;cmd (running as so-on-so)&#8221; on the title line.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="640" height="328" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=640%2C328&#038;ssl=1" alt="" class="wp-image-3921" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?w=845&amp;ssl=1 845w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=250%2C128&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=450%2C231&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=768%2C394&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=600%2C307&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=700%2C359&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=520%2C266&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=360%2C184&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image.png?resize=100%2C51&amp;ssl=1 100w" sizes="(max-width: 640px) 100vw, 640px" />
	<figcaption>Open a new command prompt window as another user</figcaption>
</figure>



<p>If you would like to open a PowerShell window, use &#8220;powershell&#8221; as the command instead.</p>



<pre class="wp-block-preformatted">runas /noprofile /user:username@domainname "powershell"</pre>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" width="640" height="279" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=640%2C279&#038;ssl=1" alt="" class="wp-image-3922" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?w=910&amp;ssl=1 910w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=250%2C109&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=450%2C196&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=768%2C335&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=600%2C262&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=700%2C305&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=520%2C227&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=360%2C157&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/05/image-1.png?resize=100%2C44&amp;ssl=1 100w" sizes="(max-width: 640px) 100vw, 640px" />
	<figcaption>Open a new PowerShell console as another user</figcaption>
</figure>



<p></p>The post <a href="https://www.kjctech.net/impersonate-another-user-in-windows/">Impersonate Another User in Windows</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/impersonate-another-user-in-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3919</post-id>	</item>
	</channel>
</rss>
