Looking to setup an Auto Logon for Windows and not go through the standard registry hack that most IT people use? You also don’t want the password in clear text like the Reg Hack does?
vCenter Orchestrator Configuration Password Recovery
- In vCO Server, navigate to C:\ProgramFiles\VMware\Orchestrator\configuration\jetty\etc\
- Edit the file password.properties and paste the following line (this should be replacing the existing one):
Using PowerCLI To Answer Virtual Machine Message Questions
The Virtual Machine Message I’m faced with deals with the relocation of the VM. Via the vSphere Client, my possible choices to answer the question are “Cancel”, “I moved it”, or “I copied it”. I don’t have the patience or desire to mouse through this hundreds of times.
I want to provide the same answer, “I moved it”, for every VM in inventory which has this question. The script to accomplish this is fairly simple, even by my standards. Once the PowerCLI connection is established to the vCenter Server or ESX(i) host, it’s a one-liner. Following is the PowerShell script which gets the job done for my situation:
Get-VM | Get-VMQuestion | Set-VMQuestion -Option “I moved it” -Confirm:$false
Note that there are different types of Virtual Machine Message questions which will yield a different set of possible answers. Be sure to query a VM having a question via PowerCLI for the possible answers to that question. Get-VM | Get-VMQuestion -full should do it. Once the possible answers are revealed, use Set-VMQuestion -Option to provide an answer.
Also note the script above will cycle through all VMs in inventory, and for those having a question, it will provide the same response for each VM. Thus the assumption is made that all VMs with pending questions have the same question being asked. To respond to explicit question types or to filter the VMs being looped through, the script would need to be refined.
For more information on the Get-VMQuestion or Set-VMQuestion PowerCLI cmdlets, use Get-Help Get-VMQuestion -full or Set-Help Get-VMQuestion -full respectively.
Thank you to Jason Boche for this article
How to Enable Auto Logon for Windows Joined as Domain Member
Follow these procedure to force Windows to skip and bypass asking user for user to select or input user name and password:
- Click Start, click Run, type regedit, and then click OK. In Windows Vista or 7, simply type regedit in Start Search and hit Enter.
- Navigate to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Double-click the DefaultUserName entry, type the user name to log on with, and then click OK.
- If DefaultUserName registry value name is not found, create the new String Value (REG_SZ) with value name as DefaultUserName.
- Double-click the DefaultPassword entry, type the password for the user account under the value data box, and then click OK.
- If there is no DefaultPassword value, create a new String Value subkey (REG_SZ) with DefaultPassword as the value name.
- In Windows, DefaultDomainName has to be specified as well, else Windows will prompt of invalid user name with user name displayed as .\username. To do so, double click on DefaultDomainName, and specify the domain name of the user account. If it’s local user, specify local host name.
- If the DefaultDomainName does not exist, create a new String Value (REG_SZ) registry key with value name as DefaultDomainName.
- Double-click the AutoAdminLogon entry, type 1 in the Value Data box, and then click OK.
- If there is no AutoAdminLogon entry, create a new String Value entry (REG_SZ) with AutoAdminLogon as the value name.
- If exist, delete the AutoLogonCount key.
- Quit Registry Editor.
- Click Start, click Restart, and then click OK.
Easy way to auto restart a third party service in Windows
If its 3rd party service then you can make a .bat file with following command
sc stop [service_name]
sc start [service_name]
Use Task scheduler in control panel to run this .bat file after every X hours.