<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/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>Revelations of a Confused Mind : Command Line</title><link>http://blogs.technet.com/shawnt/archive/tags/Command+Line/default.aspx</link><description>Tags: Command Line</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Powershell Sample Cmdlets - One-liners with a Punch!</title><link>http://blogs.technet.com/shawnt/archive/2008/09/26/powershell-sample-cmdlets-one-liners-with-a-punch.aspx</link><pubDate>Sat, 27 Sep 2008 03:32:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3129231</guid><dc:creator>shawnt</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/shawnt/comments/3129231.aspx</comments><wfw:commentRss>http://blogs.technet.com/shawnt/commentrss.aspx?PostID=3129231</wfw:commentRss><description>&lt;P&gt;Managing and troubleshooting Windows Clients and Servers is what Powershell is all about. And, the quickest way to get started is by learning a few simple Powershell cmdlets. Powershell cmdlets are short one-line commands that are specifically designed to help IT Professionals with their day to day tasks. There are a only a handful of cmdlets in a default installation of Powershell 1.0 (more can be added by installing additional cmdlet providers). To find out which cmdlets ship in Powershell 1.0, simply type "get-command" into your Powershell command prompt. Then, you can use "get-help" to learn more about each individual cmdlet. There! Now you know your first two cmdlets! You're off and running. &lt;/P&gt;
&lt;P&gt;If you have been to one of my &lt;A href="http://www.technetevents.com/" mce_href="http://www.technetevents.com"&gt;TechNet Events&lt;/A&gt; lately, you've seen some cmdlets in action. Some examples of what Powershell cmdlets can do include:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;List the hotfixes on the local or remote computer.&lt;/LI&gt;
&lt;LI&gt;Browse the registry hive in a command prompt interface.&lt;/LI&gt;
&lt;LI&gt;Find your BIOS version, CPU speed (as well as current clock speed), and physical memory information.&lt;/LI&gt;
&lt;LI&gt;Find ALL of the scheduled tasks that run on Windows, including the ones that are hidden in the GUI.&lt;/LI&gt;
&lt;LI&gt;Install a software package on a Remote Machine. (BTW, modify the cmdlet into a slightly more advanced Powershell script file, and you could automate software installation on 1000's of machines at once.)&lt;/LI&gt;
&lt;LI&gt;Query free disk space from local or remote machines.&lt;/LI&gt;
&lt;LI&gt;Query Network Adapter details from local or remote machines.&lt;/LI&gt;
&lt;LI&gt;MUCH, MUCH more.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;To start using the attached sample cmdlets:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Install &lt;A href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx" mce_href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx"&gt;Powershell 1.0&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Download and extract &lt;A id=bp___v___r___postlist___EntryItems_ctl00_Attachment___DownLoadLink href="http://blogs.technet.com/shawnt/attachment/3129231.ashx"&gt;&lt;FONT color=#b9b5c7&gt;PowershellSampleCmdlets.zip&lt;/FONT&gt;&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;Copy and paste any of the non-commented lines (i.e. any line without a "#" in front of it) into your Powershell command prompt. &lt;/LI&gt;
&lt;LI&gt;Watch the results!&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;EM&gt;Be careful! Some of the cmdlets may do things you do not want, like stop necessary services, so run them at your own risk. To mitigate the risk, the dangerous cmdlets have -confirm switches, so you will be prompted before any bad stuff happens, but that's all the warning you'll get.&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3129231" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/shawnt/attachment/3129231.ashx" length="8578" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/shawnt/archive/tags/Management/default.aspx">Management</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Powershell/default.aspx">Powershell</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Command+Line/default.aspx">Command Line</category></item><item><title>Sometimes Security through Simplicity Isn't So Simple</title><link>http://blogs.technet.com/shawnt/archive/2008/02/01/sometimes-security-through-simplicity-isn-t-so-simple.aspx</link><pubDate>Fri, 01 Feb 2008 11:14:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2808586</guid><dc:creator>shawnt</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/shawnt/comments/2808586.aspx</comments><wfw:commentRss>http://blogs.technet.com/shawnt/commentrss.aspx?PostID=2808586</wfw:commentRss><description>&lt;P&gt;Dr. Thomas Shinder makes some excellent points about how difficult it can be to enact good security. Even something as seemingly straightforward as installing Windows Server 2008 Core to reduce your attack surface can harbor hidden perils. What hidden perils? Well, misconfigurations are inherently more common when managing a server strictly though the command-line interface (CLI). But, the good doctor says it far more eloquently than me. Check out this post as well as several other high quality posts on Dr Shinder's Windows Security blog.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.windowsecurity.com/shinder/2008/01/29/server-core-management-a-potential-security-issue/" mce_href="http://blogs.windowsecurity.com/shinder/2008/01/29/server-core-management-a-potential-security-issue/"&gt;http://blogs.windowsecurity.com/shinder/2008/01/29/server-core-management-a-potential-security-issue/&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2808586" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/shawnt/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Management/default.aspx">Management</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Command+Line/default.aspx">Command Line</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>How to Use the Powershell 1.0: A Beginner's Guide</title><link>http://blogs.technet.com/shawnt/archive/2007/12/17/how-to-use-the-powershell-1-0-a-beginner-s-guide.aspx</link><pubDate>Tue, 18 Dec 2007 04:13:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2655491</guid><dc:creator>shawnt</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/shawnt/comments/2655491.aspx</comments><wfw:commentRss>http://blogs.technet.com/shawnt/commentrss.aspx?PostID=2655491</wfw:commentRss><description>&lt;P&gt;If you're already convinced that the Powershell is right for you, skip ahead to the section: "Getting Started with the Windows Powershell". However, if you still need some convincing, read on. So, in case you haven't had a chance to use the Windows Powershell yet, I'm here to tell you - It is a nice powerful tool for automating repetitive tasks in Windows. If you find yourself doing many of the same tasks day after day via the GUI and it's starting to wear you down, you will almost certainly benefit from spending a few minutes learning the Windows Powershell, or at least stealing the scripts from the repository (See Step 5 below)! You don't have to get deep to start saving yourself a lot of clicksteps - just spend a few minutes going through my walkthrough and download one of the sample scripts. I think you'll find you'll be able to give yourself back several hours a week. Check out steps below on how to get started with the Windows Powershell...&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;Did you know?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;EM&gt;The Windows Powershell 1.0 can....&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;perform what-if analysis (to help you decide if you really do want to run a certain command or script) &lt;/LI&gt;
&lt;LI&gt;perform "do while" and "do until" loops &lt;/LI&gt;
&lt;LI&gt;accept runtime input via the command line. So, for example, you could create a tool to give you information about a specific Windows Service, and it would ask you which Windows Service you were interested in via the command line interface. &lt;/LI&gt;
&lt;LI&gt;autoComplete using the Tab key (so you don't have to remember every noun-verb command - just tab 'til you find the right one.) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The Windows Powershell 1.0 uses...&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It's own scripting language. That's right, it's not VB Script, C# or any of the others. It's new. If you want to know why, read the documentation linked to in step 3 below. &lt;/LI&gt;
&lt;LI&gt;the .NET object model, so all output from the Powershell is treated as an object which can be manipulated and piped into other methods&lt;/LI&gt;
&lt;LI&gt;or, actually, is used by the Exchange Management Console. The Exchange functionality in the EMC is just an add-in to the Windows Powershell. It adds Exchange related tasks, like move-mailbox, to the Powershell. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;In addition, if you'd like to learn more, please check out the webcast I just delivered on the Windows Powershell 1.0. It should be available in streaming format &lt;A title=http://www.microsoft.com/events/webcasts/ondemand.mspx href="http://go.microsoft.com/fwlink/?LinkID=106428&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106428&amp;amp;clcid=0x409"&gt;here&lt;/A&gt; in the next few days. It's called "TechNet Webcast: Prepare Yourself for Windows Server 2008 (Part 7 of 8): Windows PowerShell and Manageability Improvements."&lt;/P&gt;
&lt;P align=left&gt;&lt;STRONG&gt;&lt;FONT size=6&gt;Getting started with the Windows Powershell:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;DOWNLOAD:&lt;/STRONG&gt; &lt;A title=http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx href="http://go.microsoft.com/fwlink/?LinkID=106427&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106427&amp;amp;clcid=0x409"&gt;Download Powershell 1.0&lt;/A&gt;. (It's about a 5.0MB download) 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/Powershell_1.0_Download_for_Vista_2.jpg" mce_href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/Powershell_1.0_Download_for_Vista_2.jpg"&gt;&lt;IMG id=id style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 20px 20px 20px 40px; BORDER-RIGHT-WIDTH: 0px" height=524 alt=Powershell_1.0_Download_for_Vista src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/Powershell_1.0_Download_for_Vista_thumb_2.jpg" width=668 border=0 mce_src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/Powershell_1.0_Download_for_Vista_thumb_2.jpg"&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;INSTALL:&lt;/STRONG&gt; Double-click the downloaded .msu to install the Powershell. There are different .msu's for Windows XP SP2, Windows Server 2003 SP1, and Windows Vista. Make sure you get the right one for your OS. (Windows Server 2008 has the Powershell built in.) The Powershell only runs on Windows, so if you need to run it on another OS, you'll need to build a Virtual Machine and install the Powershell into it. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;READ:&lt;/STRONG&gt; Read the Powershell 1.0 Documentation. The documentation is &lt;EM&gt;&lt;STRONG&gt;automatically installed&lt;/STRONG&gt;&lt;/EM&gt; along with Powershell and is very helpful, especially at first. If you've never worked with Powershell before, you'll want to read these. The first thing you should read is "GettingStarted.rtf", which is a nice, easy to follow, 32-page overview. Then, you can graduate to the 116-page "UserGuide.rtf". Finally, if you get past all of that, see the "Other helpful links" at the bottom of this post. &lt;STRONG&gt;If you want to read the documentation without downloading the Powershell, you can find it here: &lt;/STRONG&gt;&lt;A title=http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F&amp;amp;displaylang=en href="http://go.microsoft.com/fwlink/?LinkID=106434&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106434&amp;amp;clcid=0x409"&gt;&lt;STRONG&gt;Download the Powershell 1.0 Documentation Pack&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&amp;nbsp; 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Documentation.jpg" mce_href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Documentation.jpg"&gt;&lt;IMG id=id style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 20px 20px 20px 40px; BORDER-RIGHT-WIDTH: 0px" height=393 alt=PS_Documentation src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Documentation_thumb.jpg" width=473 border=0 mce_src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Documentation_thumb.jpg"&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;PLAY!:&lt;/STRONG&gt; Open a Powershell Command Window and try a few simple, interactive commands (e.g. "write-host This is a test." or "get-childitem &amp;lt;AnyFolderPath&amp;gt;"). It's really quite easy to get used to. I've typed a couple below that you might want to try.&lt;A href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Simple_commands.jpg" mce_href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Simple_commands.jpg"&gt;&lt;IMG id=id style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 20px 20px 20px 40px; BORDER-RIGHT-WIDTH: 0px" height=422 alt=PS_Simple_commands src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Simple_commands_thumb.jpg" width=940 border=0 mce_src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/PS_Simple_commands_thumb.jpg"&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;HOW&amp;nbsp;TO RUN&amp;nbsp;SCRIPTS&amp;nbsp;- THE EASY WAY:&lt;/STRONG&gt; Now, take your Powershell experience to the next level by running scripts! And, if you ask me, the best way to run scripts is to start with someone else's scripts, and build from there. So, go get some sample scripts from the Microsoft Powershell sample script repository online. Of course, you can write your own scripts from scratch, but the sample scripts are so powerful and easy that I recommend you start there. Don't try to recreate the wheel when you don't have to.&amp;nbsp; &lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P align=center&gt;&amp;nbsp;&lt;FONT size=4&gt;&lt;STRONG&gt;------&amp;gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;A title=http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true href="http://go.microsoft.com/fwlink/?LinkID=106429&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106429&amp;amp;clcid=0x409"&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;Microsoft's Sample Powershell Scripts Repository &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;&amp;lt;------&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;Alright, Shawn, but how do I run those blasted scripts? I keep getting error messages. Well, here's how... &lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;OL&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;First,&amp;nbsp;change the executionpolicy setting.&lt;/STRONG&gt; The default executionpolicy setting is&amp;nbsp;restricted,&amp;nbsp;and it&amp;nbsp;will prevent all scripts from running, allowing you to run the Powershell only interactively. (If you want to know why we do this, check out the "go" link below just before step 2.) If&amp;nbsp;you want to run scripts, even the ones &lt;EM&gt;you&lt;/EM&gt; create, you'll need to change that setting. Here's how you do that:&amp;nbsp;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;If security is &lt;STRONG&gt;&lt;EM&gt;NOT &lt;/EM&gt;&lt;/STRONG&gt;an issue and you want to run all scripts unsigned. (Not recommended):&lt;A href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/restriction%20policy.jpg" mce_href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/restriction%20policy.jpg"&gt;&lt;IMG id=id style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 10px; BORDER-RIGHT-WIDTH: 0px" height=67 alt="restriction policy" src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/restriction%20policy_thumb.jpg" width=805 border=0 mce_src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/restriction%20policy_thumb.jpg"&gt;&lt;/A&gt; &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;If security &lt;STRONG&gt;&lt;EM&gt;IS&lt;/EM&gt;&lt;/STRONG&gt; an issue and you want to run signed scripts&amp;nbsp;(signed locally or remotely):&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;PS C:\Users\Administrator&amp;gt;&amp;nbsp;&lt;STRONG&gt; set-executionpolicy remotesigned&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;Check out this TechNet article that talks all about how to properly sign your code and explains the executionpolicy settings in more detail&amp;nbsp;- even gives you the commands you should use: &lt;A title=http://www.microsoft.com/technet/technetmag/issues/2007/09/PowerShell/ href="http://go.microsoft.com/fwlink/?LinkID=106498&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106498&amp;amp;clcid=0x409"&gt;http://go.microsoft.com/fwlink/?LinkID=106498&amp;amp;clcid=0x409&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;Then, just copy and paste the sample scripts directly from the&amp;nbsp;&lt;A class="" title=http://go.microsoft.com/fwlink/?LinkID=106429&amp;amp;clcid=0x409 href="http://go.microsoft.com/fwlink/?LinkID=106429&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106429&amp;amp;clcid=0x409"&gt;Microsoft repository website&lt;/A&gt; into Notepad.&lt;/STRONG&gt; Save the file with any name and a .ps1 extension (you'll need to get rid of the .txt extention as shown in the screenshot below.) 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/desktopsettingscript.jpg" mce_href="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/desktopsettingscript.jpg"&gt;&lt;IMG id=id style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 20px 20px 20px 0px; BORDER-RIGHT-WIDTH: 0px" height=710 alt=desktopsettingscript src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/desktopsettingscript_thumb.jpg" width=901 border=0 mce_src="http://blogs.technet.com/blogfiles/shawnt/WindowsLiveWriter/Powershell1.0sampledatabase_BF14/desktopsettingscript_thumb.jpg"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;Run the script from the Powershell prompt.&lt;/STRONG&gt; For example:&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;PS c:\Users\Administrator&amp;gt;&lt;STRONG&gt;&amp;nbsp; c:\scripts\ListDesktopSettings.ps1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;****Y&lt;/STRONG&gt;&lt;STRONG&gt;ou must type the full path&amp;nbsp;for&amp;nbsp;the script&amp;nbsp;to run****&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Now that you've got one script under your belt, you can try some other examples of sample scripts from the website. Here is a list of the available sample scripts. &lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Active Directory - Sample scripts for managing Active Directory and Active Directory objects.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Applications - Sample scripts for managing software and applications on servers and client computers.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Desktop Management - Sample scripts for managing such things as desktop settings, computer startup and shutdown, and System Restore.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Hardware - Sample scripts for managing and monitoring computer hardware.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Logs - Sample scripts for managing event logs and plain-text log files.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Networking - Sample scripts for managing and monitoring network configurations and network applications.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Operating System - Sample scripts for managing and monitoring the Windows operating system.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Other Directory Services - Sample scripts for managing directory services other than Active Directory.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Printing - Sample scripts for managing printers, print jobs, print servers, and other parts of the Windows printing infrastructure.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Scripting Techniques - Sample scripts demonstrating a wide variety of scripting tips, tricks, and techniques useful to script writers.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Searching Active Directory - Sample scripts for searching Active Directory.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Service Packs and Hot Fixes - Sample scripts for retrieving information about service packs and hot fixes installed on a computer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Storage - Sample scripts for managing files, folders, file systems, and storage devices.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;FONT size=2&gt;Terminal Server - Sample scripts for managing Windows Terminal Server.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, that's it - by now you should be off and running with the Windows Powershell 1.0. I tried to go through all the basics here just to get everything working, as well as some of the gotchas you might run into. Still, it's a big world once you start to go deep into the Powershell, so here are some more helpful links that will get you to that next echelon. If you have any thoughts or questions, please feel free to post a comment.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Other helpful links:&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&lt;A title=http://blogs.msdn.com/PowerShell/ href="http://go.microsoft.com/fwlink/?LinkID=106436&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106436&amp;amp;clcid=0x409"&gt;The Windows Powershell Blog Team Site&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.microsoft.com/technet/scriptcenter/default.mspx href="http://go.microsoft.com/fwlink/?LinkID=106439&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkID=106439&amp;amp;clcid=0x409"&gt;The Windows Powershell Script Center&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #595959; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;A class="" title=http://technet.microsoft.com/en-us/library/bb978526.aspx href="http://technet.microsoft.com/en-us/library/bb978526.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb978526.aspx"&gt;Windows Powershell Help on TechNet&lt;/A&gt;&amp;nbsp;- Check it out!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #595959; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&amp;nbsp;&lt;A class="" title=http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx"&gt;Windows Powershell Owner's Manual&lt;/A&gt; - Highly recommend - there is a TON of information very easily accessible from here and it starts you off on the bunny slope.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #595959; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&amp;nbsp;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2655491" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/shawnt/archive/tags/Vista/default.aspx">Vista</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Management/default.aspx">Management</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Powershell/default.aspx">Powershell</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Command+Line/default.aspx">Command Line</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Windows+Server/default.aspx">Windows Server</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Windows+Client/default.aspx">Windows Client</category><category domain="http://blogs.technet.com/shawnt/archive/tags/Windows+Server+2003/default.aspx">Windows Server 2003</category></item></channel></rss>