<?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> &#187; Reboot a Server</title>
	<atom:link href="http://benchmarkitconsulting.com/tag/reboot-a-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://benchmarkitconsulting.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 16:34:05 +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>Rebooting a Server Using PowerShell</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 17:43:05 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Reboot a Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1337</guid>
		<description><![CDATA[The more I work with PowerShell the more I love it So what do you do if you&#8217;re in a VM environment and you want/need to reboot your server but you can&#8217;t connect via RDP and you can&#8217;t connect to the console using the VM Infrastructure Client, and all other attempts to connect just don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>The more I work with PowerShell the more I love it <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-1338" title="love4" src="http://benchmarkitconsulting.com/wp-content/uploads/2010/02/love4.jpg" alt="love4" width="180" height="180" /></p>
<p>So what do you do if you&#8217;re in a VM environment and you want/need to reboot your server but you can&#8217;t connect via RDP and you can&#8217;t connect to the console using the VM Infrastructure Client, and all other attempts to connect just don&#8217;t work.  I decided to go down the route of using PowerShell.</p>
<p>$ServerToRestart = Get-WMIObject win32_operatingsystem -computer <strong>&lt;&lt;Your Server Name Here&gt;&gt;</strong><br />
$ServerToRestart.reboot()</p>
<p>Get-WMIObject &#8211; <a href="http://technet.microsoft.com/en-us/magazine/2007.05.powershell.aspx?pr=blog" target="_blank">Windows PowerShell: The WMI Connection</a></p>
<p>Simple, easy and very dangerous/powerful.  I&#8217;ll channel my inner &#8220;Uncle Ben&#8221; (see Spiderman quotes) and just leave this message as a closing thought:</p>
<p>&#8220;With Great Power Comes Great Responsibility&#8221;</p>
<p>Enjoy!!</p>
<p><a href="http://benchmarkitconsulting.com" target="_blank"><img class="alignnone size-full wp-image-402" title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a><a href="http://sqlserverpedia.com/wiki/Editors#Colin_Stasiuk" target="_blank"><img src="http://sqlserverpedia.com/badges/SQLServerPedia_Badge_Blogger.jpg" alt="" width="120" height="60" /> </a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Rebooting+a+Server+Using+PowerShell+http://tinyurl.com/yzrc5d5" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/&amp;title=Rebooting+a+Server+Using+PowerShell" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/&amp;title=Rebooting+a+Server+Using+PowerShell" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/&amp;title=Rebooting+a+Server+Using+PowerShell" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2010/02/01/rebooting-a-server-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

