<?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>TechNet India - from the field : XP</title><link>http://blogs.technet.com/technetindia/archive/tags/XP/default.aspx</link><description>Tags: XP</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Virtual  Tech Days Sep 08 – Managing Windows Vista using Windows Powershell</title><link>http://blogs.technet.com/technetindia/archive/2008/10/10/virtual-tech-days-sep-08-managing-windows-vista-using-windows-powershell.aspx</link><pubDate>Fri, 10 Oct 2008 12:40:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3134933</guid><dc:creator>TechNetIndia</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/technetindia/comments/3134933.aspx</comments><wfw:commentRss>http://blogs.technet.com/technetindia/commentrss.aspx?PostID=3134933</wfw:commentRss><wfw:comment>http://blogs.technet.com/technetindia/rsscomments.aspx?PostID=3134933</wfw:comment><description>&lt;DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 2pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: #4f81bd 1pt solid; mso-border-bottom-themecolor: accent1; mso-element: para-border-div"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/DIV&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Hi, I am Ranjana Jain&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;A href="http://ranjanajain.spaces.live.com/" mce_href="http://ranjanajain.spaces.live.com/"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://ranjanajain.spaces.live.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;) . I was one of the presenters at the recently held Virtual Tech Days from Microsoft. I presented two sessions – a. Managing Windows Vista using Windows Powershell and b. A look at the performance changes in Windows Vista SP1. A number of questions were asked during these virtual livemeeting sessions, which may not have been answered by me primarily due to lack of time. However I feel it was important to address the queries of the attendees, so like Ravi, I too decided to do that in this blog. So here I have consolidated most of the queries asked during the sessions and have tried to provide all the info that you can benefit from.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Many more questions were also asked that may not have been articulated in the exact same words, but I am sure most of the information that was required has been provided as answers to these queries.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q1. Can Desktop Settings of users be modified using Powershell?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Yes, Windows Powershell is a complete administrative shell using which administrators can do anything on the computer they have rights to. This includes, modifying desktop settings, starting/stopping services, changing policy settings, editing registry and even managing event logs etc.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here is a link where you can find scripts that have already been created to Manage Windows Desktop Settings: &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true" mce_href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; .&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q2. Can we create batchfiles/scripts using Windows Powershell to automate the tasks?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Answer: Yes, infact creating scripts in Windows Powershell is much easier than creating scripts in Visual Basic, or other programming languages. All that you need to create a script for Windows Powershell is to write all the Powershell commands in a notepad as you would want to run in sequence on the Powershell, and just save the file with a “.ps1” extension i.e. &lt;I style="mso-bidi-font-style: normal"&gt;&amp;lt;filename.ps1&amp;gt; . &lt;/I&gt;Now you just need to provide the complete path of this .ps1 script file at the Powershell prompts and execute it! -&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; Yippee!!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q3. Can I activate Windows Vista using Windows Powershell?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: Absolutey, infact a Powershell script already exists in our scripts database to activate Windows Vista: &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/desktop/activate/default.mspx?mfr=true" mce_href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/desktop/activate/default.mspx?mfr=true"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/scripts/msh/desktop/activate/default.mspx?mfr=true&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; . These include scripts using which you can not only know the activation status but also use scripts to activate Windows both offline and online. -&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q3. How do we run the Powershell batch files/scripts on remote computers?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;This was demonstrated as a part of the scripts I executed during the session. As I mentioned, that in most of the commands that used &lt;I style="mso-bidi-font-style: normal"&gt;GetWmiObect &lt;/I&gt;, I could replace the “.” value for the &lt;I style="mso-bidi-font-style: normal"&gt;/computername&lt;/I&gt; parameter with the &lt;B style="mso-bidi-font-weight: normal"&gt;UNC path&lt;/B&gt; of the computer on which you want to execute the command.&lt;BR&gt;For example: - &lt;B style="mso-bidi-font-weight: normal"&gt;Get-WmiObject -Class Win32&lt;/B&gt;_&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;BIOS -ComputerName.&lt;BR&gt;&lt;/B&gt;The above command displays the BIOS information on the local computer. Replacing the “.” value in the above command with the UNC path of the destination computer will display BIOS info for the destination computer.&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q4. Can we edit registry using Powershell commands?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: Absolutely, infact Regedit is not required to edit registry using Windows Powershell. Windows Powershell exposes Windows Registry as a data store ( like C: and D: drives) in the form of psdrives. Therefore you can access the HKEY LOCAL MACHINE registry hive as HKLM:\ and then use usual commands to edit registry. For more information and actual commands to edit specific registry information please view the session recording at: &lt;/FONT&gt;&lt;A href="http://www.connectwithlife.co.in/vtd/" mce_href="http://www.connectwithlife.co.in/vtd/"&gt;&lt;FONT face=Calibri size=3&gt;http://www.connectwithlife.co.in/vtd/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;For Example: &lt;B style="mso-bidi-font-weight: normal"&gt;$value = (get-itemproperty "HKLM:\software\microsoft\internet explorer").version &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q5. Is Windows Powershell a new version of Linux shell, as you can run all Linux shell commands in Powershell?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: Windows Powershell was basically developed to bridge gaps that were there wrt administration using Windows Command Line (cmd shell). We had a large number of commands to manage Windows Server 2003. Many more commands were added with Windows Server 2003 R2. But the cmd shell could still not provide the intuitiveness of Bash , the object based simplicity of Perl etc. So there was a desperate need to have an intuitive and simple command shell that could be more useful especially to administrators. Do watch/listen to this video (an interview with Jeffery Snover , Windows Powershell developer) : &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=209" mce_href="http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=209"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=209&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q6. How can I use Powershell to administer most activities on Windows Vista Computer?&lt;/STRONG&gt;&lt;BR&gt;Ans: Powershell can be used to administer Windows Vista Computers in all ways that you can do it using the GUI. Many of such administrative activities were demonstrated in the VTD session and you can even download a Powershell Owner’s manual whre you can access most of the information on how you can use it even better to administer Windows Vista: &lt;/FONT&gt;&lt;A 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;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q7: Are the Powershell commands same for Windows XP and Windows Vista?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: Although there are many commands that might look same for both the platforms, but yet there are many differences, mostly for administering features that were not present in Windows XP.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Q8: Can existing VB scripts be used on Windows Powershell?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Answer: Before using VB scripts on Windows Powershell, you need to convert them to Powershell scripts. This is a simple task that can be done using existing tools:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Above al, you can find most of the scripts, tools, guides and resources on Powershell here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;To learn more about working with Windows Powershell, you can also view many webcasts on Windows Powershell at: &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/webcasts" mce_href="http://www.microsoft.com/webcasts"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://www.microsoft.com/webcasts&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Virtual Lab on Windows Powershell can also be found at: &lt;/FONT&gt;&lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032314395&amp;amp;EventCategory=3" mce_href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032314395&amp;amp;EventCategory=3"&gt;&lt;FONT face=Calibri size=3&gt;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032314395&amp;amp;EventCategory=3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Moreover, if you are a Windows Administrator who &lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 10.0pt"&gt;hates writing a script &lt;/SPAN&gt;&lt;FONT size=3&gt;(like me -&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;) , please watch: &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=214&amp;amp;PUID=000149505AA18347" mce_href="http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=214&amp;amp;PUID=000149505AA18347"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/uk/technet/spotlight/sessionh.aspx?videoid=214&amp;amp;PUID=000149505AA18347&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Happy Powershell Learning -&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;!!!&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3134933" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/technetindia/archive/tags/SP1/default.aspx">SP1</category><category domain="http://blogs.technet.com/technetindia/archive/tags/Powershell/default.aspx">Powershell</category><category domain="http://blogs.technet.com/technetindia/archive/tags/XP/default.aspx">XP</category><category domain="http://blogs.technet.com/technetindia/archive/tags/Windows/default.aspx">Windows</category><category domain="http://blogs.technet.com/technetindia/archive/tags/Vista/default.aspx">Vista</category></item></channel></rss>