<?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>Anthony Reinke &#187; windows</title>
	<atom:link href="http://www.anthonyreinke.com/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anthonyreinke.com</link>
	<description>Rambling Thoughts of a Random Mind</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:03:42 +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>Installing SNMP through the Command Line &#8211; Part 2</title>
		<link>http://www.anthonyreinke.com/2012/02/01/installing-snmp-through-the-command-line-part-2/</link>
		<comments>http://www.anthonyreinke.com/2012/02/01/installing-snmp-through-the-command-line-part-2/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 22:01:19 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=474</guid>
		<description><![CDATA[I added a batch script I wrote to install SNMP on a bunch of machine back on Jan. 14, 2012 (http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/). &#160;I have since modified the script. &#160;Changing the file from a .bat to a .cmd will allow you to right click and run as administrator on Windows 2008. &#160;Also I noticed in 2008, it [...]]]></description>
			<content:encoded><![CDATA[<p>I added a batch script I wrote to install SNMP on a bunch of machine back on Jan. 14, 2012 (<a href="http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/">http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/</a>). &nbsp;I have since modified the script. &nbsp;Changing the file from a .bat to a .cmd will allow you to right click and run as administrator on Windows 2008. &nbsp;Also I noticed in 2008, it defaults in to having the localhost as the only system that can communicate to the SNMP Service.</p>
<p>PsExec.exe @hosts.txt -s -c installsnmp.cmd</p>
<p>Below is the file to download. &nbsp;Rename the file to installsnmp.cmd<br />
<a href="http://www.anthonyreinke.com/wp-content/uploads/2012/02/installsnmp.cmd_.txt">installsnmp.cmd.txt</a></p>
<p>As always, please contact me if you have questions.</p>
<pre><span style="color: #00ff00;">@echo off</span></pre>
<pre><span style="color: #00ff00;">cls</span></pre>
<pre><span style="color: #00ff00;">REM Detect if the system is Windows Server 2003</span>
<span style="color: #00ff00;">systeminfo | find "2003" &gt; nul</span>
<span style="color: #00ff00;">if %ERRORLEVEL% == 0 goto 2003</span></pre>
<pre><span style="color: #00ff00;">REM Detect if the system is Windows XP</span>
<span style="color: #00ff00;">systeminfo | find "XP Pro" &gt; nul</span>
<span style="color: #00ff00;">if %ERRORLEVEL% == 0 goto XPPro</span></pre>
<pre><span style="color: #00ff00;">REM Detect if the system is Windows XP</span>
<span style="color: #00ff00;">systeminfo | find "2008" &gt; nul</span>
<span style="color: #00ff00;">if %ERRORLEVEL% == 0 goto 2008</span></pre>
<pre><span style="color: #00ff00;">REM If the system is Windows Vista, Windows Server 2008, or higher, </span>
<span style="color: #00ff00;">REM they have the required files built in.</span>
<span style="color: #00ff00;">goto ERROR</span></pre>
<pre><span style="color: #00ff00;">:2003</span>
<span style="color: #00ff00;">REM If Windows 2003, set the path to the i386 directory</span>
<span style="color: #00ff00;">REM Note: The path needs to be one level above the i386 directory</span>
<span style="color: #00ff00;">REM Example: if the path is \\server\share\windows2003\i386\ then</span>
<span style="color: #00ff00;">REM the path would be \\server\share\windows2003\</span>
<span style="color: #00ff00;">REM Note that the you need both a 32bit and 64bit versions</span></pre>
<pre><span style="color: #00ff00;">if (%PROCESSOR_ARCHITECTURE%) == (AMD64) (</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\Win2003x64\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\Win2003x64\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setW2003Path.reg</span></pre>
<pre><span style="color: #00ff00;">IF (%PROCESSOR_ARCHITECTURE%) == (x86) (</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\Win2003\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\Win2003\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setW2003Path.reg</span></pre>
<pre>
<span style="color: #00ff00;">REM Installing the created Registry File</span>
<span style="color: #00ff00;">regedit /s /q %temp%\setW2003Path.reg</span></pre>
<pre><span style="color: #00ff00;">goto SNMP</span></pre>
<pre><span style="color: #00ff00;">:XPPro</span>
<span style="color: #00ff00;">REM If Windows XP Professional, set the path to the i386 directory</span>
<span style="color: #00ff00;">REM Note: The path needs to be one level above the i386 directory</span>
<span style="color: #00ff00;">REM Example: if the path is \\server\share\windowsXP\i386\ then</span>
<span style="color: #00ff00;">REM the path would be \\server\share\windowsXP\</span>
<span style="color: #00ff00;">if (%PROCESSOR_ARCHITECTURE%) == (AMD64) (</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\XPProx64\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\XPProx64\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setXPProPath.reg</span>
<span style="color: #00ff00;">) ELSE IF (%PROCESSOR_ARCHITECTURE%) == (x86)</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\XPPro\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\XPPro\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setXPProPath.reg</span>
<span style="color: #00ff00;">)</span></pre>
<pre><span style="color: #00ff00;">REM Installing the created Registry File</span>
<span style="color: #00ff00;">regedit /s /q %temp%\setXPProPath.reg.reg</span></pre>
<pre><span style="color: #00ff00;">goto SNMP</span></pre>
<pre><span style="color: #00ff00;">:2008</span>
<span style="color: #00ff00;">REM Since 2008 stopped using the sysocmgr.exe to install features, in Vista and higher</span>
<span style="color: #00ff00;">REM you need to use the servermanagercmd.exe to add features. A great list of the </span>
<span style="color: #00ff00;">REM features and their command line install string is at:</span>
<span style="color: #00ff00;">REM http://www.techrepublic.com/blog/datacenter/install-windows-server-2008-features-with-servermanagercmd/294</span></pre>
<pre><span style="color: #00ff00;">servermanagercmd.exe -install SNMP-Services</span></pre>
<pre><span style="color: #00ff00;">goto Strings</span></pre>
<pre><span style="color: #00ff00;">:SNMP</span>
<span style="color: #00ff00;">REM Building the Unattended Install</span></pre>
<pre><span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo ;SetupMgrTag</span>
<span style="color: #00ff00;">echo [NetOptionalComponents]</span>
<span style="color: #00ff00;">echo SNMP=1</span>
<span style="color: #00ff00;">echo [SNMP]</span>
<span style="color: #00ff00;">echo Any_Host=YES</span>
<span style="color: #00ff00;">) &gt; %temp%\snmp.txt</span></pre>
<pre><span style="color: #00ff00;">REM Installing the SNMP application with the Unattended Install</span></pre>
<pre><span style="color: #00ff00;">sysocmgr /i:%windir%\inf\sysoc.inf /u:%temp%\snmp.txt</span></pre>
<pre><span style="color: #00ff00;">goto Strings</span></pre>
<pre><span style="color: #00ff00;">:Strings</span></pre>
<pre><span style="color: #00ff00;">REM Removing the public string</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\ValidCommunities]</span></pre>
<pre><span style="color: #00ff00;">REM Removing the only allow localhost communication, by default 2008 will only allow the </span>
<span style="color: #00ff00;">REM localhsot to talk to the SNMP service</span>
<span style="color: #00ff00;">echo [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\SNMP\Parameters\PermittedManagers]</span></pre>
<pre><span style="color: #00ff00;">REM Setting the SNMP strings</span>
<span style="color: #00ff00;">echo.</span></pre>
<pre><span style="color: #00ff00;">REM Setting the SNMP Contact Info</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\RFC1156Agent]</span>
<span style="color: #00ff00;">echo "sysContact"="Server Administrators"</span>
<span style="color: #00ff00;">echo "sysLocation"="Server Room"</span>
<span style="color: #00ff00;">echo "sysServices"=dword:0000004f</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">REM Setting the Read Only and Read Write Communities</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\ValidCommunities]</span>
<span style="color: #00ff00;">echo "readonly"=dword:00000004</span>
<span style="color: #00ff00;">echo "readwrite"=dword:00000008</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">REM Creating the Permitted Managers Key</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\SNMP\Parameters\PermittedManagers]</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">) &gt; %temp%\setupsnmp.reg</span></pre>
<pre><span style="color: #00ff00;">REM Installing the created Registry File</span></pre>
<pre><span style="color: #00ff00;">regedit /s /q %temp%\setupsnmp.reg</span></pre>
<pre><span style="color: #00ff00;">REM Cleaning Up</span></pre>
<pre><span style="color: #00ff00;">IF EXIST %temp%\setupsnmp.reg del %temp%\setupsnmp.reg</span>
<span style="color: #00ff00;">IF EXIST %temp%\setW2003Path.reg del %temp%\setW2003Path.reg</span>
<span style="color: #00ff00;">IF EXIST %temp%\setXPProPath.reg.reg del %temp%\setXPProPath.reg.reg</span>
<span style="color: #00ff00;">IF EXIST %temp%\snmp.txt del %temp%\snmp.txt</span></pre>
<pre><span style="color: #00ff00;">echo %COMPUTERNAME% Complete &gt;&gt; \\server\share\SNMP\SNMPInstall.txt</span></pre>
<pre><span style="color: #00ff00;">goto END</span></pre>
<pre><span style="color: #00ff00;">:ERROR</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo Could not determine the OS type</span>
<span style="color: #00ff00;">pause</span></pre>
<pre><span style="color: #00ff00;">goto END</span></pre>
<pre><span style="color: #00ff00;">:END</span></pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2012/02/01/installing-snmp-through-the-command-line-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing SNMP through the Command Line</title>
		<link>http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/</link>
		<comments>http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 04:18:59 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=455</guid>
		<description><![CDATA[I needed a way to mass install SNMP to the servers in my environment.  The problem I was having was Microsoft Windows Server 2003 needing files from the CD.  We don&#8217;t copy the i386 directory from the CD for two reasons.  We store the files on the network and drive space is limit on a [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way to mass install SNMP to the servers in my environment.  The problem I was having was Microsoft Windows Server 2003 needing files from the CD.  We don&#8217;t copy the i386 directory from the CD for two reasons.  We store the files on the network and drive space is limit on a lot of servers.  The batch script will check if the server is 2003.  If it is 2003, it will point the install cd to a network path or a local path.  Next it builds the  unattended install file.  Once the file is written, the system will add the SNMP feature per the unattended file.  After SNMP is installed, the registry keys are set for the SNMP community strings.  Lastly the script removes the temporary files it created.</p>
<p>Use this script in combination to PSTools&#8217; PSExec and you can mass install.  Create a list of systems you want to install this on and call it hosts.txt.  Each server needs to be on it&#8217;s own line and it is best to use the fully qualified name or IP Address.  Copy the hosts.txt and installsnmp.bat file in to your PSTools directory and run the following command:</p>
<pre><span style="color: #00ff00;">PsExec.exe @hosts.txt -s -c installsnmp.bat</span></pre>
<p><a href="http://www.anthonyreinke.com/wp-content/uploads/2012/01/installsnmp.txt">Download the Install SNMP Batch File, just rename to a .bat file.</a></p>
<p>&nbsp;</p>
<pre></pre>
<pre><span style="color: #00ff00;">@echo off</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">echo %COMPUTERNAME% Started &gt;&gt; \\server\share\SNMP\SNMPInstall.txt</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Detect if the system is Windows Server 2003</span>
<span style="color: #00ff00;">systeminfo | find "2003" &gt; nul</span>
<span style="color: #00ff00;">if %ERRORLEVEL% == 0 goto 2003</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Detect if the system is Windows XP</span>
<span style="color: #00ff00;">systeminfo | find "XP Pro" &gt; nul</span>
<span style="color: #00ff00;">if %ERRORLEVEL% == 0 goto XPPro</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM If the system is Windows Vista, Windows Server 2008, or higher, </span>
<span style="color: #00ff00;">REM they have the required files built in.</span>
<span style="color: #00ff00;">goto SNMP</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">:2003</span>
<span style="color: #00ff00;">REM If Windows 2003, set the path to the i386 directory</span>
<span style="color: #00ff00;">REM Note: The path needs to be one level above the i386 directory</span>
<span style="color: #00ff00;">REM Example: if the path is \\server\share\windows2003\i386\ then</span>
<span style="color: #00ff00;">REM the path would be \\server\share\windows2003\</span>
<span style="color: #00ff00;">REM Note that the you need both a 32bit and 64bit versions</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">if (%PROCESSOR_ARCHITECTURE%) == (AMD64) (</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\Win2003x64\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\Win2003x64\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setW2003Path.reg</span>
<span style="color: #00ff00;">) ELSE IF (%PROCESSOR_ARCHITECTURE%) == (x86)</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\Win2003\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\Win2003\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setW2003Path.reg</span>
<span style="color: #00ff00;">)</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Installing the created Registry File</span>
<span style="color: #00ff00;">regedit /s /q %temp%\setW2003Path.reg</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">goto SNMP</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">:XPPro</span>
<span style="color: #00ff00;">REM If Windows XP Professional, set the path to the i386 directory</span>
<span style="color: #00ff00;">REM Note: The path needs to be one level above the i386 directory</span>
<span style="color: #00ff00;">REM Example: if the path is \\server\share\windowsXP\i386\ then</span>
<span style="color: #00ff00;">REM the path would be \\server\share\windowsXP\</span>
<span style="color: #00ff00;">if (%PROCESSOR_ARCHITECTURE%) == (AMD64) (</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\XPProx64\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\XPProx64\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setXPProPath.reg</span>
<span style="color: #00ff00;">) ELSE IF (%PROCESSOR_ARCHITECTURE%) == (x86)</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]</span>
<span style="color: #00ff00;">echo "SourcePath"="\\\\server\\share\\Extracted\\XPPro\\"</span>
<span style="color: #00ff00;">echo "ServicePackSourcePath"="\\\\server\\share\\Extracted\\XPPro\\"</span>
<span style="color: #00ff00;">) &gt; %temp%\setXPProPath.reg</span>
<span style="color: #00ff00;">)</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Installing the created Registry File</span>
<span style="color: #00ff00;">regedit /s /q %temp%\setXPProPath.reg.reg</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">goto SNMP</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">:SNMP</span>
<span style="color: #00ff00;">REM Building the Unattended Install</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo ;SetupMgrTag</span>
<span style="color: #00ff00;">echo [NetOptionalComponents]</span>
<span style="color: #00ff00;">echo SNMP=1</span>
<span style="color: #00ff00;">echo [SNMP]</span>
<span style="color: #00ff00;">echo Any_Host=YES</span>
<span style="color: #00ff00;">) &gt; %temp%\snmp.txt</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Installing the SNMP application with the Unattended Install</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">sysocmgr /i:%windir%\inf\sysoc.inf /u:%temp%\snmp.txt</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">goto Strings</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">:2008</span>
<span style="color: #00ff00;">REM Since 2008 stopped using the sysocmgr.exe to install features, in Vista and higher</span>
<span style="color: #00ff00;">REM you need to use the servermanagercmd.exe to add features. A great list of the </span>
<span style="color: #00ff00;">REM features and their command line install string is at:</span>
<span style="color: #00ff00;">REM http://www.techrepublic.com/blog/datacenter/install-windows-server-2008-features-with-servermanagercmd/294</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">servermanagercmd.exe -install SNMP-Services</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">goto Strings</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">:Strings</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Removing the public string</span>
<span style="color: #00ff00;">(</span>
<span style="color: #00ff00;">echo Windows Registry Editor Version 5.00</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\ValidCommunities]</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Setting the SNMP strings</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\RFC1156Agent]</span>
<span style="color: #00ff00;">echo "sysContact"="Server Administrators"</span>
<span style="color: #00ff00;">echo "sysLocation"="Server Room"</span>
<span style="color: #00ff00;">echo "sysServices"=dword:0000004f</span>
<span style="color: #00ff00;">echo.</span>
<span style="color: #00ff00;">echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SNMP\Parameters\ValidCommunities]</span>
<span style="color: #00ff00;">echo "readonly"=dword:00000004</span>
<span style="color: #00ff00;">echo "readwrite"=dword:00000008</span>
<span style="color: #00ff00;">) &gt; %temp%\setupsnmp.reg</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Installing the created Registry File</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">regedit /s /q %temp%\setupsnmp.reg</span></pre>
<pre></pre>
<pre><span style="color: #00ff00;">REM Cleaning Up</span></pre>
<pre></pre>
<p><span style="color: #00ff00;">IF EXIST %temp%\setupsnmp.reg del %temp%\setupsnmp.reg</span><br />
<span style="color: #00ff00;">IF EXIST %temp%\setW2003Path.reg del %temp%\setW2003Path.reg</span><br />
<span style="color: #00ff00;">IF EXIST %temp%\setXPProPath.reg.reg del %temp%\setXPProPath.reg.reg</span><br />
<span style="color: #00ff00;">IF EXIST %temp%\snmp.txt del %temp%\snmp.txt</span></p>
<p>&nbsp;</p>
<p><span style="color: #00ff00;">echo %COMPUTERNAME% Complete &gt;&gt; \\server\share\SNMP\SNMPInstall.txt</span></p>
<p><span style="color: #00ff00;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2012/01/14/installing-snmp-through-the-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Exporting from 2003</title>
		<link>http://www.anthonyreinke.com/2011/10/10/exporting-from-2003/</link>
		<comments>http://www.anthonyreinke.com/2011/10/10/exporting-from-2003/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:29:29 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[ldifde]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=436</guid>
		<description><![CDATA[There are still people using 2003 as I found out. While helping convert from 2003 to a web based email solution for Exchange, I needed to export a full list of email addresses. I was searching for a while on Google before I found a quick and easy way to export the list. ldifde -d [...]]]></description>
			<content:encoded><![CDATA[<p>There are still people using 2003 as I found out. While helping convert from 2003 to a web based email solution for Exchange, I needed to export a full list of email addresses. I was searching for a while on Google before I found a quick and easy way to export the list.</p>
<pre>ldifde -d "DC=domain,DC=com" -r "(&amp;(mailnickname=*))" -l proxyAddresses -f emailaddresses.txt</pre>
<p>-d set the domain you are connecting to</p>
<p>-r set the filter for the query</p>
<p>-l set the query to list the attribute(s) you are looking for</p>
<p>-f tells the query to write to the following filename</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2011/10/10/exporting-from-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 Problem Step Recorder &#8211; Create Step By Step Recordings &#124; Technibble</title>
		<link>http://www.anthonyreinke.com/2010/12/23/windows-7-problem-step-recorder-create-step-by-step-recordings-technibble/</link>
		<comments>http://www.anthonyreinke.com/2010/12/23/windows-7-problem-step-recorder-create-step-by-step-recordings-technibble/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 04:13:38 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[recorder]]></category>
		<category><![CDATA[step]]></category>
		<category><![CDATA[technibble]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=376</guid>
		<description><![CDATA[A big problem for computer technicians is trying to reproduce the error that the client is encountering. If we don’t know exactly what they did to cause it, it is hard to track down the problem. This is where an application built into Windows 7 called “Problem Step Recorder” can help. Read more at: Windows [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal;">A big problem for computer technicians is trying to reproduce the error that the client is encountering. If we don’t know exactly what they did to cause it, it is hard to track down the problem. This is where an application built into Windows 7 called “Problem Step Recorder” can help.</span></p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal;">Read more at:<br />
</span><a href="http://www.technibble.com/windows-7-problem-step-recorder-create-step-by-step-recordings/">Windows 7 Problem Step Recorder &#8211; Create Step By Step Recordings | Technibble</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2010/12/23/windows-7-problem-step-recorder-create-step-by-step-recordings-technibble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring the Filesystem with Splunk</title>
		<link>http://www.anthonyreinke.com/2009/08/31/monitoring-the-filesystem-with-splunk/</link>
		<comments>http://www.anthonyreinke.com/2009/08/31/monitoring-the-filesystem-with-splunk/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 19:17:06 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[splunk]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=111</guid>
		<description><![CDATA[I have used OSSEC in the past to watch the file system for changes.  When I found that I can have the Splunk agent handle the monitoring itself, I was pretty excited.  Since I would send my OSSEC data to Splunk anyways, it just seemed logical to have Splunk do everything. In Windows, you need [...]]]></description>
			<content:encoded><![CDATA[<p>I have used OSSEC in the past to watch the file system for changes.  When I found that I can have the Splunk agent handle the monitoring itself, I was pretty excited.  Since I would send my OSSEC data to Splunk anyways, it just seemed logical to have Splunk do everything.</p>
<p>In Windows, you need to edit the &#8220;c:program filesSplunketcsystemlocalinputs.conf&#8221; file.  Of course your path could be different if you installed it in a different place.  There are a lot of options and switches you can use.  I went for the simplest set.</p>
<p>[fschange:d:temp]<br />
recurse=true<br />
pollPeriod=3600</p>
<p>This will monitor the d:temp folder and all files and folders under it.  It will check the system every 3600 seconds (1 hour).</p>
<p>This has helped me keep track of the changes in my servers.  I can see when a file was add/deleted/changed (due to the hash) and then look at who was logged in during the period that the file was changed.</p>
<p><img class="alignleft size-full wp-image-115" title="Splunk File Delete" src="http://www.anthonyreinke.com/wp-content/uploads/2009/08/Capture.JPG" alt="Splunk File Delete" width="600" height="58" /></p>
<p>Splunk article on the switches and FSCHANGE.<br />
<a href="http://www.splunk.com/base/Documentation/4.0.3/Admin/Monitorchangestoyourfilesystem" target="_blank">http://www.splunk.com/base/Documentation/4.0.3/Admin/Monitorchangestoyourfilesystem</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">[fschange:d:temp]<br />
recurse=true<br />
followLinks=false<br />
pollPeriod=60</div>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2009/08/31/monitoring-the-filesystem-with-splunk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSSEC and Splunk</title>
		<link>http://www.anthonyreinke.com/2009/07/27/ossec-and-splunk/</link>
		<comments>http://www.anthonyreinke.com/2009/07/27/ossec-and-splunk/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 01:55:54 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[hids]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[ossec]]></category>
		<category><![CDATA[splunk]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=66</guid>
		<description><![CDATA[I have been playing with OSSEC and Splunk.  OSSEC is a Host based Intrusion Detection System (HIDS).  Splunk is a log archiving and searching system.  OSSEC is open source and is multiple platform.  You can run it on Linux/Unix and Windows.  I am using OSSEC to forward Windows Event Logs to Splunk.  Splunk makes the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing with OSSEC and Splunk.  OSSEC is a Host based Intrusion Detection System (HIDS).  Splunk is a log archiving and searching system.  OSSEC is open source and is multiple platform.  You can run it on Linux/Unix and Windows.  I am using OSSEC to forward Windows Event Logs to Splunk.  Splunk makes the searching and correlation.  Splunk can do WMI.  This would be great since no agent would need to be installed.  The problems is that if you have more than 30-50 systems, the amount time and traffic would cause issues.  Using the OSSEC agent, I am able to push the event logs to the OSSEC server.  From there the OSSEC server will upload to the Splunk server via Syslog.</p>
<p>Right now I have the servers all talking but I do need to adjust a few things.  Right now Splunk sees all the hosts as the OSSEC server.  I believe I just need to tweak the fields.  The question is how.</p>
<p>Splunk<br />
<a title="Splunk" href="http://www.splunk.com" target="_blank">http://www.splunk.com</a></p>
<p>OSSEC<br />
<a title="OSSEC" href="http://www.ossec.net" target="_blank">http://www.ossec.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2009/07/27/ossec-and-splunk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

