<?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>SysAdmin Valley &#187; Windows</title>
	<atom:link href="http://www.sysadminvalley.com/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sysadminvalley.com</link>
	<description>I might as well write this stuff down so I remember it tomorrow</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:06:43 +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>Grepping in a Windows World</title>
		<link>http://www.sysadminvalley.com/2011/05/31/grepping-in-a-windows-world/</link>
		<comments>http://www.sysadminvalley.com/2011/05/31/grepping-in-a-windows-world/#comments</comments>
		<pubDate>Tue, 31 May 2011 13:48:12 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mini how-to]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=307</guid>
		<description><![CDATA[Lately I&#8217;ve been doing more work on Windows platforms and I&#8217;ve been missing the Linux command line.  I&#8217;m a huge user of cat, sed, awk and most of all grep. I&#8217;m also a huge bash script writer to help with everyday issues.  Recently I started playing around with Windows PowerShell and so I&#8217;ll be starting [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been doing more work on Windows platforms and I&#8217;ve been missing the Linux command line.  I&#8217;m a huge user of cat, sed, awk and most of all grep. I&#8217;m also a huge bash script writer to help with everyday issues.  Recently I started playing around with Windows PowerShell and so I&#8217;ll be starting to list PowerShell tips from time to time.  No I haven&#8217;t totally gone to the dark side, I&#8217;m still a huge Linux user, but PowerShell does seem like a nice option when you have to use Windows.</p>
<p>So, my latest issue is I needed to search through lots of logs to find an email address.  Normally I&#8217;d use grep to parse through the files.  Instead I opened up a Powershell prompt and used the following command</p>
<blockquote><p>findstr /I my@email.com logfile.log</p></blockquote>
<p>Findstr is just like grep and has a lot of the same options.  The <strong>/I</strong> tells it to be case-insensitive.  The <strong>my@email.com</strong> is what I&#8217;m looking for in <strong>logfile.log</strong>.  Here are the different settings that you can use:</p>
<blockquote><p>FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]<br />
[/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]<br />
strings [[drive:][path]filename[ ...]]</p>
<p>/B         Matches pattern if at the beginning of a line.<br />
/E         Matches pattern if at the end of a line.<br />
/L         Uses search strings literally.<br />
/R         Uses search strings as regular expressions.<br />
/S         Searches for matching files in the current directory and all<br />
subdirectories.<br />
/I         Specifies that the search is not to be case-sensitive.<br />
/X         Prints lines that match exactly.<br />
/V         Prints only lines that do not contain a match.<br />
/N         Prints the line number before each line that matches.<br />
/M         Prints only the filename if a file contains a match.<br />
/O         Prints character offset before each matching line.<br />
/P         Skip files with non-printable characters.<br />
/OFF[LINE] Do not skip files with offline attribute set.<br />
/A:attr    Specifies color attribute with two hex digits. See &#8220;color /?&#8221;<br />
/F:file    Reads file list from the specified file(/ stands for console).<br />
/C:string  Uses specified string as a literal search string.<br />
/G:file    Gets search strings from the specified file(/ stands for console).<br />
/D:dir     Search a semicolon delimited list of directories<br />
strings    Text to be searched for.<br />
[drive:][path]filename<br />
Specifies a file or files to search.</p>
<p>Use spaces to separate multiple search strings unless the argument is prefixed<br />
with /C.  For example, &#8216;FINDSTR &#8220;hello there&#8221; x.y&#8217; searches for &#8220;hello&#8221; or<br />
&#8220;there&#8221; in file x.y.  &#8216;FINDSTR /C:&#8221;hello there&#8221; x.y&#8217; searches for<br />
&#8220;hello there&#8221; in file x.y.</p>
<p>Regular expression quick reference:<br />
.        Wildcard: any character<br />
*        Repeat: zero or more occurrences of previous character or class<br />
^        Line position: beginning of line<br />
$        Line position: end of line<br />
[class]  Character class: any one character in set<br />
[^class] Inverse class: any one character not in set<br />
[x-y]    Range: any characters within the specified range<br />
\x       Escape: literal use of metacharacter x<br />
\&lt;xyz    Word position: beginning of word<br />
xyz\&gt;    Word position: end of word</p>
<p>For full information on FINDSTR regular expressions refer to the online Command<br />
Reference.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2011/05/31/grepping-in-a-windows-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What me, reboot?  Never</title>
		<link>http://www.sysadminvalley.com/2011/02/22/what-me-reboot-never/</link>
		<comments>http://www.sysadminvalley.com/2011/02/22/what-me-reboot-never/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 17:16:04 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=296</guid>
		<description><![CDATA[I came across an excellent article the other day which talks about server rebooting.  I&#8217;ve followed the same practice for many years.  There are very few cases where you should reboot a server.  From experience I&#8217;ve actually seen server end up in a worse state because the server was rebooted.  Lesson, it&#8217;s always better to [...]]]></description>
			<content:encoded><![CDATA[<p>I came across an excellent <a href="http://www.infoworld.com/t/unix/when-in-doubt-reboot-not-unix-boxes-061" target="_blank">article</a> the other day which talks about server rebooting.  I&#8217;ve followed the same practice for many years.  There are very few cases where you should reboot a server.  From experience I&#8217;ve actually seen server end up in a worse state because the server was rebooted.  Lesson, it&#8217;s always better to troubleshoot a running server, than to reboot and not be able to get into the operating system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2011/02/22/what-me-reboot-never/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new way to manage files and backups</title>
		<link>http://www.sysadminvalley.com/2010/02/07/a-new-way-to-manage-files-and-backups/</link>
		<comments>http://www.sysadminvalley.com/2010/02/07/a-new-way-to-manage-files-and-backups/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 16:23:18 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=181</guid>
		<description><![CDATA[Do you have multiple computers? Maybe one at work and one at home, or maybe you have two at work. Have you ever said I would love to have a way to keep my documents on multiple computers at the same time and not have to worry about copying the files back and forth. Or [...]]]></description>
			<content:encoded><![CDATA[<p>Do you have multiple computers?  Maybe one at work and one at home, or maybe you have two at work.  Have you ever said I would love to have a way to keep my documents on multiple computers at the same time and not have to worry about copying the files back and forth.  Or maybe you&#8217;re just looking for a simple way to backup your files in case of emergencies.  Well, you should check out <a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a>.</p>
<p><a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a> is a new way to manage your files.  First you create an account one their website, then you install a piece of software on all your computers.  Then when you add a file into your <a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a> on one of your computers, immediately all your other computers download the new file.  If you make a change to that document on any of the computers, all the others immediately pickup the change.  No more copying your documents to CD/DVD/USB and then over to your other computer.  Now all your documents are synchronized immediately.</p>
<p>Here&#8217;s another benefit.  If you have multiple computers that have different operating systems, this doesn&#8217;t matter.  You can automatically synchronize files between Windows, Mac and Linux too.</p>
<p>Another great feature of <a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a>, have you ever accidentally deleted or changed a file and wished that you had a backup copy of it.  Well now you do.  Now you can recover deleted files or get back previous versions of your documents.</p>
<p>To get started, just go to <a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a> and click Download <a target="_blank" href="https://www.dropbox.com/referrals/NTM4MDk1MTg5">DropBox</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2010/02/07/a-new-way-to-manage-files-and-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning xp_cmdshell on in Microsoft SQL Server</title>
		<link>http://www.sysadminvalley.com/2008/12/12/turning-xp_cmdshell-on-in-microsoft-sql-server/</link>
		<comments>http://www.sysadminvalley.com/2008/12/12/turning-xp_cmdshell-on-in-microsoft-sql-server/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 20:22:19 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=24</guid>
		<description><![CDATA[No it&#8217;s not Linux related, but it&#8217;s something I came across in my job today. I needed to be able to use xp_cmdshell to have SQL Server execute a dos command, but that command is turned off by default (for security reasons). Open up Query Browser or MS SQL Server Management Studio and log in [...]]]></description>
			<content:encoded><![CDATA[<p>No it&#8217;s not Linux related, but it&#8217;s something I came across in my job today. I needed to be able to use xp_cmdshell to have SQL Server execute a dos command, but that command is turned off by default (for security reasons).</p>
<p>Open up Query Browser or MS SQL Server Management Studio and log in as SA or another privledged user. Open a new query. Run</p>
<blockquote><p>sp_configure</p></blockquote>
<p>Then scroll all the way to the bottom, if xp_cmdshell is there, then skip these 2 steps, otherwise run</p>
<blockquote><p>sp_configure show_advanced_options, 1<br />
reconfigure with override</p></blockquote>
<p>Now run the following commands</p>
<blockquote><p>exec sp_configure xp_cmdshell, 1<br />
reconfigure with override</p></blockquote>
<p>Now you can use xp_cmdshell in all your scripts</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2008/12/12/turning-xp_cmdshell-on-in-microsoft-sql-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

