<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Bruce Adamczak</title><subtitle type="html">I have spent years working in perfmon, so I thought I would share some tips and tricks on the tool!</subtitle><id>http://blogs.technet.com/b/bruce_adamczak/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/b/bruce_adamczak/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2013-02-12T21:52:00Z</updated><entry><title>Windows 2012 Core Survival Guide – Netmon capturing</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/05/03/windows-2012-core-survival-guide-netmon-capturing.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/05/03/windows-2012-core-survival-guide-netmon-capturing.aspx</id><published>2013-05-03T13:56:00Z</published><updated>2013-05-03T13:56:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;Netmon capturing&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;In this blog we are going to look at collecting a network capture using the NetSh.exe command.&amp;nbsp; This tool will produce an .etl trace that can be read in Netmon.&amp;nbsp; While in Netmon you will need to make the active parser "Windows" in order to parse the file correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;How to collect a network Trace&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;Command:&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif; font-size: small;"&gt;netsh trace start capture=yes tracefile=.\mytrace.etl maxsize=300&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;In the output below we have started collecting data in a 300mb Circular log. In order to review this data you will need to stop the collection and move the data to a box that has NetMon installed.&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3201.netmon1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3201.netmon1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;How to stop the network trace&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;Command:&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif; font-size: small;"&gt;netsh trace stop&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;In the output below we stopped the network trace.&amp;nbsp; Notice the location of the final output.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5556.Netmon2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5556.Netmon2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/span&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;Bruce&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff33cc; font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3570591" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="Netmon" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Netmon/" /></entry><entry><title>Windows 2012 Core Survival Guide – Perfmon capturing</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/04/15/windows-2012-core-survival-guide-perfmon-capturing.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/04/15/windows-2012-core-survival-guide-perfmon-capturing.aspx</id><published>2013-04-16T02:36:00Z</published><updated>2013-04-16T02:36:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Perfmon capturing&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;At this time there are no PowerShell commands for the management of perfmon.&amp;nbsp; PowerShell does have three commands for accessing perfmon counters: get-counter, export-counter, import-counter.&lt;/p&gt;
&lt;p class="Text"&gt;For this reason we will still need to use the old Logman.exe command to manipulate perfmon.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Seeing a list of defined data collectors&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logman query&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This command will list all of the data collector sets on the targeted server.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1805.perfmon1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1805.perfmon1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Viewing details on a single data collector set&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In order to view details on a single data collect set you must know the exact spelling.&amp;nbsp; If there is a space in the name you must place quotes around the name.&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logman query LogmanCapture&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3157.perfmon2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3157.perfmon2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;strong&gt;Creating a Data Collector Set&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;There are several ways to create a collector set.&amp;nbsp; The example below was selected because it can simply be copied and pasted without requiring any additional files.&amp;nbsp; This command will collect the necessary objects needed to do a quick performance analysis.&amp;nbsp;&amp;nbsp; To analyze this output you will need to move the blg file off of the core box onto a workstation with a GUI.&amp;nbsp; You can use Perfmon which ships with the OS to review the data manually or PAL (found at:&amp;nbsp; &lt;a href="http://pal.codeplex.com/"&gt;http://pal.codeplex.com/&lt;/a&gt;) which is a PowerShell script that can analyze the blg file based on Microsoft's recommended thresholds.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logman create counter LogmanCapture -v mmddhhmm -c &amp;nbsp;"\LogicalDisk(*)\*" "\Memory\*" "\Netlogon(*)\*" "\Paging file(*)\*"&amp;nbsp; "\PhysicalDisk(*)\*"&amp;nbsp; "\Process(*)\*" "\Processor(*)\*" "\System\*" -si 00:00:30 -f bincirc -o "c:\Perflogs\LogmanCapture_%computername%" -max 250&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7178.perfmon3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7178.perfmon3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;strong&gt;Starting the Data Collector Set&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logman start logmancapture&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Notice in the output below the data collector is orignially in the stopped state.&amp;nbsp; After the command has been run it is in the running state.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1104.perfmon4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1104.perfmon4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;strong&gt;Stopping the Data Collector Set&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logman stop logmancapture&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Notice the data collector below has gone from the running state to the stopped state.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5543.perfmon5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5543.perfmon5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff33cc; font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3566953" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Perfmon" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Perfmon/" /><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /></entry><entry><title>Windows 2012 Core Survival Guide – Firewalls</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/04/02/windows-2012-core-survival-guide-firewalls.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/04/02/windows-2012-core-survival-guide-firewalls.aspx</id><published>2013-04-03T02:14:00Z</published><updated>2013-04-03T02:14:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In this blog I am going to covers the very basic of viewing, enabling and disabling existing firewall rules.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view firewall settings&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;It is important to know the name of the rule you wish to enable or disable.&amp;nbsp; The Get-NetFirewallRule cmdlet is used to list out all of the rules.&amp;nbsp; You will need to know the exact spelling of the rules "Name" to manage a single rule or the exact spelling of the "DisplayGroup" to manage a group of rules.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command&lt;span style="font-family: comic sans ms,sans-serif;"&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-netfirewallrule | format-table name, displaygroup, action, direction, enabled -autosize&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The output below shows each rule, its Name, DisplayGroup, and if it is enabled or not.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8080.firewall1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8080.firewall1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Heading3Numbered"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;Discovering where the Firewall Logs are located&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Each firewall profile has a log.&amp;nbsp; In order to discover where they are located you can use the cmdlet Get-netfirewallprofile.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-netfirewallprofile | format-table name, enabled, logfilename -autosize&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The output below shows the location of the firewall logs.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3173.firewall2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3173.firewall2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;Displaying a single firewall rule settings&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In order to discover all properties of a rule you can use the cmdlet show-netfirewallrule.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Show-NetFirewallRule | where name -eq "CoreNet-DHCP-In"&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Or&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-NetFirewallRule | where name -eq "CoreNet-DHCP-In"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The screen shot below shows the attributes for the firewall rule "CoreNet-DHCP-In".&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3750.firewall3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3750.firewall3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Heading2Numbered"&gt;&lt;strong&gt;How to enable a single firewall rule&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To enable a firewall rule, we first get the object then pipe it to the enable-firewallrule cmdlet.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-NetFirewallRule -name CoreNet-DHCP-In | enable-netfirewallrule&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The output below shows that CoreNet-DHCP-In starts off disabled then is enabled by the command in yellow.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0272.firewall4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0272.firewall4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Heading2Numbered"&gt;&lt;strong&gt;How to disable a single firewall rule&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To disable a firewall rule we first get the object then pipe it to the disable-firewallrule cmdlet.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-NetFirewallRule -name CoreNet-DHCP-In | disable-netfirewallrule&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The output below shows that CoreNet-DHCP-In starts off enabled then is disabled by the command in yellow.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0488.firewall5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0488.firewall5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Heading2Numbered"&gt;&lt;strong&gt;How to enable a DisplayGroup of firewall rules&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To enable a DisplayGroup of firewall rules you must know the exact spelling of the display group and use the Enable-NetfirewallRule cmdlet.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Enable-NetFirewallRule -DisplayGroup "Remote Desktop"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The screen shot below shows the current value, followed by the command to edit the value, followed by a command to confirm the settings have been changed.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1207.firewall6.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1207.firewall6.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Heading2Numbered"&gt;&lt;strong&gt;How to disable a DisplayGroup of firewall rules&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To disable a DisplayGroup of firewall rules you must know the exact spelling of the display group and use the disable-NetfirewallRule cmdlet.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Disable-NetFirewallRule -DisplayGroup "Remote Desktop"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;In the screen shot below the first command shows the current value, followed by the command to disable the Remote Desktop firewall rules, followed by the command to confirm the setting changed.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7484.firewall7.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7484.firewall7.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff33cc; font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3562934" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="Firewall" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Firewall/" /></entry><entry><title>Windows 2012 Core Survival Guide – Event Logs</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/17/windows-2012-core-survival-guide-event-logs.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/17/windows-2012-core-survival-guide-event-logs.aspx</id><published>2013-03-18T02:58:00Z</published><updated>2013-03-18T02:58:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0000ff;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This blog looks at how to manage event logs.&amp;nbsp; The key to using PowerShell to manage any event log is to know the exact spelling of the event log you wish to manager.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view a list of event logs&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To get a list of the event logs I will use the Get-Eventlog cmdlet.&amp;nbsp; This is one of those cmdlet where piping it to formant-list does not really change the output.&amp;nbsp;&amp;nbsp; So I left it off.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-Eventlog -list&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below displays a list of event logs active on this computer.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6371.event1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6371.event1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view events in an event log&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Because event logs hold many events, it does not make sense to simply list all the event in the log. &amp;nbsp;Below are several different ways to view parts of the event log.&lt;/p&gt;
&lt;p class="Text"&gt;Viewing events for the last hour&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-eventlog system -after (get-date).addhours(-1)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the last hour of events in the System Log.&amp;nbsp; You can replace "System" for any of the other event logs.&amp;nbsp; You can also modify the value in ".addhours" to have a larger value like "(-12)" for the last 12 hours.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7380.event2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7380.event2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Viewing events by event type&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This command only shows the error events for the last hour.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-eventlog system -after (get-date).addhours(-1) | Where entrytype -eq Error&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;In the command above you can replace "Error" with "Information" or "Warning"&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4604.event3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4604.event3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Viewing events by event source&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This command show you only the events for the source of "NETLOGON"&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text"&gt;Get-eventlog system -after (get-date).addhours(-1) | Where Source -eq NetLogon&lt;/p&gt;
&lt;p&gt;You can replace "NETLOGON" with the name of any source:&amp;nbsp; for example "volmgr".&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4341.event4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4341.event4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Viewing events by event index&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Once you have narrowed down the event you wish to review, take note of the index number.&amp;nbsp; You can display all of the details of that event based on the index number.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-Eventlog System | where index -eq 5630 | format-list *&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0184.event5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0184.event5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to export event log to an CSV file&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;It is often easier to review events by viewing them in a tool like notepad.&amp;nbsp; You can export any event log to a text file.&lt;/p&gt;
&lt;p&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-eventlog system | export-csv -path system.csv&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows that the event log was written to system.csv (opened in Notepad).&amp;nbsp; Excel will be the better tool for reviewing the data.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8737.event6.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8737.event6.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to clear event log&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Clear-Eventlog "Windows PowerShell" -clear&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In the output below, notice the number of entries for the Windows PowerShell log is 392.&amp;nbsp; After the Clear-Eventlog cmdlet has been run the number of entries is zero.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3480.event7.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3480.event7.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3559213" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="Event Logs" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Event+Logs/" /></entry><entry><title>Windows 2012 Core Survival Guide – User Functions</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/10/windows-2012-core-survival-guide-user-functions.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/10/windows-2012-core-survival-guide-user-functions.aspx</id><published>2013-03-11T01:00:00Z</published><updated>2013-03-11T01:00:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0000ff;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This blog is going to cover some user functions like logging off, shutting down the OS, and launching Task Manager without the GUI.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to log off&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The Logoff command is not a native PowerShell cmdlet but it works from PowerShell.&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Logoff&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The screen shot below shows the user logging off their current session.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2642.userfunction1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2642.userfunction1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to restart server&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To restart the computer you can use the PowerShell cmdlet Restart-computer.&amp;nbsp; The computer will shut down and restart using this cmdlet.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Restart-computer&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The command below will immediately restart the computer.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3288.userfunciton2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3288.userfunciton2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to shutdown server&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;You can power off the computer using the PowerShell cmdlet Stop-Computer.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Stop-computer&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The command below will immediately shutdown and power off the computer.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6740.userfunciton3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6740.userfunciton3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;strong&gt;How to bring up Task Manager&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Windows Server 2012 core includes Task Manager.&amp;nbsp; At any time you can simply type Ctrl-Shift-ESC to start the task manager.&amp;nbsp; There is also a command line, and way to launch it from within PowerShell&lt;/p&gt;
&lt;p class="Text"&gt;Command Line:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Taskmgr.exe&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Start-Process Taskmgr&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the PowerShell method for starting Task Manager.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0207.userfunciton4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0207.userfunciton4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3557718" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Restart Computer" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Restart+Computer/" /><category term="Log off" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Log+off/" /><category term="Task Manager" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Task+Manager/" /></entry><entry><title>Windows 2012 Core Survival Guide – Managing Services</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/03/windows-2012-core-survival-guide-managing-services.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/03/03/windows-2012-core-survival-guide-managing-services.aspx</id><published>2013-03-04T03:32:00Z</published><updated>2013-03-04T03:32:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Managing Services&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This module is going to look at how to manage services.&amp;nbsp; The key to using PowerShell to manage any service is to know the exact spelling of the service name.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;How to list services&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-service | Format-table -autosize&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below show each services status, name and display name.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8664.service1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8664.service1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;How to view a single service&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;You can use the "NAME" of the service to display a single service's information.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-service | where name -eq BITS |Format-list&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In the output below we use the format-list (or fl) to show all of the service's attributes.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6740.service2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6740.service2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;&lt;span style="font-size: medium;"&gt;How to start a single service&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;To start a service there is a simple PowerShell cmdlet called Start-Service.&amp;nbsp; &lt;br /&gt; Below I use it to start the BITS service.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Start-Service -name BITS&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the current status of the service, followed by the command to start the service (in yellow), and followed by a command to confirm the status.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1070.Service3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1070.Service3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;How to stop a service&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Stopping a service is easy too.&amp;nbsp; I use the Stop-Service cmdlet below to stop the BITS services.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Stop-Services -name BITS&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the current status of the service, followed by the command to stop the service, and followed by a command to confirm the status.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7587.service4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7587.service4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;How view a Service Startup Type&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In order to view the startup type I had to make a WMI call.&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-wmiobject win32_service | where Name -eq WinRM&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;In the screen shot below "StartMode" is the startup type of the service and it is set to disabled.&amp;nbsp; There are 3 possible values for this setting Manual, Automatic, and Disabled.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8015.service5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8015.service5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;&lt;span style="font-size: medium;"&gt;How to change the Service Startup Type&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The Set-Service cmdlet has three possible settings for "-StartupType" flag: Automatic, Disabled, and Manual.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Set-Service -name WinRM -StartupType Automatic&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the current status, followed by the command to disable the WinRM service, and followed by the command to confirm the change.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4532.service6.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4532.service6.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3556160" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Services" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Services/" /></entry><entry><title>Windows 2012 Core Survival Guide – Date and Time settings</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/23/windows-2012-core-survival-guide-date-and-time-settings.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/23/windows-2012-core-survival-guide-date-and-time-settings.aspx</id><published>2013-02-24T03:10:00Z</published><updated>2013-02-24T03:10:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Date and Time settings&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This blog is going to cover the basic of viewing and changing your time settings. &amp;nbsp;If you are like me I seem to always forget to set the correct time zone and need to correct it after the install.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view Date and Time settings&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Viewing the date and time is very strait forward.&amp;nbsp; This is one of the simplest PowerShell cmdlet to work with.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-Date&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;Or&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Get-Date | format-list *&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In the sample output below I demonstrate both of the above commands.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5141.time1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5141.time1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to change Date and time setting&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I am not sure why, but this one took me some time to figure out. &amp;nbsp;None of the examples on the Get-Help showed the syntax for just setting the date and time.&amp;nbsp; Below is the syntax I used to set the date and time on this computer.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Set-date "12/12/2012 10:30 PM"&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the time was changed.&amp;nbsp; Keep in mind that domain joined computers by default will sync their time from a domain controller. This can make your time change short lived.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4774.time2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4774.time2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to View the current Time Zone&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I had to use WMI calls to get the time zone. &amp;nbsp;Below is the syntax I used.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&amp;nbsp;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;(Get-WmiObject win32_timezone).caption&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;As you can see below this command show you what time zone this computer is in.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8764.time3a.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8764.time3a.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to Change the Time zone setting&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I searched for a simple one line method in PowerShell to set the time zone and came up empty.&amp;nbsp; The only easy way I found to do this in a one liner is using a command line utility tzutil.exe.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;TZUTIL /s "US Eastern Standard Time"&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6177.time4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/6177.time4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;How to get a complete list of Time Zones&lt;/p&gt;
&lt;p class="Text"&gt;Command&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;TZUTIL /l &amp;gt; timezone.txt&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Notepad timezone.txt&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;Since this output is large and scrolls off the screen I piped it to an output text file and opened the file with notepad&lt;/p&gt;
&lt;p class="Text"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5165.time5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/5165.time5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/p&gt;
&lt;p class="Text"&gt;Bruce&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3554633" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Date and Time" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Date+and+Time/" /></entry><entry><title>Windows 2012 Core Survival Guide – Computer Name Setting</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/18/windows-2012-core-survival-guide-computer-name-setting.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/18/windows-2012-core-survival-guide-computer-name-setting.aspx</id><published>2013-02-19T00:55:00Z</published><updated>2013-02-19T00:55:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Computer Name Setting&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This blog is going to cover the basic of viewing and changing your computer name.&amp;nbsp; Setting the computer name is an option when you are installing the OS, or you can let the installer auto name your server.&amp;nbsp; If for some reason you need to rename your computer it can be done using PowerShell.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view computer name&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I view the computer name by looking at the environment variable "ComputerName".&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text"&gt;Get-Content ENV:Computername&lt;/p&gt;
&lt;p class="Text"&gt;In the sample output below I see that this computer name is "CORETEST1"&lt;/p&gt;
&lt;p class="Text"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2211.rename1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2211.rename1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to change computer name&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;I change the computer name by using the Rename-Computer cmdlet. &amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text"&gt;Rename-Computer -NewName MyCoreBox -restart&lt;/p&gt;
&lt;p class="Text"&gt;In the output below we see that this computer is rename from "CORETEST1" to MyCoreBox.&amp;nbsp; Since the box reboots with this command I have to capture a second screen shot after the reboot to confirm the setting.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8015.rename2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8015.rename2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Screen shot after reboot&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1616.rename3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1616.rename3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/span&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;Bruce&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3553448" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Computer Rename" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Computer+Rename/" /></entry><entry><title>Windows 2012 Core Survival Guide – Joining the Domain</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/14/windows-2012-core-survival-guide-joining-the-domain.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/14/windows-2012-core-survival-guide-joining-the-domain.aspx</id><published>2013-02-15T02:38:00Z</published><updated>2013-02-15T02:38:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Joining the Domain&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Everybody at some point will need to join their computers to the domain.&amp;nbsp; This blog will cover the basics of viewing your settings, joining the domain and removing your computer from the domain.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to view Domain Settings&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;We can view the domain name by using a WMI object Win32_ComputerSystem.&amp;nbsp; I still looking for a good way to do this native with PowerShell 3.0&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;(Get-WmiObject Win32_ComputerSystem).domain&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below shows the domain name of the computer.&amp;nbsp; In this case it is "WORKGROUP"&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8358.domain1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8358.domain1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to join the computer to the Domain&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;By joining your computer to the domain you will get all of the benefits that the domain has to offer.&amp;nbsp; The PowerShell cmdlet we use is &amp;ldquo;Add-computer&amp;rdquo;.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Add-computer -DomainName Contoso.com -Credential Contoso\Administrator -Restart&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below of the first command shows the current domain name of the computer.&amp;nbsp; In this case it is "WORKGROUP".&amp;nbsp; The second command joins the computer to the domain Contoso.com.&amp;nbsp; In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to join.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3652.domain2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3652.domain2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to Join a Domain and place the computer in an Organizational Unit (OU)&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Most corporations have well defined OU structures and do not want computer objects place in the default folder.&amp;nbsp; By placing the computer object in the correct OU saves you time.&amp;nbsp; Below is the cmdlet that will help us with that.&amp;nbsp; You must know the complete distinguished name (spelling counts here) of the OU you wish to place the computer into.&amp;nbsp; If the distinguished name has any spaces in it you must quote the entire name.&amp;nbsp; I found it makes my life easier to always quote the distinguished name.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Add-computer -DomainName Contoso.com -OUPath "OU=Servers, OU=Assets,DC=Contoso,DC=COM" -Credential Contoso\Administrator -Restart&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;The output below of the first command shows the current domain name of the computer.&amp;nbsp; In this case it is "WORKGROUP".&amp;nbsp; The second command joins the computer to the domain Contoso.com in the OU "Servers".&amp;nbsp; In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to join.&amp;nbsp; The computer will reboot when the command is completed.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1234.domain3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1234.domain3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to leave a Domain&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;When you leave a domain you default back to the &amp;ldquo;Workgroup&amp;rdquo;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;p class="Text" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Remove-Computer -UnjoinDomaincredential Contoso\Administrator -Passthru -Verbose -Restart&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;The output below of the first command shows the current domain name of the computer.&amp;nbsp; In this case it is "Contoso.Com".&amp;nbsp; The second cmdlet will remove it from the domain.&amp;nbsp; In addition, the second command will prompt you for credentials of an account with domain join privileges in the domain you are trying to leave.&amp;nbsp; Finally when the command completes the computer will reboot.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4722.domain4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/4722.domain4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3443.domain5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3443.domain5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment.&amp;nbsp; Let me know if there are any core tasks you would like me to cover.&lt;/span&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;Bruce&lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3552725" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Domain Join" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Domain+Join/" /></entry><entry><title>Windows 2012 Core Survival Guide – Remote Desktop</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/12/windows-2012-core-survival-guide-remote-desktop.aspx" /><id>http://blogs.technet.com/b/bruce_adamczak/archive/2013/02/12/windows-2012-core-survival-guide-remote-desktop.aspx</id><published>2013-02-13T02:52:00Z</published><updated>2013-02-13T02:52:00Z</updated><content type="html">&lt;p class="Text"&gt;&lt;a href="http://aka.ms/2012coreSG1"&gt;&lt;span style="color: #0563c1; font-size: x-small;"&gt;Learn about my 2012 Core Survival Guide&amp;nbsp;here.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Remote Desktop&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This is one of the more complex settings to get correct.&amp;nbsp; For remote desktop to work you need to have two registry keys and a firewall rule set up correctly.&amp;nbsp; If the registry key does not exist you will receive an error when you try to view or set it with PowerShell.&amp;nbsp; Remote Desktop is disabled if either of the following two settings are true:&lt;/p&gt;
&lt;p class="Text"&gt;fDenyTSConnections = 1&lt;/p&gt;
&lt;p class="Text"&gt;Remote Desktop application firewall rule is disabled&lt;/p&gt;
&lt;p class="Text"&gt;If "UserAuthentication" has a value of 1 indicates that only secured connections will be used.&amp;nbsp;&lt;/p&gt;
&lt;p class="Heading3Numbered"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;How view current Remote Desktop settings&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;fDenyTSConnections is the registry key that enables or disables Remote Desktop. A value of zero indicates that Remote Desktop is being allowed.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="Code" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections&lt;/span&gt;"&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;If you receive an error it indicates the property does not exist or you typed the command in correctly.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7484.desktop1.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7484.desktop1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;UserAuthentication is the registry key that will enable secure connections. A value of one indicates that Remote Desktop will only use Secure Connections.&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="Code" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;Once again if you receive an error it indicates the property does not exist or you typed the command in correctly.&lt;/p&gt;
&lt;div&gt;
&lt;p class="Code"&gt;&lt;span style="font-family: Times New Roman;"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7266.desktop2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/7266.desktop2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;If the Remote Desktop Firewall Rules is "Enabled", like in the screen shot below, then the firewall rules will allow remote desktop to work.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="Code" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;get-netfirewallrule -DisplayGroup "Remote Desktop" | format-table Name, Enabled -autosize&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The screen shot below show that the firewall rules are correct for remote desktop.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8765.desktop3.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8765.desktop3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to enable Remote Desktop settings&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Setting fDenyTSConnections registry key&lt;/strong&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;If key does not exist this is the command to use.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 -PropertyType dword&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;In the screen shot below you see the current value, followed by the command to modify the value (in yellow), then followed by the command to confirm the setting.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0572.desktop4.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/0572.desktop4.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to enable Remote Desktop Firewall Rules&lt;/strong&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="Code" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Enable-NetFirewallRule -DisplayGroup "Remote Desktop"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;In the screen shot below you see the current value, followed by the command to change it, then followed by a command to confirm the settings have been changed.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3022.desktop5.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/3022.desktop5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to enable Secured Remote Desktop Session&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;This setting determines if all connections are allowed or only Secured Connections.&amp;nbsp; A value of 1 for this setting indicates that only Secured Connections.&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;If key does not exist this is the command to use.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1 -PropertyType dword&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The screen shot below shows the command to view the current setting, followed by the command to modify the setting value (in yellow), then followed by the command to confirm the setting change.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2063.desktop6.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/2063.desktop6.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to Disable Remote Desktop&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;Setting fDenyTSConnections registry key&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 1&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;If the key did not exist you can use this command to create the key and set the value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;PowerShell Command:&lt;/span&gt;&lt;/p&gt;
&lt;div style="padding-left: 30px;"&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Net-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 1 -PropertyType dword&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;The screen shot below shows the command to view the current setting, followed by the command to modify the setting value (in yellow), then followed by the command to confirm the setting change.&lt;/p&gt;
&lt;p class="Text"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8640.desktop7.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/8640.desktop7.JPG" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;&lt;strong&gt;How to disable Remote Desktop Firewall Rules&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="Text"&gt;PowerShell Command:&lt;/p&gt;
&lt;div&gt;
&lt;p class="CodeinList1" style="padding-left: 30px;"&gt;&lt;span style="font-family: comic sans ms,sans-serif;"&gt;Disable-NetFirewallRule -DisplayGroup "Remote Desktop"&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p class="Text"&gt;In the screen shot below the first command shows the current value, followed by the command to disable the Remote Desktop firewall group, then followed by the command to confirm the setting changed.&lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1524.desktop8.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-50/1524.desktop8.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;I hope you found this useful.&amp;nbsp; Please leave me a comment&lt;/span&gt;&lt;/p&gt;
&lt;p class="text0"&gt;&lt;span style="font-size: small;"&gt;Bruce&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3552105" width="1" height="1"&gt;</content><author><name>Bruce Adamczak</name><uri>http://blogs.technet.com/badamczak_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows Server 2012" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Windows+Server+2012/" /><category term="Core" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Core/" /><category term="Survival Guide" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Survival+Guide/" /><category term="PowerShell" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/PowerShell/" /><category term="Remote Desktop" scheme="http://blogs.technet.com/b/bruce_adamczak/archive/tags/Remote+Desktop/" /></entry></feed>