<?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>Michael Conigliaro &#187; Windows</title>
	<atom:link href="http://conigliaro.org/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://conigliaro.org</link>
	<description>cat /dev/brain &#124; grep technology &#62;&#62; blog</description>
	<lastBuildDate>Wed, 25 Aug 2010 23:46:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Net Use and System error 53</title>
		<link>http://conigliaro.org/2008/10/15/net-use-and-system-error-53/</link>
		<comments>http://conigliaro.org/2008/10/15/net-use-and-system-error-53/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 17:43:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.gyrate.org/?p=159</guid>
		<description><![CDATA[I keep getting bit by this stupid problem, so I&#8217;ve decided to finally document the fix: c:\&#62; net use x: \\192.168.1.1\share\ System error 53 has occurred. &#160; The network path was not found. The problem is the trailing slash at the end of the UNC path. c:\&#62; net use x: \\192.168.1.1\share The command completed successfully.]]></description>
			<content:encoded><![CDATA[<p>I keep getting bit by this stupid problem, so I&#8217;ve decided to finally document the fix:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">c<span style="color: #FF1010; font-weight: bold;">:\&gt; net use x: \\192.168.1.1\share\</span>
System error <span style="color: #cc66cc;">53</span> has occurred.
&nbsp;
The network path was not found.</pre></div></div>

<p>The problem is the trailing slash at the end of the UNC path.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">c<span style="color: #FF1010; font-weight: bold;">:\&gt; net use x: \\192.168.1.1\share</span>
The command completed successfully.</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2008/10/15/net-use-and-system-error-53/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Set Passwords as Non-Expiring on the Windows Command Line</title>
		<link>http://conigliaro.org/2008/04/01/set-passwords-as-non-expiring-on-the-windows-command-line/</link>
		<comments>http://conigliaro.org/2008/04/01/set-passwords-as-non-expiring-on-the-windows-command-line/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 15:21:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.gyrate.org/2008/04/01/set-passwords-as-non-expiring-on-the-windows-command-line/</guid>
		<description><![CDATA[With the net user command, it&#8217;s possible to modify active directory user accounts on the command line. net user myuser mypassword Similarly, it&#8217;s possible to modify group membership with the net group command. net group mygroup myuser /add This is all well and good, but Microsoft inexplicably left out a way to set account passwords [...]]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://support.microsoft.com/kb/251394">net user</a> command, it&#8217;s possible to modify active directory user accounts on the command line.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">net user myuser mypassword</pre></div></div>

<p>Similarly, it&#8217;s possible to modify group membership with the <a href="http://support.microsoft.com/kb/150295">net group</a> command.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">net group mygroup myuser <span style="color: #66cc66;">/</span>add</pre></div></div>

<p>This is all well and good, but Microsoft inexplicably left out a way to set account passwords as non-expiring (and you might want to do this when creating active directory accounts with a script).  That&#8217;s where the <a href="http://technet2.microsoft.com/windowsserver2008/en/library/d9ded34b-7ed0-4280-b524-a55c9c6c7b691033.mspx">dsquery</a> and <a href="http://technet2.microsoft.com/windowsserver2008/en/library/c25f43ea-d9d4-47fa-b7a9-70ea76b34cb11033.mspx">dsmod</a> commands come in.  The following code will use dsquery to locate all the users with names like &#8220;myuser&#8221; and use dsmod to set the passwords as non-expiring.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>f <span style="color: #ff0000;">&quot;delims=&quot;</span> <span style="color: #66cc66;">%</span>D <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'dsquery user -name myuser*'</span><span style="color: #66cc66;">&#41;</span> do dsmod user <span style="color: #66cc66;">%</span>D <span style="color: #66cc66;">-</span>pwdneverexpires <span style="color: #0080FF; font-weight: bold;">yes</span></pre></div></div>

<p>Ignore the part of Microsoft&#8217;s documentation that says the ds* commands ship in Windows 2008 Server.  They also ship in Windows 2003 Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2008/04/01/set-passwords-as-non-expiring-on-the-windows-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows 2008 Telnet (not SSH) Server</title>
		<link>http://conigliaro.org/2008/03/17/windows-2008-telnet-not-ssh-server/</link>
		<comments>http://conigliaro.org/2008/03/17/windows-2008-telnet-not-ssh-server/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 02:35:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.gyrate.org/2008/03/17/windows-2008-telnet-not-ssh-server/</guid>
		<description><![CDATA[Have you heard that Windows 2008 will be able to run in a command-line only mode, but will continue to ship with a telnet server instead of SSH? This is awesome, seeing as how telnet is an insecure, antiquated method of remote access that should not be used by anyone under any circumstances. Congratulations Microsoft! [...]]]></description>
			<content:encoded><![CDATA[<p>Have you heard that <a href="http://technet2.microsoft.com/windowsserver2008/en/library/18dd1257-2cd1-48f0-91f1-3012cf0fcc831033.mspx?mfr=true">Windows 2008 will be able to run in a command-line only mode, but will continue to ship with a telnet server instead of SSH</a>?  This is awesome, seeing as how <strong>telnet is an insecure, antiquated method of remote access that should not be used by anyone under any circumstances</strong>.  Congratulations Microsoft!  Welcome to the 1970&#8242;s!  Should we expect the SSH server in Windows Server 2033?</p>
<p>Seriously, what the fuck are those people doing over there?</p>
<p><strong>Update</strong> According to Microsoft, there will be &#8220;a technology like this included in Windows Server 2008 called WinRS; or Windows Remote Shell. This command line tool allows administrators to remotely execute most cmd.exe commands using the WS_Management protocol.&#8221;  Too bad <a href="http://blog.netnerds.net/2008/01/winrs-microsofts-disappointing-answer-to-ssh-for-remote-administration/">it sucks</a>!</p>
<p>See Also: &#8220;<a href="http://en.wikipedia.org/wiki/Not_Invented_Here">Not Invented Here Syndrome</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2008/03/17/windows-2008-telnet-not-ssh-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Appending command output to a timestamped logfile (Linux vs Windows)</title>
		<link>http://conigliaro.org/2006/04/28/appending-command-output-to-a-timestamped-logfile-linux-vs-windows/</link>
		<comments>http://conigliaro.org/2006/04/28/appending-command-output-to-a-timestamped-logfile-linux-vs-windows/#comments</comments>
		<pubDate>Fri, 28 Apr 2006 18:01:24 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.gyrate.org/archives/32</guid>
		<description><![CDATA[In Linux, it&#8217;s easy to log the output of a command to a timestamped log file: echo this is easy &#62;&#62; $&#40;date +%s&#41;.log When I tried to accomplish the same thing in Windows, I ended up with this mess: for /f &#34;tokens=1,2,3,4 delims=/- &#34; %%a in &#40;&#34;%date%&#34;&#41; do set ts=%%d%%b%%c echo this sucks &#62;&#62; %ts%.log]]></description>
			<content:encoded><![CDATA[<p>In Linux, it&#8217;s easy to log the output of a command to a timestamped log file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> this is easy <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span>.log</pre></div></div>

<p>When I tried to accomplish the same thing in Windows, I ended up with this mess:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>f <span style="color: #ff0000;">&quot;tokens=1,2,3,4 delims=/- &quot;</span> <span style="color: #66cc66;">%%</span>a <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;%date%&quot;</span><span style="color: #66cc66;">&#41;</span> do set ts=<span style="color: #66cc66;">%%</span>d<span style="color: #66cc66;">%%</span>b<span style="color: #66cc66;">%%</span>c
echo this sucks <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #66cc66;">%</span>ts<span style="color: #66cc66;">%</span>.log</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2006/04/28/appending-command-output-to-a-timestamped-logfile-linux-vs-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The project location is not trusted in .NET</title>
		<link>http://conigliaro.org/2006/03/23/the-project-location-is-not-trusted-error-in-net/</link>
		<comments>http://conigliaro.org/2006/03/23/the-project-location-is-not-trusted-error-in-net/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 14:43:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.gyrate.org/archives/12</guid>
		<description><![CDATA[While doing some .NET development in C# (which is turning out to be a really fun language by the way) for a new project I&#8217;m working on, I came across this error: The project location is not trusted. &#160; Running the application may result in security exceptions when it attempts to perform actions which require [...]]]></description>
			<content:encoded><![CDATA[<p>While doing some .NET development in C# (which is turning out to be a really fun language by the way) for a new project I&#8217;m working on, I came across this error:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">The project location is not trusted.
&nbsp;
Running the application may result in security exceptions when it
attempts to perform actions which require full trust.</pre></div></div>

<p>This will happen when you have your Visual Studio project on a mapped drive.  Here&#8217;s how you fix it:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">C<span style="color: #FF1010; font-weight: bold;">:\&gt; caspol -q -machine -addgroup 1 -url file://U:/* FullTrust -name &quot;U Drive&quot;</span></pre></div></div>

<p>Of course, caspol needs to be in your path in order to execute it, and since the .NET SDK installer doesn&#8217;t update the system path for some reason, you&#8217;ll probably have better luck running it with the full path:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol.exe</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2006/03/23/the-project-location-is-not-trusted-error-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
