<?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>The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx</link><description>Microsoft Scripting Guy Ed Wilson shows the easy way to use Windows PowerShell to work with the paths to special folders.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx#3482512</link><pubDate>Wed, 22 Feb 2012 15:26:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3482512</guid><dc:creator>TanMan</dc:creator><description>&lt;p&gt;@Klaus, Thanks so much for the explanation and especially the link. I guess I wasn&amp;#39;t searching on the right keywords. Down the rabbit hole for me!!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482512" width="1" height="1"&gt;</description></item><item><title>re: The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx#3482262</link><pubDate>Tue, 21 Feb 2012 15:29:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3482262</guid><dc:creator>K_Schulte</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;I think you showed that it is no more complicated to get to special folders in PS than it has been (and is) in VB Script! That&amp;#39;s pretty cool!&lt;/p&gt;
&lt;p&gt;@jrv: you&amp;#39;re perfectly right!&lt;/p&gt;
&lt;p&gt;@TanMan: I can&amp;#39;t really help you much with this, but this special construct is due to the underlying .Net framework, which is accessed by Reflection methods to get at the enum values of a nested class in this case!&lt;/p&gt;
&lt;p&gt;In the blog entry&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="https://blogs.msdn.com/b/powershell/archive/2009/08/27/plus-in-net-class-names.aspx?Redirected=true"&gt;blogs.msdn.com/.../plus-in-net-class-names.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;you&amp;#39;ll find the essential statement:&lt;/p&gt;
&lt;p&gt;To Get : A parent class and a nested class&lt;/p&gt;
&lt;p&gt;Use : Type.GetType(&amp;quot;MyParentClass+MyNestedClass&amp;quot;)&lt;/p&gt;
&lt;p&gt;This is a rare case, and you are not supposed to know that the underlying type is defined in a nested class. Of course, you just have to learn that that&amp;#39;s the way you have to go ...&lt;/p&gt;
&lt;p&gt;Klaus (Schulte)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482262" width="1" height="1"&gt;</description></item><item><title>re: The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx#3482137</link><pubDate>Tue, 21 Feb 2012 02:26:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3482137</guid><dc:creator>TanMan</dc:creator><description>&lt;p&gt;Sorry for the newb question, but I don&amp;#39;t understand the + operator in the context [Environment+SpecialFolder]. I&amp;#39;ve tried [Environment]::SpecialFolders, but that doesn&amp;#39;t seem to work. Can someone please explain to me what the + means in this context and why this works? Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482137" width="1" height="1"&gt;</description></item><item><title>re: The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx#3482054</link><pubDate>Mon, 20 Feb 2012 16:51:57 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3482054</guid><dc:creator>ed wilson</dc:creator><description>&lt;p&gt;@JRV that is absolutely correct. Using the GetNames method from the system.enum class is a great way to find out what special folders are available. Thank you for pointing that out.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482054" width="1" height="1"&gt;</description></item><item><title>re: The Easy Way to Use PowerShell to Work with Special Folders</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/20/the-easy-way-to-use-powershell-to-work-with-special-folders.aspx#3482053</link><pubDate>Mon, 20 Feb 2012 16:49:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3482053</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;You forgot the best part. &amp;nbsp;We can know what folders are available on a per OS basis using this:&lt;/p&gt;
&lt;p&gt;[enum]::GetNames([System.Environment+SpecialFolder])&lt;/p&gt;
&lt;p&gt;This will list all special folders available on the current OS. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482053" width="1" height="1"&gt;</description></item></channel></rss>