<?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/category/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 Internet Explorer 8 &amp; Uninstall/Rollback Script</title>
		<link>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/</link>
		<comments>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/#comments</comments>
		<pubDate>Sun, 02 May 2010 18:19:09 +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[Tools]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[Internet Explorer 8]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[Windows update]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=368</guid>
		<description><![CDATA[Internet Explorer 8 is the newest release from Microsoft and recently left beta and hit automatic updates. I will be discussing the issues that I have encountered, and the fixes I have found. Additionally, I will include group policy templets to prevent its distribution and a uninstall script to remove it for systems. I came [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 8 is the newest release from Microsoft and recently left beta and hit automatic updates. I will be discussing the issues that I have encountered, and the fixes I have found.  Additionally, I will include group policy templets to prevent its distribution and a uninstall script to remove it for systems. I came in Monday to find that the software was installed on a spattering of computers across sever different clients (about 250 computers). I spent most of the rest of the week fixing them.<br />
<span id="more-368"></span></p>
<h4>Issues that I have had:</h4>
<p>No reboot: This seems to be the most common issue I encountered.  If the patch was installed and the computer was no rebooted you will experience things like not being able to type in text input fields. Rundll32.exe memory dumps, and missing menus and toolbars.  To fix this rebooting seems to do the trick.</p>
<p>No Header or title in internet explorer: For some reason I have seen this a few times when the computer went from IE6 to IE8 directly.  The browser window will not show any title, and will not allow you to open any menus.  The fix I found for this is to give the user account local admin rights and login again.  Go through the setup wizard and change the rights back again.</p>
<p>Internet explorer will not open after upgrade: I have seen this a few times.  First try running the browser as another user.  If it opens, try giving the user that is having issues local admin rights. If this does not fix it I found that recreating the user profile works ( I had to resort to this only twice out of 12 browsers that would not open)</p>
<p>Website Incompatibility: MANY products and websites are not compatibly with internet explorer 8.  Microsoft chose not to follow internet conventions when developing the browser so there have been a ton of issues encountered.  This is actually so prevalent that Microsoft introduced compatibility view to allow people to render websites in Internet Explorer 7.  Check out <a title="MS FAIL" href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx ">THIS</a><br />
Spybot &#8211; If you have spybot installed on your computer unfortunately it will not work with internet explorer 8.  The people at spybot are working to fix this but the only solution I found as of writing this is to uninstall either IE8 or spybot.</p>
<p>ADP &#8211; a very common workflow and payroll management provider.  If you are using IE8 you cannot log into ADP unless you view the page in Compatibility Mode.</p>
<p>Centricity &#8211; A common medical Practice management software, this does not seem to work at all with IE8 installed.  I found uninstalling to be the only option.</p>
<p>Solidworks &#8211; a Design and CAD application, once installed IE8 will cause web help to stop functioning as well as some other web based services. Uninstalling IE8 seems to be the best option for this as well.</p>
<p>Quickbooks &#8211; IE8 will break the web-help application and case older versions of quickbooks to crash on first load.  Again until there is a hotfix uninstalling IE is the best option.</p>
<p>General Browsing &#8211; About 2400 websites are not compatible with IE8.  A  bunch of banking sites and smaller sites do not work or allow for login, most of these are fixed with compatibility view.  Some big name sites like amazon.com ebay.com and download.com are having issues with the browser rendering.  I list of sites that are not rendered correctly is available <a title="Broken Sites" href="http://blogs.zdnet.com/microsoft/?p=2072">HERE</a>. </p>
<p>[ad]</p>
<h4>Options:</h4>
<p>Microsoft seems to have messed up again.  The browser does not follow conventions, it does not have nearly all the bugs and kinks worked out.  It causes a ton of applications and websites to not work, so much so they included a compatibility option out of the box. It seems hardly finished to me.</p>
<p>That said rollback may be a good option for you.  Microsoft allows several uninstall options:</p>
<p>Add and remove programs wizard &#8211; This will let you remove the browser and all subsequent patches in one wizard.</p>
<p>Restore &#8211; Sometimes it is just too messed up, the uninstaller wont work, or something else goes wrong. By defult the install creates a restore point.  This may be a option in some situations to rollback the mess.</p>
<p>Login Script: My favorite!  This is what I have been using on some domains to remove it.<br />

<div class="box">
%windir%\ie8\spuninst\spuninst.exe /quiet /norestart /log:G:\%computername%\<span style="color: #ff0000;">ie8uninstall.log</span><br />
Shutdown -r -f -t 30 -c “Reboot for Internet Explorer 8 Uninstall”</div>
<p>Kaseya &#8211; It for things like this I love kaseya.<br />

<div class="box">
Script Name: IE8 Uninstall<br />
Script Description: Uninstall IE 8</p>
<p>IF Test File<br />
Parameter 1 : %windir%\ie8\spuninst\spuninst.exe<br />
Exists :<br />
THEN<br />
Execute File<br />
Parameter 1 : %windir%\ie8\spuninst\spuninst.exe<br />
Parameter 2 : /quiet /norestart /log:<span style="color: #ff0000;">G:\ie8uninstall.log</span><br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>
Preventing the patch for reaching your system &#8211; Microsoft admits that the patch might not be for everyone.  Check out <a title="MS FAIL" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21687628-5806-4ba6-9e4e-8e224ec6dd8c&amp;displaylang=en">THIS</a>.  It included a group policy template to prevent the update from installing via automatic updates, and a login script option that can also be used with kaseya.<br />

<div class="box">
Script Name: Block IE 8<br />
Script Description: Blocks IE8 From Auto Update</p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : md c:\temp<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : md c:\temp\ie8<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Write File<br />
Parameter 1 : md c:\temp\ie8\ie8block.cmd<br />
Parameter 2 : <span style="color: #ff0000;">admin\batch</span>\IE80Blocker.cmd<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : md c:\temp\ie8\ie8block.cmd<br />
Parameter 2 : /b<br />
Parameter 3 : 0<br />
OS Type : 0<br />
ELSE
</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to Add and Remove a Local Account from a Group</title>
		<link>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/</link>
		<comments>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 20:35:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[Groups]]></category>
		<category><![CDATA[Local Admin]]></category>
		<category><![CDATA[Login Script]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=361</guid>
		<description><![CDATA[Occasionally you may need to add a local user account to the local administrators group for a software install or temporary maintenance. The following vbs script can be used to add the local ‘user1’ account to the local ‘administrators’ group. Any user can be added to any local group, change the red to match your [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally you may need to add a local user account to the local administrators group for a software install or temporary maintenance. The following vbs script can be used to add the local ‘user1’ account to the local ‘administrators’ group. Any user can be added to any local group, change the <span style="color: #ff0000;">red</span> to match your needs. The computer name is pulled from the workstation dynamically so this is also completely portable and can be run on any computer.<br />
<span id="more-361"></span></p>
<div class="box">Dim objComputer, objWSHNetwork, strComputerName, objUser, objGroup<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;/<span style="color: #ff0000;">Administrators</span>&#8220;)<br />
Set objUser = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/<span style="color: #ff0000;">user1</span>&#8220;)<br />
objGroup.Add(objUser.ADsPath)<br />
objUser.SetInfo</div>
<p>To use this through Kaseya save the above as user1addadmin.vbs and upload it to the server:</p>
<div class="box">Script Name: Add user1 to admin group<br />
Script Description: Adds the local user1 account to the local admin group<br />
IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:\temp\user1addadmin.vbs<br />
Parameter 2 : <span style="color: #ff0000;">admin\VBS\</span>user1addadmin.vbs<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:\WINDOWS\system32\wscript.exe<br />
Parameter 2 : c:\temp\user1addadmin.vbs<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>It might also come up that you may need to remove a user from a local group. The following one line batch file can be run as a login script, batch file or ran as a shell command. It will remove the local ‘user1’ account from the local ‘administrators’ group. Again this will work for any user account and any group.  Just change the <span style="color: #ff0000;">red</span> to match your needs.</p>
<div class="box">net localgroup <span style="color: #ff0000;">administrators</span> <span style="color: #ff0000;">user1</span> /delete</div>
<p>[ad]</p>
<p>Through Kaseya the following script would accomplish this:</p>
<div class="box">Script Name: Remove the local user1 from admin group<br />
Script Description: removes the local user1 account from the admin group.</p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : NET LOCALGROUP <span style="color: #ff0000;">administrators</span> <span style="color: #ff0000;">user1</span> /delete<br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE
</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripted Enumeration of Accounts with Local Admin Rights</title>
		<link>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/</link>
		<comments>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 16:15:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Local Admin]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=333</guid>
		<description><![CDATA[Beefing up security on networks keeps you from having issues in the long run. An hour today can save you three later. In a effort to improve network security and individual computer security I came up with this fancy little kaseya script.  It enumerates the local administrators on a computer and exports them to a [...]]]></description>
			<content:encoded><![CDATA[<p>Beefing up security on networks keeps you from having issues in the long run. An hour today can save you three later. In a effort to improve network security and individual computer security I came up with this fancy little kaseya script.  It enumerates the local administrators on a computer and exports them to a text file named whatever the target computer has been named. This can also be run through a batch login script. In the example below &#8220;g:&#8221; is a admin share on my local server, you can make this what ever you want or use a get file in kaseya to snatch the text file from the computer.</p>
<p><span id="more-333"></span><br />
[ad]</p>
<div class="box">Script Name: Get Local Administrators<br />
Script Description: Enumerates what users are members of the local admin group.<br />
IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : net localgroup administrators &gt;&gt; <span style="color: #ff0000;">gadmin_audit</span>%computername%.txt<br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE</div>
<p>Here is the same thing in a batch file with mapping a share:</p>
<div class="box">Net use g: <span style="color: #ff0000;">\server01admin_share</span><br />
net localgroup administrators &gt;&gt; <span style="color: #ff0000;">gadmin_audit</span>%computername%.txt<br />
net use g: /delete</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change The Default Internet Explorer Homepage</title>
		<link>http://tehtech.com/change-the-default-internet-explorer-homepage/</link>
		<comments>http://tehtech.com/change-the-default-internet-explorer-homepage/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 01:34:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[Internet Explorer 7]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=290</guid>
		<description><![CDATA[I have a chunk of registry tweaks I run on new computers, this is one of them. It changes the internet explorer homepage to www.google.com, though you can use anything you like in place of google, perhaps a intranet page? Windows Registry Editor Version 5.00  [HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain] &#8220;Start Page&#8221;=&#8221;www.google.com&#8220; Simple but powerful, and can be [...]]]></description>
			<content:encoded><![CDATA[<p>I have a chunk of registry tweaks I run on new computers, this is one of them.  It changes the internet explorer homepage to www.google.com, though you can use anything you like in place of google, perhaps a intranet page?</p>
<div class="box">Windows Registry Editor Version 5.00 </p>
<p>[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain]<br />
&#8220;Start Page&#8221;=&#8221;<span style="color: #ff0000;">www.google.com</span>&#8220;</div>
<p>Simple but powerful, and can be merged to the registry silently using regedit /s, or added to a list of registry hacks.</p>
<p>To use this with kaseya import the below script, change the <span style="color: #ff0000;">red</span> to your best practice and away you go.</p>
<div class="box">Script Name: Default IE Page &#8211; google<br />
Script Description: Set Default Page on Iternet Explorer.  </p>
<p>IF User Is Logged In<br />
Parameter 1 :<br />
THEN<br />
Set Registry Value<br />
Parameter 1 : HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainStart Page<br />
Parameter 2 : <span style="color: #ff0000;">http://www.google.com</span><br />
Parameter 3 : REG_SZ<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/change-the-default-internet-explorer-homepage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding ‘Lock My Computer’ Shortcut to The Desktop</title>
		<link>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/</link>
		<comments>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 01:14:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Lock]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=287</guid>
		<description><![CDATA[In a effort to increase security at one of my healthcare providers they requested a quick way their employees can lock their computers when they walk away from their computers.  I found Mklnk, it is a very tiny free utility that lets you make shortcuts from command line.  I decided to use this to accomplish this task.  I [...]]]></description>
			<content:encoded><![CDATA[<p>In a effort to increase security at one of my healthcare providers they requested a quick way their employees can lock their computers when they walk away from their computers.  I found <a title="mklnk" href="http://smithii.com/mklnk" target="_blank">Mklnk,</a> it is a very tiny free utility that lets you make shortcuts from command line.  I decided to use this to accomplish this task.  I did some research and found that the following command will lock your computer.</p>
<div class="box">rundll32.exe user32.dll,LockWorkStation</div>
<p><span id="more-287"></span><br />
So I used this with mklnk.exe to make a shortcut on the users desktop, with a lock icon.  Below is the batch file I used.  G: is a network share containing mklnk.exe.</p>
<div class="box">g:mklnk.exe -a user32.dll,LockWorkStation -i %SystemRoot%system32SHELL32.dll -n 47 %SystemRoot%system32rundll32.exe &#8220;%ALLUSERSPROFILE%DesktopLock&#8221;</div>
<p>What this does it it passes the arguments user32.dll,LockWorkStation to the rundll32.exe, and the result is a shortcut on the all user desktop called &#8220;lock&#8221; that uses shell icon 47 (a cute lock graphic).</p>
<p>To use this with kaseya you have to upload mklnk.exe to the kserver, and then import the following script.  Be sure to change the <span style="color: #ff0000;">red</span> to match the location you have uploaded mklnk.exe.</p>
<div class="box">Script Name: Lock Computer Icon on Desktop<br />
Script Description: Creates a Lock icon on the all user desktop silently </p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : md c:temp<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Write File<br />
Parameter 1 : c:tempmklnk.exe<br />
Parameter 2 : <span style="color: #ff0000;">adminutilmklnk.exe</span><br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : c:tempmklnk.exe -a user32.dll,LockWorkStation -i %SystemRoot%system32SHELL32.dll -n 47 %SystemRoot%system32rundll32.exe &#8220;%ALLUSERSPROFILE%DesktopLock My Computer&#8221;<br />
Parameter 2 : 1<br />
OS Type : 0<br />
Delete File<br />
Parameter 1 : c:tempmklnk.exe<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 7 Search Provider Import/Export</title>
		<link>http://tehtech.com/internet-explorer-7-search-provider-import-export/</link>
		<comments>http://tehtech.com/internet-explorer-7-search-provider-import-export/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 00:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Internet Explorer 7]]></category>
		<category><![CDATA[Search Provider]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=282</guid>
		<description><![CDATA[I recently came across a computer that for no good reason would seem to allow me to change or add a search provider.  When I would attempt to add a provider to the search bar (since google is tons better than the default; windows live) it would cause a fatal exception and close Internet Explorer.  After a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a computer that for no good reason would seem to allow me to change or add a search provider.  When I would attempt to add a provider to the search bar (since google is tons better than the default; windows live) it would cause a fatal exception and close Internet Explorer.  After a ton of  searching, I could not find this anywhere on the internets so i think it is worth posting here.  <br />
<span id="more-282"></span><br />
I found the registry location of the search provider, and exported it from my computer.  Then i exported it into the mean computer and voila the new search provider was installed.  The below registry key can be added to the registry of a computer to add Google Search as a search provider and set it as defult.  If you want a different search provider just set it up on your computer and export the below key, note that you can also export more than one search provider with this method.  I have added these keys to the script of registry tweeks I run when installing a new OS.  hope this helps!</p>
<div class="box">Windows Registry Editor Version 5.00 </p>
<p>[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerSearchScopes]<br />
&#8220;DefaultScope&#8221;=&#8221;{10C02F5B-9658-4FF2-944B-2C40A61E2F89}&#8221;<br />
&#8220;Version&#8221;=dword:00000001</p>
<p>[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerSearchScopes{10C02F5B-9658-4FF2-944B-2C40A61E2F89}]<br />
&#8220;DisplayName&#8221;=&#8221;Google&#8221;<br />
&#8220;URL&#8221;=&#8221;http://www.google.com/search?q={searchTerms}&amp;rls=com.microsoft:{language}&amp;ie={inputEncoding}&amp;oe={outputEncoding}&amp;startIndex={startIndex?}&amp;startPage={startPage}&#8221;</p></div>
<p>To do this silently through Kaseya you can save the above as search.reg and upload it to your kserver. Make sure you change the <span style="color: #ff0000;">red</span> to match the path of your reg file.</p>
<div class="box">Script Name: Defult Search Provider Google<br />
Script Description: Add Google as search provider in IE 7 and Make it Default </p>
<p>IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:tempsearch.reg<br />
Parameter 2 : <span style="color: #ff0000;">adminRegsearch.reg</span><br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : regedit /s c:tempsearch.reg<br />
Parameter 2 : 0<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/internet-explorer-7-search-provider-import-export/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static and DHCP IP Address Changes Through Scripts</title>
		<link>http://tehtech.com/static-and-dhcp-ip-address-changes-through-scripts/</link>
		<comments>http://tehtech.com/static-and-dhcp-ip-address-changes-through-scripts/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 02:54:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[Static IP address]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=251</guid>
		<description><![CDATA[I have a office that uses static IP addresses at the location. The manager just got a laptop that he wants to use at the office and at his house the same static address does not work. So I made him two batch files so he can easily switch between a static IP address in [...]]]></description>
			<content:encoded><![CDATA[<p>I have a office that uses static IP addresses at the location.  The manager just got a laptop that he wants to use at the office and at his house the same static address does not work.  So I made him two batch files so he can easily switch between a static IP address in the office and a dynamic IP address at home.  I was thinking that this could be helpful for making sure everyone in a office is using DHCP and no one is statically assigned.  It could also be really useful for changing say the DNS server address on a set of computers automatically through a login script or kaseya.</p>
<p>It is a super simple script.  The name of the network adaptor must be changed to match the name of the network adaptor you wish to modify settings for.<br />
<span id="more-251"></span><br />
DHCP Through a batch/login script:</p>
<div class="box">netsh int ip set address name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; source = dhcp<br />
netsh int ip set dns name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; source = dhcp<br />
netsh int ip set wins name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; source = dhcp</div>
<p>Static IP address through a batch/login script (change the red to match the addresses you need to set.  IP is the IP address, SM is the subnet mask, gw is the default gateway, dns1 is the primary dns address, dns2 is the secondary dns address):</p>
<div class="box">@ECHO OFF   </p>
<p>set ip=<span style="color: #ff0000;">192.168.1.203</span><br />
set sm=<span style="color: #ff0000;">255.255.255.0</span><br />
set gw=<span style="color: #ff0000;">192.168.1.1</span><br />
set dns1=<span style="color: #ff0000;">4.2.2.2</span><br />
set dns2=<span style="color: #ff0000;">4.2.2.1</span></p>
<p>netsh int ip set address name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; source = static addr = %ip% mask = %sm%<br />
netsh int ip set address name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; gateway = %gw% gwmetric = 1<br />
netsh int ip set dns name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; source = static addr = %dns1%<br />
netsh int ip add dns name = &#8220;<span style="color: #ff0000;">Local Area Connection</span>&#8221; addr = %dns2%<br />
END</div>
<p>DHCP Set through Kaseya</p>
<div class="box">Script Name: Enable DHCP<br />
Script Description: Enables DHCP on the local area conection   </p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : netsh int ip set dns name = &#8220;Local Area Connection&#8221; source = dhcp<br />
Parameter 2 : 1<br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : netsh int ip set address name = &#8220;Local Area Connection&#8221; source = dhcp<br />
Parameter 2 : 1<br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : netsh int ip set wins name = &#8220;Local Area Connection&#8221; source = dhcp<br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE</p></div>
<p>You can also use this same pattern to set just one line.  For example to use kaseya to quickly change the DNS server address on several computers you can use this. (note 4.2.2.2 is a open DNS server but change it to match what you need):</p>
<div class="box">Script Name: Change DNS to Open DNS<br />
Script Description: Sets DNS on Local Area connection to 4.2.2.2 </p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : netsh int ip set dns name = &#8220;Local Area Connection&#8221; source = static addr = <span style="color: #ff0000;">4.2.2.2</span><br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/static-and-dhcp-ip-address-changes-through-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>
	</channel>
</rss>
