<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://powershell.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results for 'app:weblogs' matching tags 'Active Directory' and 'General Mgmt Tasks'</title><link>http://powershell.com/cs/search/SearchResults.aspx?q=app:weblogs&amp;tag=Active+Directory,General+Mgmt+Tasks&amp;orTags=0&amp;o=DateDescending</link><description>Search results for 'app:weblogs' matching tags 'Active Directory' and 'General Mgmt Tasks'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Use PowerShell to Reset the Secure Channel on a Desktop</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2012/03/02/use-powershell-to-reset-the-secure-channel-on-a-desktop.aspx</link><pubDate>Fri, 02 Mar 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15052</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: Learn three ways to use Windows PowerShell to reset the computer secure channel.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;img title="Hey, Scripting Guy! Question" border="0" alt="Hey, Scripting Guy! Question" align="left" src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/qanda/q-sm.jpg" width="34" height="34" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Hey, Scripting Guy! We have a problem with the computers in our computer classroom. We set up this classroom to teach new hires how to use our mission critical application. We are, however, not hiring as many people as we used to, and as a result it keeps getting longer and longer between classes. Now, we do not leave the computers turned on between classes, and often it takes an entire day to get the computers back on the domain when we decide to have another class. I researched the problem, and I have determined that the issue is with the computers being turned off for more than 30 days and the computers missing the secure channel password reset. Is there anything you can do to help?&lt;/p&gt;
&lt;p&gt;&amp;mdash;AP&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;img title="Hey, Scripting Guy! Answer" border="0" alt="Hey, Scripting Guy! Answer" align="left" src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/qanda/a-sm.jpg" width="34" height="34" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Hello AP,&lt;/p&gt;
&lt;p&gt;Microsoft Scripting Guy, Ed Wilson, is here. The great thing is that we released the &lt;a href="http://www.microsoft.com/en-us/server-cloud/windows-server/v8-default.aspx" target="_blank"&gt;Window Server &amp;ldquo;8&amp;rdquo; Beta&lt;/a&gt;, so I can finally talk about Windows Server &amp;ldquo;8&amp;rdquo; Beta just a little bit. I am sitting at my laptop sipping a cup of peach and hibiscus leaf tea (it is naturally sweet and caffeine free) and playing with Windows Server &amp;ldquo;8&amp;rdquo; Beta in a virtual machine. It is very cool&amp;mdash;especially from a Windows PowerShell perspective.&lt;/p&gt;
&lt;p&gt;AP, I have seen your problem many times. From firing up preconfigured servers, to starting up virtual machines that have been turned off for extended times, to desktop machines that are turned off for more than 30 days. In some countries (not the United States) where workers get several weeks of vacation, it is not uncommon for a worker to take four weeks off at a stretch. (This could also be the situation in a job share arrangement.) When the worker comes back, the computer does not talk to the domain.&lt;/p&gt;
&lt;p&gt;There are a couple of ways to handle this. One way is to increase the amount of time between the changes of the secure channel password (but I do not recommend this). Another way is to remove the computer from the domain, reboot the computer, join the computer to the domain, and reboot again. On my laptop (where it takes nearly 10 minutes for the laptop to become usable after a reboot), we are talking about a 30 minute process.&lt;/p&gt;
&lt;p&gt;There are other alternatives to this multiple reboot scenario. Each of these solutions could easily be placed into a Windows PowerShell script.&lt;/p&gt;
&lt;h2&gt;Use netdom to reset the secure channel&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc772217(v=WS.10).aspx" target="_blank"&gt;Netdom is a multipurpose tool&lt;/a&gt; that started life as a resource kit utility. It grew up, and was added to the operating system. The problem is that it is not a default part of the client operating system. In Windows Server&amp;nbsp;2008 and Windows Server&amp;nbsp;2008&amp;nbsp;R2, netdom is available when the Active Directory Domain Services role (AD&amp;nbsp;DS) is added. In Windows&amp;nbsp;7, access to netdom becomes available when you install the Remote Server Administration Tools (RSAT). The syntax can be a bit tricky with the forward slashes and colons, but it can be done from within Windows PowerShell. Make sure the Windows PowerShell console runs with admin rights prior to executing the command. A sample of the syntax is shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;netdom reset /d:devgroup.contoso.com mywksta&lt;/p&gt;
&lt;p&gt;The disadvantage to using netdom is that it is not likely to be available on client workstations unless the RSAT is installed.&lt;/p&gt;
&lt;h2&gt;Use Test-ComputerSecureChannel&lt;/h2&gt;
&lt;p&gt;The Active Directory module (&lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/01/the-easy-way-to-use-powershell-to-move-computer-accounts.aspx" target="_blank"&gt;see yesterday&amp;rsquo;s blog&lt;/a&gt;) contains a cmdlet named &lt;b&gt;Test-ComputerSecureChannel&lt;/b&gt;. When used, it returns a Boolean value if the secure channel is working properly. This use is shown in the following image.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/3515.hsg_2D00_3_2D00_2_2D00_12_2D00_01.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/3515.hsg_2D00_3_2D00_2_2D00_12_2D00_01.png" alt="Image of command output" title="Image of command output" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If the &lt;b&gt;Test-ComputerSecureChannel&lt;/b&gt; cmdlet returns False, use the &lt;i&gt;Repair &lt;/i&gt;switch to repair the secure channel. One way to automate this would be to create a scheduled task that executes on startup and runs the Windows PowerShell command that is shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;if(!(Test-ComputerSecureChannel)) {Test-ComputerSecureChannel -Repair}&lt;/p&gt;
&lt;p&gt;Of course there is one major problem with this approach: You need access to the Active Directory module. On a client computer running Windows&amp;nbsp;7, this means installing the RSAT. On the server, it means adding the AD DS role. On Windows&amp;nbsp;XP, it means you are out of luck. Of course, you can enter a remote Windows PowerShell session, load the Active Directory module, and use the cmdlet. But then of course, that is not checking the secure channel on the local machine, but rather the one on the server to which you just connected. There is no &lt;i&gt;ComputerName&lt;/i&gt; parameter available for the cmdlet.&lt;/p&gt;
&lt;p&gt;In the Windows Server &amp;ldquo;8&amp;rdquo; Beta, the &lt;b&gt;Test-ComputerSecureChannel&lt;/b&gt; shows up by default. It is already installed and available. In Windows PowerShell&amp;nbsp;3.0 (which is in Windows Server &amp;ldquo;8&amp;rdquo; Beta), I do not even need to load any special module because the module that contains the cmdlet loads automatically on first use. The image that is shown here illustrates using the &lt;b&gt;Test-ComputerSecureChannel&lt;/b&gt; in Window Server &amp;ldquo;8&amp;rdquo; Beta to test the secure channel.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/1212.hsg_2D00_3_2D00_2_2D00_12_2D00_02.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/1212.hsg_2D00_3_2D00_2_2D00_12_2D00_02.png" alt="Image of command output" title="Image of command output" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Therefore, if you have access to the &lt;b&gt;Test-ComputerSecureChannel &lt;/b&gt;cmdlet, it is certainly the easiest way to reset the secure channel.&lt;/p&gt;
&lt;h2&gt;Use Nltest&lt;/h2&gt;
&lt;p&gt;The &lt;a href="http://technet.microsoft.com/en-us/library/cc731935(v=WS.10).aspx" target="_blank"&gt;Nltest command&lt;/a&gt; will work inside Windows PowerShell, and it is installed by default on Windows&amp;nbsp;7 and Windows Server&amp;nbsp;2008&amp;nbsp;R2. To gain access to &lt;b&gt;nltest&lt;/b&gt; in Windows Vista or earlier versions of Windows it is necessary to &lt;a href="http://technet.microsoft.com/en-us/library/ee649281(WS.10).aspx" target="_blank"&gt;install the admin tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Because &lt;b&gt;nltest&lt;/b&gt; exists by default in Windows&amp;nbsp;7, Windows Server&amp;nbsp;2008&amp;nbsp;R2, and Windows Server &amp;ldquo;8&amp;rdquo; Beta, it is a good choice to use from an automation perspective. When you migrate everything to Windows Server &amp;ldquo;8&amp;rdquo; Beta (assuming that the &lt;b&gt;Test-ComputerSecureChannel&lt;/b&gt; cmdlet exists in the RTM product), it will be the easiest to use. There are lots of switches and various ways of using &lt;b&gt;nltest&lt;/b&gt;, but there is one command that will test the secure channel, and if it needs to be repaired, it will repair the channel. This command is shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;nltest /sc_verify:iammred&lt;/p&gt;
&lt;p&gt;The image that follows illustrates using the command and the output that arises from the command.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/6215.hsg_2D00_3_2D00_2_2D00_12_2D00_03.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/6215.hsg_2D00_3_2D00_2_2D00_12_2D00_03.png" alt="Image of command output" title="Image of command output" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;AP, that is all there is to using Windows PowerShell to reset the secure channel on workstations. Join me tomorrow for more Windows PowerShell coolness.&lt;/p&gt;
&lt;p&gt;I invite you to follow me on &lt;a href="http://bit.ly/scriptingguystwitter" target="_blank"&gt;Twitter&lt;/a&gt; and &lt;a href="http://bit.ly/scriptingguysfacebook" target="_blank"&gt;Facebook&lt;/a&gt;. If you have any questions, send email to me at &lt;a href="mailto:scripter@microsoft.com" target="_blank"&gt;scripter@microsoft.com&lt;/a&gt;, or post your questions on the &lt;a href="http://bit.ly/scriptingforum" target="_blank"&gt;Official Scripting Guys Forum&lt;/a&gt;. See you tomorrow. Until then, peace.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ed Wilson, Microsoft Scripting Guy&lt;/b&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=3484091" width="1" height="1" alt="" /&gt;</description></item><item><title>PowerShell Community and the Windows System Administration Tool</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2012/01/06/powershell-community-and-the-windows-system-administration-tool.aspx</link><pubDate>Fri, 06 Jan 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:13902</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;&lt;b&gt;Summary&lt;/b&gt;: See how guest blogger, Rich Prescott, leveraged the Windows PowerShell community as he built his popular ArPosh Client System Administration tool.&lt;/p&gt;
&lt;p&gt;Microsoft Scripting Guy, Ed Wilson, is here. We are really starting the new year off correctly. We have another very strong guest blogger today. Rich Prescott, is currently working as an infrastructure architect and Windows engineer at a large media company, with his main areas of focus on automation and Active Directory.&amp;nbsp;The automation responsibilities allow him to work with a wide-range of technologies including virtualization, storage, and monitoring.&amp;nbsp;He started learning Windows PowerShell in 2009 while he was working as a desktop engineer, and he is the lead scripting guy for his organization.&amp;nbsp;He is also a moderator on the &lt;a href="http://social.technet.microsoft.com/Forums/en-US/ITCG/threads" target="_blank"&gt;Official Scripting Guys Forum&lt;/a&gt;&lt;span style="text-decoration:underline;"&gt;,&lt;/span&gt; and was recently rewarded as a Microsoft Community Contributor.&lt;/p&gt;
&lt;p&gt;Blog: &lt;a href="http://blogs.technet.com/controlpanel/blogs/posteditor.aspx/blog.RichPrescott.com"&gt;Engineering Efficiency: Scripts, Tools, and Software New in the IT World&lt;/a&gt;&amp;nbsp;&lt;br /&gt; Twitter: &lt;a href="http://mce_host/controlpanel/blogs/posteditor.aspx/@Rich_Prescott"&gt;@Rich_Prescott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Take it away Rich&amp;hellip;&lt;/p&gt;
&lt;p&gt;When I first joined the IT world, I was working at the Help desk for a large company. Being new to IT and troubleshooting, I always wondered why there was no single tool for troubleshooting remote computers. I would receive a call about a computer being slow, and I would have to go through four tools to try to diagnose the issue. I began searching for an easy solution, and that is when a coworker introduced me to Windows PowerShell. After reading blog posts from &lt;a href="http://www.scriptingguys.com/blog" target="_blank"&gt;Hey, Scripting Guy!&lt;/a&gt; and the &lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/tags/scripting+wife/" target="_blank"&gt;Scripting Wife&lt;/a&gt;, I was writing basic scripts to gather the information that I needed for troubleshooting. This is an example of a basic script I wrote back then.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;$PC = &amp;ldquo;PC01&amp;rdquo;&lt;br /&gt; Get-WmiObject Win32_OperatingSystem &amp;ndash;ComputerName $PC&lt;br /&gt; Get-WmiObject Win32_StartupCommand &amp;ndash;ComputerName $PC&lt;br /&gt; Get-WmiObject Win32_Process &amp;ndash;ComputerName $PC&lt;/p&gt;
&lt;p&gt;After the underlying issue was targeted, I needed a way to remediate the issue, such as removing a hung process. This was possible remotely by querying the Win32_Process class on a remote computer, filtering for the process that was causing an issue, and invoking the &lt;b&gt;Terminate&lt;/b&gt; method. Here is an example of using the &lt;b&gt;Terminate&lt;/b&gt; method to stop a process on a remote computer.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;(Get-WmiObject Win32_Process &amp;ndash;ComputerName $PC |&lt;br /&gt; Where-Object {$_.Name &amp;ndash;eq &amp;ldquo;HungProcessName&amp;rdquo;}).Terminate()&lt;/p&gt;
&lt;p&gt;At last, I was able to efficiently troubleshoot issues remotely and even resolve some of them without ever having to leave my desk. As I became more familiar with Windows PowerShell, I thought, &amp;ldquo;Wouldn&amp;rsquo;t it be cool if I could share the efficacy of Windows PowerShell with others, even if they don&amp;rsquo;t know any scripting?&amp;rdquo; After a few months of researching, scripting, and testing GUI creation with Windows PowerShell, the &lt;a href="http://gallery.technet.microsoft.com/a5aff367-7b47-4b50-a2ef-20dcb4bb6d64" target="_blank"&gt;Arposh Client System Administration tool&lt;/a&gt; (ACSA) was released.&lt;/p&gt;
&lt;p&gt;As with any technology that you learn rapidly, when you look back on what you were doing a year ago, you think to yourself, &amp;ldquo;What was I thinking when I wrote that? I could write that in half the code and make it twice as fast.&amp;rdquo; So I set out to find resources to help me rebuild the script from scratch, and I used this opportunity to remove some of the prerequisites, make it compatible with servers, and improve the overall user experience.&lt;/p&gt;
&lt;h3&gt;PowerShellGroup - #PowerShell chat room&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt; One of the advantages of using Internet Relay Chat (IRC) is that there are chat rooms for almost any topic you can think of and when you are learning a new technology, having a live discussion can be really helpful. While revamping the ACSA tool, one of the user-experience features that I wanted to add was to give the user the ability to decide which feature sets to use through a configuration file.&lt;/p&gt;
&lt;p&gt;I joined the #PowerShell chat room on &lt;a href="http://powershellgroup.org/virtual/live" target="_blank"&gt;PowerShellGroup.org&lt;/a&gt;, and I asked about an easy way to give users configuration options. Jaykul, a Windows PowerShell MVP, responded with a way to read settings from an XML file. By using the following XML code and three lines of Windows PowerShell, a user is able to set a default domain to connect to when using the GUI. To have the GUI use the current domain of the logged on user, simply update the &lt;b&gt;Enabled&lt;/b&gt; option of the default domain to &amp;ldquo;False&amp;rdquo; in the XML configuration file.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;lt;Domain Default=&amp;quot;LDAP://DC=RU,DC=lab&amp;quot; Enabled=&amp;quot;True&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;In the first line of code, we use &lt;b&gt;Get-Content&lt;/b&gt; on the XML configuration file and specify that it is XML code by using [XML]. We then check to see if the default domain option is enabled, and if so, we set the &lt;b&gt;Domain&lt;/b&gt; variable to what is specified in the XML. If the option is disabled, the GUI sets the &lt;b&gt;Domain&lt;/b&gt; variable to the currently logged on domain.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;[XML]$XML = Get-Content &amp;ldquo;AWSA.Options.xml&amp;rdquo;&lt;br /&gt; &amp;nbsp;if($XML.Domain.Enabled &amp;ndash;eq $True){$Domain = $XML.Domain.Default}&lt;br /&gt; &amp;nbsp;else{$Domain = ([DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).Name}&lt;/p&gt;
&lt;h3&gt;TechNet Wiki&lt;/h3&gt;
&lt;p&gt;My next task was to make the GUI easy to use, and this meant removing any unnecessary pre-requisites included in the original release. My first stop was the &lt;a href="http://social.technet.microsoft.com/wiki/" target="_blank"&gt;TechNet Wiki&lt;/a&gt; to find a way to query Active Directory for computers without the need to import a Windows PowerShell module that was not freely available on all systems. After a quick search, I landed on a wiki contribution from Richard Mueller, another MVP, for &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/5392.aspx" target="_blank"&gt;ADSI searches&lt;/a&gt;, which showed me the syntax necessary to build my custom function.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;function Get-RPADComputer{&lt;br /&gt; &amp;nbsp; if($ComputerName -match &amp;quot;.&amp;quot;){$ComputerName = $ComputerName.Split(&amp;#39;.&amp;#39;)[0]}&lt;br /&gt; &amp;nbsp; $searcher=[adsisearcher]&amp;quot;(&amp;amp;(objectClass=computer)(name=$ComputerName*))&amp;quot;&lt;br /&gt; &amp;nbsp; $Properties = $XML.Options.Search.Property&lt;br /&gt; &amp;nbsp; $searcher.PropertiesToLoad.AddRange($Properties) &lt;br /&gt; &amp;nbsp;&amp;nbsp;$searcher.FindAll()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;This function checks the &lt;i&gt;$ComputerName &lt;/i&gt;parameter that is specified in the textbox of the GUI, and if a fully qualified domain name (FQDN) is specified, it translates it to a short name. It then creates a query that will search for any computers that match the new &lt;i&gt;$ComputerName&lt;/i&gt; variable. The third line reads a list of properties that the user specifies in the XML settings file and adds them to the list of properties to load. The final line of the function executes the query and returns the results.&lt;/p&gt;
&lt;h3&gt;TechNet forums&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt; After adding in the ability to set a default domain when launching the GUI, the user needed a way to change domains without having to edit the XML file and relaunch the script. I was not familiar enough with the ADSI scripting techniques that I found on the TechNet Wiki, and I decided to head over to the &lt;a href="http://social.technet.microsoft.com/Forums/en-us/ITCG/threads" target="_blank"&gt;Official Scripting Guys Forum&lt;/a&gt; on the &lt;a href="http://social.technet.microsoft.com/Forums/en-us/categories/" target="_blank"&gt;TechNet Forums&lt;/a&gt; and ask for some assistance.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/5ff7b8c0-9c32-44a3-8cc9-8859cd3dc691/" target="_blank"&gt;I posted my question&lt;/a&gt; with some examples of the input and output that I wanted, and within four hours, I received multiple responses from the community. And what do you know&amp;mdash;Richard Mueller again came to the rescue with a way to prompt for a domain and then convert the response into the LDAP path for that domain. By slightly tweaking his code, I was able to add the ability to search alternate domains to my custom Active Directory computer search function.&lt;/p&gt;
&lt;h3&gt;TechNet ScriptCenter&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt; There are many new features in this update of the GUI, but I want to highlight one that many administrators will find very useful and sigh at the mention of: local administrator rights. Every system administrator has received a request along the lines of, &amp;ldquo;I need to install XYZ software right now!&amp;rdquo; or &amp;ldquo;I am using VPN from home, and I need to add a local printer.&amp;rdquo; One way to get around this (not always the best way) is to grant the user temporary local administrator rights. To find out how to do this the Windows PowerShell way, I headed over to the &lt;a href="http://gallery.technet.microsoft.com/scriptcenter/" target="_blank"&gt;TechNet ScriptCenter Repository&lt;/a&gt; to search for some examples.&lt;/p&gt;
&lt;p&gt;Using the &lt;b&gt;Categories&lt;/b&gt; listing in the left pane, I drilled down into &lt;b&gt;Local Account Management&lt;/b&gt;, and I immediately saw what I was looking for: &lt;a href="http://gallery.technet.microsoft.com/scriptcenter/f75801e7-169a-4737-952c-1341abea5823" target="_blank"&gt;Local User Management Module&lt;/a&gt;. I clicked through to the details page and looked through the included functions. I was in luck! By using ADSI code in the &lt;b&gt;Set-LocalGroup&lt;/b&gt; function, I morphed it into my own function as shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;Function Add-LocalAdmin {&lt;br /&gt; &amp;nbsp;&amp;nbsp;[System.Reflection.Assembly]::LoadWithPartialName(&amp;#39;Microsoft.VisualBasic&amp;#39;) | Out-Null&lt;br /&gt; &amp;nbsp;&amp;nbsp;$Input = [Microsoft.VisualBasic.Interaction]::InputBox(&amp;quot;Enter a username to add (Domain\Username)&amp;quot;, &amp;quot;Add Local Admin&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt; &amp;nbsp;&amp;nbsp;$Group = [ADSI](&amp;quot;WinNT://&amp;quot; + $ComputerName + &amp;quot;/Administrators, group&amp;quot;)&lt;br /&gt; &amp;nbsp;&amp;nbsp;$Group.Add(&amp;quot;WinNT://&amp;quot; +$Input.Replace(&amp;lsquo;\&amp;rsquo;,&amp;rsquo;/&amp;rsquo;)&lt;br /&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;The first line of the function loads the Visual Basic assembly; this allows me to create a custom input box, which prompts the user for the username to add to the local administrators group and then stores it in the &lt;b&gt;$Input&lt;/b&gt; variable. The function then binds to the Administrators group on the remote computer using ADSI. Now we call the &lt;b&gt;Add&lt;/b&gt; method of ADSI to add the desired user account to the administrators group. But there is a snag, the username is specified as Domain\Username, whereas ADSI requires a forward slash. To get around this, we use the &lt;b&gt;Replace&lt;/b&gt; method to turn the back slash into a forward slash.&lt;/p&gt;
&lt;h3&gt;Arposh Windows System Administration tool&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt; Whether you are new to Windows PowerShell and only need a simple script to get you going or you are a Windows PowerShell guru and need a nudge in the right direction, there are numerous resources for everyone. Thanks to all of these resources, I was able to take a simple GUI that I created for myself to make tasks easier and improve it enough to where the Windows PowerShell community would also find it useful. Without further ado, here is the &lt;a href="http://gallery.technet.microsoft.com/Arposh-Windows-System-a1beb102" target="_blank"&gt;Arposh Windows System Administration tool&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/3666.hsg_2D00_1_2D00_6_2D00_12_2D00_1.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/3666.hsg_2D00_1_2D00_6_2D00_12_2D00_1.jpg" alt="Image of Arposh" title="Image of Arposh" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;~Rich&lt;/p&gt;
&lt;p&gt;I invite you to follow me on &lt;a href="http://bit.ly/scriptingguystwitter" target="_blank"&gt;Twitter&lt;/a&gt; and &lt;a href="http://bit.ly/scriptingguysfacebook" target="_blank"&gt;Facebook&lt;/a&gt;. If you have any questions, send email to me at &lt;a href="mailto:scripter@microsoft.com" target="_blank"&gt;scripter@microsoft.com&lt;/a&gt;, or post your questions on the &lt;a href="http://bit.ly/scriptingforum" target="_blank"&gt;Official Scripting Guys Forum&lt;/a&gt;. See you tomorrow. Until then, peace.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ed Wilson, Microsoft Scripting Guy&lt;/b&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=3473467" width="1" height="1" alt="" /&gt;</description></item></channel></rss>