The majority of our clients are on contract with full managed serivces. On each of our managed machines we create a local administrator account on the local machine. We use a Kaseya Script to create this account and put it into the Local Administrators group, but sometimes we need to change the password for that account. This script prompts you for both the user name and new password. (So you need to know the user name) This is a very fast and effective way to change user accounts in bulk or if you need to just change one very quickly.
<?xml version=”1.0″ encoding=”utf-8″?>
<ScriptExport xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://www.kaseya.com/vsa/2008/12/Scripting”>
<Procedure name=”Change Password for Local User” treePres=”3″>
<Body description=”Changes the password of the user and sets it to never expire.”>
<If description=”Creates a local Administrator named "OTSAdmin" and makes it so that that users is hidden from the logon list. The Password can be changed by replacing the fourth word the first net use command.”>
<Condition name=”True” />
<Then>
<Statement description=”Execute the given command as if it were typed in at a command prompt.” name=”ExecuteShellCommand” continueOnFail=”false” osType=”NT4|2000|XP|2003|Vista|2008″>
<Parameter xsi:type=”StringParameter” name=”Command” value=”net accounts /maxpwage:unlimited” />
<Parameter xsi:type=”EnumParameter” name=”ExecuteAccount” value=”System” />
<Parameter xsi:type=”BooleanParameter” name=”Is64Bit” value=”False” />
</Statement>
<Statement description=”Create a named procedure variable and assign a value retrieved from the managed machine by the agent.” name=”GetVariable” continueOnFail=”false”>
<Parameter xsi:type=”EnumParameter” name=”VariableType” value=”Prompt” />
<Parameter xsi:type=”StringParameter” name=”SourceContent” value=”user” />
<Parameter xsi:type=”StringParameter” name=”VariableName” value=”user” />
</Statement>
<Statement description=”Create a named procedure variable and assign a value retrieved from the managed machine by the agent.” name=”GetVariable” continueOnFail=”false”>
<Parameter xsi:type=”EnumParameter” name=”VariableType” value=”Prompt” />
<Parameter xsi:type=”StringParameter” name=”SourceContent” value=”pass” />
<Parameter xsi:type=”StringParameter” name=”VariableName” value=”pass” />
</Statement>
<Statement description=”net user user_name new_password /pwnexp:Y

Changes the password of the user and sets it to never expire.” name=”ExecuteShellCommand” continueOnFail=”false” osType=”NT4|2000|XP|2003|Vista|2008″>
<Parameter xsi:type=”StringParameter” name=”Command” value=”net user #user# #pass#” />
<Parameter xsi:type=”EnumParameter” name=”ExecuteAccount” value=”System” />
<Parameter xsi:type=”BooleanParameter” name=”Is64Bit” value=”False” />
</Statement>
</Then>
</If>
</Body>
</Procedure>
</ScriptExport>