Techno Chat|Tech Blog!! Chat with style.. :P

29Sep/140

How to reset windows password (offline) on AWS Windows Instance

Posted by Saugata

In simple word changing/resetting windows password is a very simple task using any third party free or paid tools as long as you able to access server console. Even on virtual platform like Hyper-V VMWare you have access to server console, but when it comes to AWS, there is no way to access console of a virtual instances. So, those tools will not work, as those required user input / virtual CD or USB boot, which is not available in AWS.

I have found a solution to reset the password of any AWS windows instance. If you know the local user id, then it will be very easy to reset the password of that account.

You have to perform the following steps.

  • First you have to stop the instance.
  • Then you have to identify the root volume (/dev/sda1) of that instance. You could get this information using one simple function I wrote (GetInstanceVolumeDetails InstanceID).
  • Once you identified the root volume, Took a snapshot backup of root volume.
  • Now you have to dismount this volume and remount it on any other working instance as additional volume.

  • This volume mounted as G: drive on working instance. Now you have to create one service using srvany.exe (http://support.microsoft.com/kb/137890) to rest the password of Administrator account during system startup. To configure this you have to load up the system registry hive of faulty instance from G:\Windows\System32\Config\SYSTEM as _SYS under HKEY_LOCAL_MACHINE and imported following registry
    NOTE: ***If while you attached root volume on working instance, there will be two drive mounted on the OS, here in out testing Recovery partition mounted as F: drive and OS volume mounted as G: drive.***)

  • Now placed srvany.exe under G:\ drive.
21 views
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...Loading...
11Jul/140

Port Scanner using PowerShell with Email Notification

Posted by Saugata

Few days back I was asked to create a script, which will check RDP port status of multiple servers and send the result as an email notification. I have searched for few, but unfortunately there was no ready script for that. I decided to build one using PowerShell, and came out with following script.

Hope this script might help you as well.

 

339 views
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...Loading...
25Jun/140

Extract VM details from VCenter

Posted by Saugata

Sometimes it's a painful job to extract all the information from vCenter server. From GUI you could export information, but not all the information will be available. I was requested to extrach following information.

  • VM Name
  • Host Name
  • VM IP Address
  • Installed Guest OS
  • Power State of VM
  • Allotted number of CPU
  • Allotted total memory
  • Connected Data store
  • Host Server
  • Host Cluster

368 views
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...Loading...