<?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>Teh Tech &#187; Kaseya</title>
	<atom:link href="http://tehtech.com/tag/kaseya/feed/" rel="self" type="application/rss+xml" />
	<link>http://tehtech.com</link>
	<description>Being an Admin is Hard Enough</description>
	<lastBuildDate>Wed, 14 Jul 2010 16:14:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>All about the Shutdown Command</title>
		<link>http://tehtech.com/all-about-the-shutdown-command/</link>
		<comments>http://tehtech.com/all-about-the-shutdown-command/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 01:21:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Shutdown]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=215</guid>
		<description><![CDATA[The ability to restart and shutdown computers automatically or remotely is key to completing installs, fixing issues, or just having a hell of a time messing with end users. In this post ill detail all the switches and uses of the shutdown command. For anyone that is not familiar with the command &#8216;shutdown&#8217;, it is [...]]]></description>
			<content:encoded><![CDATA[<p>The ability to restart and shutdown computers automatically or remotely is key to completing installs, fixing issues, or just having a hell of a time messing with end users. In this post ill detail all the switches and uses of the shutdown command.</p>
<p>For anyone that is not familiar with the command &#8216;shutdown&#8217;, it is a windows/dos function that controlls the the shutdown, logoff and restart of a compiter or server either locally or remotely.</p>
<p>Here are the switches </p>
<div class="box">shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]</div>
<p><span id="more-215"></span><br />
Just typing shutdown won&#8217;t do anything;  you need arguments. </p>
<ul>
<li>-i   This will display the GUI interface for the shutdown command.  This works well in some cases though you do get more flexability with the command line options.</li>
<li>-l  This will log off the current session on the computer.  This cannot be used on remote computers though. </li>
<li>-s This will turn off the computer, this can be done remotely, but carefull you can&#8217;t remotely press the power botton on the front of the box!</li>
<li>-r  This will restart the local or remote computer.  Usefull stuff.</li>
<li>-a  This will cancel the shutdown restart or logoff process, this must be used before the shutdown commences (during the countdown).</li>
<li>-m  This is what allows you to specify the name of the computer you want to perform the action on (shutdown, restart or abort).</li>
<li>-t  This lets you chose how long you want to display the warning message for in seconds.  You can use &#8216;-t 0&#8242; to immediatly start the shutdown process with no message displayed.</li>
<li>-c  This lets you specify the reason that you shutdown or restarted in the event log.  There is a max of 127 chracters for this switch.</li>
<li>-f  This forces all applications to close with no warning.  This should almost always be used with a remote computer so you dont have a box asking if you would like to shave chnages to &#8216;untitled.txt&#8217; on the screen instead of it actually rebooting.</li>
<li>-d  This switch will let you specify the reason for the shutdown using microsoft reason codes. &#8216;u&#8217; is for user code &#8216;p&#8217; is for planned and the &#8216;xx&#8217; is to specify a major reason, while &#8216;yy&#8217; is to specify a minor reason.</li>
</ul>
<p>So putting it all together.</p>
<div class="box">shutdown -r -f -m\\remotecomputer -t 60 -c &#8220;reboot required to complete software install&#8221;</div>
<p>This will restart the the computer &#8216;remotecomputer&#8217;  after 60 seconds of displaying the message &#8220;reboot required to complete software install&#8221;.  To abort the shutdown within 60 seconds, issue the following command.</p>
<div class="box">shutdown -a -m \\remotecomputer</div>
<p>If the remote shutdown is not working for you remember that if you are in a workgroup the account you are logged in with must exist on, and have administrative rights on the remote computer. If you are on a domain, the user account must have SeRemoteShutdownPrivilege and SeShutdownPrivilege to accomplish this. </p>
<p>Here are some other interesting notes on this function/script:  It can be batched and run as a scheduled task.  For example, saving the above script as a restart.bat and scheduling it to run at a specified time will give you the ability to reboot a server at whatever time you want. Additionally, shutdown commands can be used via telnet.  You can telnet to a remote computer or server and issue the shutdown command to reboot the target computer.  Lets face it, sometimes you have to install something with administrative rights, but you don&#8217;t want to wait for it to finish. So just batch it and add a logoff command right after the install.  I use this all the time when I install office.  I login to a computer with an elevated account, and run a batch file to install office silently with a shutdown -l -t 0 at the end of the batch file, then lock the computer.  The install will finish and the account will logoff, its a useful little trick. Lastly with Kaseya; since this is directly a shell command you can issue it with just a few steps. <br />
 </p>
<div class="box">Script Name: Shutdown    </div>
<p>Script Description: Shutdown the computer using Shutdown.exe</p>
<p>IF True </p>
<p>THEN</p>
<p>   Execute Shell Command</p>
<p>     Parameter 1 : <span style="color: #ff0000;">shutdown -s -f -t 1 -c &#8220;Setup complete&#8221;</span></p>
<p>     Parameter 2 : 0</p>
<p>         OS Type : 0</p>
<p>ELSE</p>
<p>Change the red to match your needs and away you go.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/all-about-the-shutdown-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add Command Prompt Here Context Menu</title>
		<link>http://tehtech.com/add-command-prompt-here-context-menu/</link>
		<comments>http://tehtech.com/add-command-prompt-here-context-menu/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 15:53:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[Command Prompt]]></category>
		<category><![CDATA[Context Menu]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=237</guid>
		<description><![CDATA[Easy fast administration means less stress. This nifty script aims to save you some time.  This adds the right click context menu to all folders in explorer &#8216;cmd prompt here&#8217;. When you click this option a command prompt with the current directory will be displayed. This is a very useful tool for administrative functions and [...]]]></description>
			<content:encoded><![CDATA[<p>Easy fast administration means less stress. This nifty script aims to save you some time.  This adds the right click context menu to all folders in explorer &#8216;cmd prompt here&#8217;. When you click this option a command prompt with the current directory will be displayed. This is a very useful tool for administrative functions and saves you the time of opening a command prompt and changing directory to the folder you need. Additionally, it gives you a really easy way to walk a user through opening a command prompt window when you need them to run something like ipconfig over the phone. This is a visual basic script and runs silently, so it can be deployed by login script, or GPO as well as kaseya. Just save it as a .vbs.<br />
<span id="more-237"></span></p>
<div class="box">Dim WSHShell<br />
Set WSHShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
WSHShell.RegWrite &#8220;HKCR\Folder\Shell\MenuText\Command\&#8221;, &#8220;cmd.exe /k cd &#8221; &amp; chr(34) &amp; &#8220;%1&#8243; &amp; chr(34)<br />
WSHShell.RegWrite &#8220;HKCR\Folder\Shell\MenuText\&#8221;, &#8220;Cmd Prompt Here&#8221;</div>
<p>[ad]</p>
<p>For Kaseya, save the above as cmd_here.vbs, and upload it to the server. Import this script and change the red location to match the location of the file on your server.</p>
<div class="box">Script Name: cmd here<br />
Script Description: Adds &#8216;cmd here&#8217; to the context menu of explorer<br />
IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:\temp\cmd_here.vbs<br />
Parameter 2 :<span style="font-family: mceinline;"> <span style="color: #ff0000;">admin\VBS\cmd_here.vbs</span></span><br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:\WINDOWS\system32\wscript.exe<br />
Parameter 2 : c:\temp\cmd_here.vbs<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>
[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/add-command-prompt-here-context-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Windows Firewall From Command Line or Batch File</title>
		<link>http://tehtech.com/change-windows-firewall-from-command-line-or-batch-file/</link>
		<comments>http://tehtech.com/change-windows-firewall-from-command-line-or-batch-file/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 00:01:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[Windows Firewall]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=212</guid>
		<description><![CDATA[I have a set of scripts I run when I prep a computer for deployment.  At specific points applications require that the windows firewall be turned off in order to install correctly.  This is namely ACT! and imagine time.  They use a bunch of odd ports during install, so their documentation tells you to just [...]]]></description>
			<content:encoded><![CDATA[<p>I have a set of scripts I run when I prep a computer for deployment.  At specific points applications require that the windows firewall be turned off in order to install correctly.  This is namely ACT! and imagine time.  They use a bunch of odd ports during install, so their documentation tells you to just turn off the firewall. Well here is what I found with a little research.  From run or in a batch file there is a simple netsh command to disable the firewall and one to again enable it.<br />
<span id="more-212"></span><br />
For imagine time my install script looks like this</p>
<div class="box">netsh firewall set opmode disable<br />
g:\Imagine_time\IT_SETUP.exe /q /p<br />
netsh firewall set opmode enable</div>
<p> <br />
Effectively this will turn off the firewall, install the software silently from a share, and then enable the firewall again after install. I found something interesting with this in regards to kaseya too.  Sometimes VNC can&#8217;t get through the firewall because it has defaulted or something went wrong.  It turns out that if you run this as &#8220;system&#8221; you can actually disable the firewall remotely in many cases.  This has been a very helpful script for when a computer shows &#8216;connectable&#8217; but it just times out when attempting connection.</p>
<div class="box">Script Name: Win Firewall Off</div>
<p>Script Description: Turns off windows firewall</p>
<p>IF True </p>
<p>THEN</p>
<p>   Execute Shell Command</p>
<p>     Parameter 1 : netsh firewall set opmode <span style="color: #ff0000;">disable</span></p>
<p>     Parameter 2 : 1</p>
<p>         OS Type : 0</p>
<p>ELSE</p>
<p>Additionally,  if you change enable to disable in the above script, you can enable the firewall remotely through kaseya as well.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/change-windows-firewall-from-command-line-or-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change your Power Options to &#8216;Always On&#8217;</title>
		<link>http://tehtech.com/change-your-power-options-to-always-on/</link>
		<comments>http://tehtech.com/change-your-power-options-to-always-on/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 07:31:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Always On]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Login Script]]></category>
		<category><![CDATA[Power Options]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=148</guid>
		<description><![CDATA[It is anoying as hell when you push out an update or a patch and a computer is off.  This hopefully will limit this problem. Although it is impossible to keep a user from shutting down this will at least keep the computer from doing it on its own.  This can be pushed in a batch file, [...]]]></description>
			<content:encoded><![CDATA[<p>It is anoying as hell when you push out an update or a patch and a computer is off.  This hopefully will limit this problem. Although it is impossible to keep a user from shutting down this will at least keep the computer from doing it on its own.  This can be pushed in a batch file, or deployed as part of a login script for rollouts, and of course through kasyea.  Note this will only work on windows xp sp2 or higher.<br />
<span id="more-148"></span><br />
Batch or login script:</p>
<div class="box">powercfg /setactive &#8220;always on&#8221;</div>
<p>Kaseya</p>
<div class="box">Script Name: Power Option &#8211; Always on </div>
<p>Script Description: Turns the computers power configuation to the &#8216;always on&#8217; setting</p>
<p>IF True </p>
<p>THEN</p>
<p>   Execute Shell Command</p>
<p>     Parameter 1 : powercfg /setactive &#8220;always on&#8221;</p>
<p>     Parameter 2 : 1</p>
<p>         OS Type : 0</p>
<p>ELSE</p>
<p> <br />
[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/change-your-power-options-to-always-on/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Automatically Remove Windows Search 4.0</title>
		<link>http://tehtech.com/automatically-remove-windows-search-40/</link>
		<comments>http://tehtech.com/automatically-remove-windows-search-40/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 02:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[KB940157]]></category>
		<category><![CDATA[Windows Search]]></category>
		<category><![CDATA[Windows update]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=99</guid>
		<description><![CDATA[Microsoft has a funny way of sneaking &#8216;features&#8217; in with patches. In this case Windows Search 4.0 is not really a feature as much as a problem. It was installed on a few of the networks I support as part of our weekly patching, and the next day I got a bunch of calls about reduced [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has a funny way of sneaking &#8216;features&#8217; in with patches. In this case Windows Search 4.0 is not really a feature as much as a problem. It was installed on a few of the networks I support as part of our weekly patching, and the next day I got a bunch of calls about reduced performance. I figured that people would complain until it finished indexing. Not the case, it seemed to cripple computers and crush servers. It indexed to the point of actually leaving no resources for users to authenticate to one of our terminal servers. I started looking for a fix and came up with this:<br />
<span id="more-99"></span><br />
<span style="color: #000000;">Kaseya:</span></p>
<div class="box">
<p>Script Name: Remove Windows Search 4.0<br />
Script Description:</p>
<p>IF Test File<br />
Parameter 1 : C:WINDOWS$NtUninstallKB940157$spuninstspuninst.exe<br />
Exists :<br />
THEN<br />
Execute File<br />
Parameter 1 : C:WINDOWS$NtUninstallKB940157$spuninstspuninst.exe<br />
Parameter 2 : /quiet /norestart<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE</p></div>
<p><span style="color: #000000;">Windows logon script or batch file:</span></p>
<div class="box">C:WINDOWS$NtUninstallKB940157$spuninstspuninst.exe /quiet /norestart</div>
<p>If you are using kasaya you can import that script directly and run it to remove the &#8216;feature&#8217;. You can also add the above line to a login script or batch file. This will automatically, silently remove the update with no user intervention or popup.  it literally just disappears.</p>
<p><span style="color: #ff0000;">WARNING: running this on a terminal server with users logged in will cause new users to not be able to authenticate until you restart the server.  Always follow best practice for software uninstalls.  Careful when you run it on servers <img src='http://tehtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p>Just a nice simple way to remove windows search 4.0 infection from your network.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/automatically-remove-windows-search-40/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Make a Local User Account With VBS</title>
		<link>http://tehtech.com/make-a-local-user-account-with-vbs/</link>
		<comments>http://tehtech.com/make-a-local-user-account-with-vbs/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:16:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[User Account]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=135</guid>
		<description><![CDATA[I deployed a bunch of new computers to a network using terminal services. Since the real authentication is at the server we standardize the local computer login to the username user1 and the password user1, just to keep things simple.   So I needed a easy way to create this account locally on 30+ workstations. Here is [...]]]></description>
			<content:encoded><![CDATA[<p>I deployed a bunch of new computers to a network using terminal services. Since the real authentication is at the server we standardize the local computer login to the username user1 and the password user1, just to keep things simple.   So I needed a easy way to create this account locally on 30+ workstations. Here is what I came up with:<br />
<span id="more-135"></span></p>
<div class="box">
<p>Option Explicit<br />
&#8216; On Error Resume Next</p>
<p>Dim objComputer, objGroup, objUser, objWSHNetwork, strComputerName, FullName, Password, UserName, lngFlag<br />
Const ADS_UF_DONT_EXPIRE_PASSWD = &amp;H10000<br />
Const ADS_UF_PASSWD_CANT_CHANGE = &amp;H40<br />
Set objWSHNetwork = WScript.CreateObject(&#8220;WScript.Network&#8221;)<br />
strComputerName = objWSHNetwork.ComputerName<br />
Set objComputer = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName)<br />
Set objGroup = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/Users&#8221;)</p>
<p>UserName = &#8220;<span style="color: #ff0000;">user1</span>&#8221;<br />
FullName = &#8220;<span style="color: #ff0000;">user1</span>&#8221;<br />
Password = &#8220;<span style="color: #ff0000;">user1</span>&#8221;</p>
<p>Set objUser = objComputer.Create(&#8220;<span style="color: #000000;">User</span>&#8220;, UserName)<br />
objUser.SetPassword Password<br />
objUser.FullName = FullName<br />
objUser.SetInfo<br />
objGroup.Add &#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/&#8221; &amp; UserName</p>
<p><span style="color: #800080;">lngFlag = objUser.Get(&#8220;UserFlags&#8221;)<br />
lngFlag = lngFlag Or ADS_UF_DONT_EXPIRE_PASSWD<br />
objUser.Put &#8220;UserFlags&#8221;, lngFlag</span></p>
<p><span style="color: #800080;">lngFlag = objUser.Get(&#8220;UserFlags&#8221;)<br />
lngFlag = lngFlag Or ADS_UF_PASSWD_CANT_CHANGE<br />
objUser.Put &#8220;UserFlags&#8221;, lngFlag</span></p>
<p>objUser.SetInfo<br />
objUser.SetInfo</p></div>
<p>What this does is it creats a user account on the local computer feel free to change the <span style="color: #ff0000;">red</span> values to fit your needs.  It also flags the password as user cannot change and never expires.  These sections of code (marked in <span style="color: #800080;">purple</span>) can be removed to fit your needs.  Remember visual basic scripts are hangled by wscript.exe usually found in c:windowssystem32wscript.exe.  Be sure to point the script to this if you are using it as a login script or pusing it through a third party application like kaseya.</p>
<p>here is a example of this being used in kaseya, copy the script, edit it to your needs, save it as user1.vbs, adn put it on the kaseya server.  Run it an vola, user account across a network.</p>
<div class="box">Script Name: User Account Creation<br />
Script Description: Creats an account called user1 with the password user1 and sets it to never expire and user cannot change.  </p>
<p>IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:tempuser1.vbs<br />
Parameter 2 : adminVBSadmin.vbs<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:WINDOWSsystem32wscript.exe<br />
Parameter 2 : c:tempuser1.vbs<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</p></div>
<p>Hope this helps, it took me a while to develop.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/make-a-local-user-account-with-vbs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remotely Enable Remote Desktop</title>
		<link>http://tehtech.com/remotely-enable-remote-desktop/</link>
		<comments>http://tehtech.com/remotely-enable-remote-desktop/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 13:56:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Remote Desktop]]></category>
		<category><![CDATA[Terminal Services]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=113</guid>
		<description><![CDATA[This is for those &#8216;oh shit&#8217; times when you can&#8217;t get to a computer when you need to.  If you can get to the remote registry of a computer, you can change this key to allow RDP access to the computer, even if the box is not checked.  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlTerminal Serverf\DenyTSConnections DWORD value: 0 Or for [...]]]></description>
			<content:encoded><![CDATA[<p>This is for those &#8216;oh shit&#8217; times when you can&#8217;t get to a computer when you need to.  If you can get to the remote registry of a computer, you can change this key to allow RDP access to the computer, even if the box is not checked. <br />
<span id="more-113"></span></p>
<div class="box">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlTerminal Serverf\DenyTSConnections<br />
DWORD value: 0</div>
<p>Or for you Kaseya people out there.</p>
<div class="box">
<p>Script Name: OH SHIT RDP ON<br />
Script Description: Enable Remote Desktop</p>
<p>Script Name: rdp<br />
Script Description: Enable Remote Desktop</p>
<p>IF True<br />
THEN<br />
   Set Registry Value<br />
     Parameter 1 : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlTerminal Serverf\DenyTSConnections<br />
     Parameter 2 : 0<br />
     Parameter 3 : REG_DWORD<br />
         OS Type : 0<br />
ELSE</p></div>
<p>If you use Kaseya you can run this script accross your network or as part of your inital setup to prevent &#8220;Oh Shit&#8221; moments in the first place. </p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/remotely-enable-remote-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Service Pack 3 Rollout Options Switches and Scripts</title>
		<link>http://tehtech.com/service-pack-3-rollout-options-switches-and-scripts/</link>
		<comments>http://tehtech.com/service-pack-3-rollout-options-switches-and-scripts/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 19:52:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[Service Pack 3]]></category>
		<category><![CDATA[Windows update]]></category>
		<category><![CDATA[windowsXP-KB936929-SP3-x86-ENU.exe]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=105</guid>
		<description><![CDATA[Okay so Service Pack 3. Scary I know, I am always weary of big service pack rollouts. However if you don&#8217;t update to SP3, you are open to contracting some nasty bugs. Here are some simple install possibilities if you don&#8217;t have it on your network yet.  I suggest that you take a look at some [...]]]></description>
			<content:encoded><![CDATA[<p>Okay so Service Pack 3. Scary I know, I am always weary of big service pack rollouts. However if you don&#8217;t update to SP3, you are open to contracting some nasty bugs. Here are some simple install possibilities if you don&#8217;t have it on your network yet.  I suggest that you take a look at some of the install articles on SP3 and some of the complications people have experienced before doing a mass rollout.  Below are some options that might be helpful to you, but as always test on a few computers before rolling out to a bunch.  You might also want to check out this <a title="Switches" href="http://techrepublic.com.com/5208-6230-0.html?forumID=102&amp;threadID=262992" target="_blank">link</a> for a explanation of the switches and arguments for installation. In my scripts below the switches I use will force all aplications closed, and do a backup of of the replaced files, and make a log.  A progress window is displayed during the install and at the end the computer is rebooted.  I found this to be the best option for rollouts as you can see the progress bar to estimate time remaining, and you do have a log and a backup if things go wrong.  I suggest you find the right mix of switches that work for you though.<br />
<span id="more-105"></span></p>
<p>1. Windows Update:  Works on small networks, though it might not be the best option on any network with more than a few computers.  </p>
<p>2. Network Install:  The file is available from Microsoft <a title="SP3" href="http://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/WindowsXP-KB936929-SP3-x86-ENU.exe" target="_blank">here</a>.  Then all you have to do is install it, or script it.   I used this script to accomplish this at a few of my locations.  Note that you can run it over the network, but I like to copy it locally, just incase there is a network failure or i need to rerun it later for some reason.</p>
<div class="box">
<p>Title DO NOT CLOSE!!!<br />
color 1f<br />
echo off<br />
net use x: <span style="color: #ff0000;"> Serversp3<br />
</span>md c:downloads<br />
md c:downloadssp3<br />
copy x:windowsXP-KB936929-SP3-x86-ENU.exe c:downloads<br />
net use x: /delete<br />
cls<br />
echo A UPDATE IS INSTALLING ON THIS COMPUTER. DO NOT RESTART OR CLOSE THIS WINDOW. WHEN THE UPDATE IS COMPLETE THE COMPUTER WILL RESTART AUTOMATICALLY.<br />
c:downloadsWindowsXP-KB936929-SP3-x86-ENU.exe /passive /forcerestart /forceappsclose /d:c:tempbu /log:c:tempbuxpsp3.log</div>
<p>3. Kaseya with cURLing:  This will create a ton of bandwidth usage if you push this to more than a few computers on the same network, as every computer will be downloading it to their local disk.  So I don&#8217;t recommend this to a really large network, and it is also best done at night just so you don&#8217;t get any complaints of slowness.  Also note that you are going to have to have curl on your kserver to make this work.  Check out this post for a quick explination of <a title="cURL Post" href="http://tehtech.com/?p=47">cURL </a>or just download it <a title="cURL" href="http://curl.haxx.se/">here </a>   The script will check to see if the computer is running SP3 already, if it is it will stop, if not it will download it and run an unattended install followed by a reboot.  </p>
<div class="box">Script Name: sp3 curl<br />
Script Description: <br />
IF Check Registry Value<br />
Parameter 1 : HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionCSDVersion<br />
= :Service Pack 3<br />
THEN<br />
ELSE<br />
Execute Shell Command<br />
Parameter 1 : md c:temp<br />
Parameter 2 : 0<br />
OS Type : 8<br />
Execute Shell Command<br />
Parameter 1 : md c:tempsp3<br />
Parameter 2 : 0<br />
OS Type : 8<br />
Write File<br />
Parameter 1 : c:tempsp3curl.exe<br />
Parameter 2 : <span style="color: #ff0000;">admincurlcurl.exe</span><br />
OS Type : 8<br />
Execute File<br />
Parameter 1 : c:tempsp3curl.exe<br />
Parameter 2 : http://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/WindowsXP-KB936929-SP3-x86-ENU.exe -o &#8220;c:tempsp3WindowsXP-KB936929-SP3-x86-ENU.exe&#8221;<br />
Parameter 3 : 3<br />
OS Type : 8<br />
Execute Shell Command<br />
Parameter 1 : c:tempsp3WindowsXP-KB936929-SP3-x86-ENU.exe /passive /forcerestart /forceappsclose /d:c:tempbu /log:c:tempbuxpsp3.log<br />
Parameter 2 : 0<br />
OS Type : 8</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/service-pack-3-rollout-options-switches-and-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset a Local Account Password With VBS</title>
		<link>http://tehtech.com/reset-a-local-account-password-with-vbs/</link>
		<comments>http://tehtech.com/reset-a-local-account-password-with-vbs/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 15:25:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[Password reset]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=75</guid>
		<description><![CDATA[Today I added a bunch of old computers with different local admin account passwords to our domain.  So, since I am all for doing things the easy way I came up with a quick script.  I added the computers that I needed the admin account reset on to an active directory OU and applied this [...]]]></description>
			<content:encoded><![CDATA[<p>Today I added a bunch of old computers with different local admin account passwords to our domain.  So, since I am all for doing things the easy way I came up with a quick script.  I added the computers that I needed the admin account reset on to an active directory OU and applied this script.<br />
<span id="more-75"></span></p>
<div class="box">Option Explicit<br />
&#8216; On Error Resume Next<br />
Dim objComputer, objWSHNetwork, strComputerName, objUser<br />
Set objWSHNetwork = WScript.CreateObject(&#8220;WScript.Network&#8221;)<br />
strComputerName = objWSHNetwork.ComputerName<br />
Set objComputer = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName)<br />
Set objUser = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/<span style="font-family: mceinline;"><span style="color: #ff0000;">accountname</span></span>, user&#8221;)<br />
objUser.SetPassword &#8220;<span style="font-family: mceinline;"><span style="color: #ff0000;">password</span></span>&#8221;<br />
objUser.SetInfo</div>
<p>If you would like to use this with Kaseya all you have to do is copy the above script name and name it password.vbs. Change the variables to meet your needs and then upload it to the server.  Then just import the script below and change the path of the password.vbs to match the path of your file.</p>
<div class="box">Script Name: Password Reset<br />
Script Description: This resets an account password to a password of your choice with no intervention from the user.<br />
THEN<br />
Write File<br />
Parameter 1 : c:temppassword.vbs<br />
Parameter 2 : adminVBSpassword.vbs<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:WINDOWSsystem32wscript.exe<br />
Parameter 2 : c:temppassword.vbs<br />
Parameter 3 : 3<br />
OS Type :</div>
<p>This script pulls the computer name from the computer so it is completely portable.  This can also be used to reset any local accounts not just admin accounts and can be pushed through active directory or another script management application like Kaseya or n-able.  Remember that wscript.exe is what handles .vbs in windows, so be sure to point the script to the right location (usually c:windowssystem32wscript32.exe).  Just change the above <span style="color: #ff0000;">accountname</span> to match the account you wish to reset and insert the <span style="color: #ff0000;">password</span> you wish to set it to.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/reset-a-local-account-password-with-vbs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Curling: Installing Adobe Reader With cURL</title>
		<link>http://tehtech.com/curling-installing-adobe-reader-with-curl/</link>
		<comments>http://tehtech.com/curling-installing-adobe-reader-with-curl/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 22:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Unattended]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=47</guid>
		<description><![CDATA[Don&#8217;t worry, you wont need a broom for this.  cURL is a free opensoure, crossplatform, tiny application used for file transfer over urls, and browser emulation form command line.  It is avaliable here http://curl.haxx.se/ .  I happened across this while back while looking for a way to remotely download files from microsoft without user intervention and this [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t worry, you wont need a broom for this.  cURL is a free opensoure, crossplatform, tiny application used for file transfer over urls, and browser emulation form command line.  It is avaliable here <a title="cURL" href="http://curl.haxx.se/" target="_blank">http://curl.haxx.se/</a> .  I happened across this while back while looking for a way to remotely download files from microsoft without user intervention and this has proved to be very useful.  So heres how it works to do a basic download. In this example we are downloading Adobe Reader 9 from adobe.com.<br />
<span id="more-47"></span></p>
<div class="box">http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.0/enu/AdbeRdr90_en_US.exe -o &#8220;c:tempadobeAdbeRdr90_en_US.exe&#8221;</div>
<p>Essentially you use the syntax <span style="color: #ff0000;">&lt;URL of file&gt; -o &lt;Destination of file in quotes&gt;<span style="color: #000000;"> </span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">The  &#8217;-o&#8217; switch will output the file where you want it to go, the directory must already exist though.  Additionally this will work only for URLs that do not begin with HTTP.  Telnet, TFTP, FTP, and many other common protocols are supported.  If you need to curl from a HTTPS site you must also download the open SSL package from <a title="cURL" href="http://curl.haxx.se/" target="_blank">http://curl.haxx.se/.</a></span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">Now to put it all together.  This script can be used as a batch file to download and install Adobe Reader 9 from Adobe.com without any user intervention.  The download is automated, and the necessary switches to completely automate the installation are below.  The instalation of adobe is completely silent, it installs for all users with no user input or display.  Give it about 5 min to complete the install after the curl finishes.   This script can be used in a login script on a domain, or pushed through a management application such as Kaseya.</span></span></p>
<div class="box">md c:temp<br />
md c:tempadobe<br />
<span style="color: #ff0000;">c:tempcurl.exe</span> http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.0/enu/AdbeRdr90_en_US.exe -o &#8220;c:tempadobeAdbeRdr90_en_US.exe&#8221;<br />
c:tempadobeAdbeRdr90_en_US.exe /sAll /rs /l /msi&#8221;/qb-! /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES</div>
<p>Note that you can change the path to your curl.exe to match where you have stored it on your computer.<br />
[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/curling-installing-adobe-reader-with-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
