<?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>SurlyJake &#187; psexec</title>
	<atom:link href="http://www.surlyjake.com/tag/psexec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.surlyjake.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Dec 2011 15:28:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pstools: Access Denied in a Domain Environment</title>
		<link>http://www.surlyjake.com/2010/09/pstools-access-denied-in-a-domain-environment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pstools-access-denied-in-a-domain-environment</link>
		<comments>http://www.surlyjake.com/2010/09/pstools-access-denied-in-a-domain-environment/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 19:53:10 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[psexec]]></category>
		<category><![CDATA[pstools]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=669</guid>
		<description><![CDATA[After upgrading to a windows 7 VM at work, I was having trouble getting pstools commands to authenticate on remote machines. After much trial and error, I realized some curious behaviour with psexec. Obviously, when connecting to a remote machine, I would try to use the &#8216;-u&#8217; switch to specify my administrative account, but would always [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to a <a href="http://www.surlyjake.com/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with windows">windows</a> 7 VM at work, I was having trouble getting <a href="http://www.surlyjake.com/tag/pstools/" class="st_tag internal_tag" rel="tag" title="Posts tagged with pstools">pstools</a> commands to authenticate on remote machines. After much trial and error, I realized some curious behaviour with <a href="http://www.surlyjake.com/tag/psexec/" class="st_tag internal_tag" rel="tag" title="Posts tagged with psexec">psexec</a>. Obviously, when connecting to a remote machine, I would try to use the &#8216;-u&#8217; switch to specify my administrative account, but would always get &#8216;access is denied&#8217;. Of course, all of the normal things should be checked: simple sharing turned off, $ADMIN share working&#8230; you know&#8230;</p>
<p>The issue was apparently that if I log into my workstation as a non-administrative user, but try to issue pstools commands as an administrator,  it fails because Microsoft wants me to log into my workstation and work logged with my domain admin account.</p>
<p>Take a look at this example using psexec:<br />
On windows 7, running &#8216;cmd&#8217; as your non-admin user, if you type in the command:</p>
<pre><code>c:\Program Files (x86)\PsTools&gt;psexec -u domain\domainadmin \\targetmachine cmd

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:
Could not start PsExec service on targetmachine:
Access is denied.</code></pre>
<p>If you:</p>
<ol>
<li>Hit start</li>
<li>Type &#8220;cmd&#8221;</li>
<li>Hold down &#8216;shift&#8217; and right-click on the &#8216;cmd&#8217; in the start menu</li>
<li>Select &#8216;run as different user&#8217;.</li>
<li>Type in your administrative credentials. Use the same ones you will use in the psexec command.</li>
</ol>
<p>Now you should have your command line window open. If you run the same command as earlier:</p>
<pre><code>c:\Program Files (x86)\PsTools&gt;psexec -u domain\domainadmin \\targetmachine cmd

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Windows\system32&gt;</code></pre>
<p>Now you&#8217;re in!</p>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2010/09/pstools-access-denied-in-a-domain-environment/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2010/09/pstools-access-denied-in-a-domain-environment/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Remotely change power options in XP</title>
		<link>http://www.surlyjake.com/2009/01/remotely-change-power-options-in-xp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remotely-change-power-options-in-xp</link>
		<comments>http://www.surlyjake.com/2009/01/remotely-change-power-options-in-xp/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 22:35:21 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[psexec]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=222</guid>
		<description><![CDATA[First of all, get the pstools and set them up. then run psexec \\[workstation name] powercfg /query Field Description Value ----------------- ----- Name Home/Office Desk Numerical ID 0 Turn off monitor (AC) After 20 mins Turn off monitor (DC) After 5 mins Turn off hard disks (AC) After 60 mins Turn off hard disks (DC) [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, get the <a href="http://www.surlyjake.com/tag/pstools/" class="st_tag internal_tag" rel="tag" title="Posts tagged with pstools">pstools</a> and set them up. then run</p>
<pre><code><a href="http://www.surlyjake.com/tag/psexec/" class="st_tag internal_tag" rel="tag" title="Posts tagged with psexec">psexec</a> \\[workstation name] powercfg /query
Field Description          Value
-----------------          -----
Name                       Home/Office Desk
Numerical ID               0
Turn off monitor (AC)      After 20 mins
Turn off monitor (DC)      After 5 mins
Turn off hard disks (AC)   After 60 mins
Turn off hard disks (DC)   After 10 mins
System standby (AC)        Never
System standby (DC)        After 5 mins
System hibernates (AC)     Never
System hibernates (DC)     After 20 mins
Processor Throttle (AC)    Not Supported
Processor Throttle (DC)    Not Supported</code></pre>
<p>that will tell you what the current settings are. After that, you can set the power scheme by doing this:</p>
<pre><code>psexec \\[workstation name] powercfg /setactive "[scheme name]"</code></pre>
<p>It will exit with &#8220;error code 0&#8243;, but no worries. Just check your work using the query command above after your changes.</p>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2009/01/remotely-change-power-options-in-xp/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2009/01/remotely-change-power-options-in-xp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

