<?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; server</title>
	<atom:link href="http://www.anthonyreinke.com/tag/server/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>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>Life as a G33k</title>
		<link>http://www.anthonyreinke.com/2009/06/20/life-as-a-g33k/</link>
		<comments>http://www.anthonyreinke.com/2009/06/20/life-as-a-g33k/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 04:56:41 +0000</pubDate>
		<dc:creator>Anthony Reinke</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[drink]]></category>
		<category><![CDATA[energy]]></category>
		<category><![CDATA[energy drink]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[g33k]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[ids]]></category>
		<category><![CDATA[im]]></category>
		<category><![CDATA[khaos]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[monster]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tickets]]></category>
		<category><![CDATA[utorrent]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.anthonyreinke.com/?p=5</guid>
		<description><![CDATA[I am sitting here on my main desktop writing this.  On one tab of FireFox I have my Facebook open.  On the next tab I have this page open.  I have my uTorrent runningin the background.  My laptop sits next to me with a VPN connection in to work.  I am running scripts and adding [...]]]></description>
			<content:encoded><![CDATA[<p>I am sitting here on my main desktop writing this.  On one tab of FireFox I have my Facebook open.  On the next tab I have this page open.  I have my uTorrent runningin the background.  My laptop sits next to me with a VPN connection in to work.  I am running scripts and adding accounts in to group and verifying that the servers got the correct grouping.  My IDS is humming along.  My ESXi server is pumping out the heat as the server tries to keep the 8 processors cool.  I have 4 IM windows up on the laptop and 3 chat windows in facebook.  I have 7 command prompt windows pinging servers asking them if they are still up.</p>
<p>It is now 1:35am and I have been up since 5:30am the day before.  No worries, I got my energy drink (Monster Khaos).  Odds are I will be in to work between 9 and 10am.  Why?  Because I have 40 tickets to complete and more to be assigned.</p>
<p>Such is the life of a geek.<br />
B-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyreinke.com/2009/06/20/life-as-a-g33k/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

