<?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; Password reset</title>
	<atom:link href="http://tehtech.com/tag/password-reset/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>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>
	</channel>
</rss>
