Showing posts with label Windows Server. Show all posts
Showing posts with label Windows Server. Show all posts

Saturday, October 13, 2012

How to shutdown, or reboot, a remote Windows Machine


Need to shutdown a remote machine?  The fastest easiest way is to use the Shutdown command from a command prompt to open up the shutdown dialog. 

Use the /i switch to do so:
 
 
When you hit enter the Shutdown dialog will pop open.  Enter in one or more remote machines to shutdown or reboot, select the additional options, and then click ok:
 

 
It is also possible to run these same commands through a bat file or or command prompt without the need for the user interface.  Reference an earlier article I wrote about Shutting Down a Local Machine, or reference the Technet articles below.
 

 



How to shutdown local machine throuh a command prompt

Need to shutdown, or reboot, your pc from a command prompt?  Use the shutdown command!

To Reboot the Machine simply just use the /r switch:
   shutdoown /r

or to shutdown the machine use the /s switch:
   shutdown /s

This command works on all servers Windows 2000 and forward.  It also works for Windows 2000 pc's and newer.

Need more options?  Technet has a few articles that help you to logoff, restart, shutdown, hibernate, specify the reason for the restart or shutdown, etc.


Technet Links
http://technet.microsoft.com/en-us/library/bb491003.aspx
http://technet.microsoft.com/en-us/library/cc732503(v=WS.10).aspx



Friday, October 12, 2012

View Server or PC information for local or remote machine

Ever need to quickly get detailed information about your local Windows PC or Windows Server.  The systeminfo command to the rescue.  With this command you can retrieve local or remote system info in just seconds either manually or programmatically.

Here are the basics:
systeminfo /s [remote server name]
or
systeminfo

This info can be extremely helpful when needing to view or send detailed info to a tech support person.  I have also used it built into a slick tool that pulls down network pc/server details into central database application.

Below is a TechNet article with more details if you need them.

technet article for more details:
http://technet.microsoft.com/en-us/library/bb491007.aspx

Tuesday, October 9, 2012

Windows 2008 R2 Server Hangs on Reboot


Have you noticed recently that your Windows 2008 R2 Server seems to hang or delay during the first logon after a reboot? 

Are you running a Windows 2008 R2 Server with backup software that leverages VSS snapshots.  Whether you are snapshoting VHD files, or Echange or SQL Server inside a Windows 2008 R2 server you could be at risk.

We battled this issue for weeks not knowing what the issue might be.  We first noticed it on our Exchange 2010 server which we have a backup process snapshoting using VSS several times a day.  The first time we noticed it the Exchange Server took about 30 mins to boot up.  We thought that maybe it was a dirty shutdown and the logs needed to replay or something.  Then the following reboot attempts over the coming weeks created longer and longer delays.

We worked with Microsoft Professional Services and then Premiere Services for many hours over several days to try to diagnose the issue.  We were sent from the Exchange team, to the Windows Server team, to the AD team, and even to their performance team and eventually it was by chance we found an article talking about this same issue. 

The article showed us how to clean up the issue and then prevent it from happening again as a two step process.  The long and short of it is that when using a VSS backup utility, such as Microsoft's DPM or Backup Exec, a snapshot of the vhd or volume is created and then reconnected to the server so it can clean it up before storing it away as a backup.  This second copy creates a record in the registry and acts like an additional plug-and-play device ... just like a USB stick or camera or something.  Every time you run your backup the registry hive increases, and every time you reboot your machine and logon the OS cycles through all of the plug-and-play registry records trying to reconnect or time-out.  The OS seems to work fine somewhere under 6000 devices, but we were sitting around 18,881 orphaned devices which was causing our huge delay as it waited to time-out on each device.

You can take a look at your registry to see if this might be happening to you.  Here is where I would look.  If you have a ton of records in these folders you may have an issue:
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\
  • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Storage\Volume\
  • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\
Microsoft Hotfix (KB982210) was created to stop this creation of plug-and-play device records to be added to the registry, but it doesn't clean up any orphanded records that still exist.  To do that they released some code called DevNodeClean that you would have to compile yourself to identify and remove the records.  There are also sites out there that have done the compiling of this code for you.  We used the solution provided by Byte Solutions.

  1. Download DevNodeClean (this is the x64 version)
  2. Open a command prompt with elivated privledges and navigate to the folder you downloaded the application to.
  3. To see the list and a count of the phantom devices run DevNodeClean.x64.exe (this won't remove anything)
  4. To remove phanom devices run DevNodeClean.x64.exe /r (for 18,800 it took about 90 mins)
  5. Once you have removed the phantom devices then download and install Microsoft Hotfix KB982210

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Blog created to serve as a collection of online notes as well as to provide more breadcrumbs for helpful topics that may be difficult to find.