<?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 'Scripting Guy!', 'multimedia', and 'Windows PowerShell'</title><link>http://powershell.com/cs/search/SearchResults.aspx?q=app:weblogs&amp;tag=Scripting+Guy!,multimedia,Windows+PowerShell&amp;orTags=0&amp;o=DateDescending</link><description>Search results for 'app:weblogs' matching tags 'Scripting Guy!', 'multimedia', and 'Windows PowerShell'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Use PowerShell to Find Installed Video Codecs on Windows 8</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2013/02/22/use-powershell-to-find-installed-video-codecs-on-windows-8.aspx</link><pubDate>Fri, 22 Feb 2013 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:21785</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;&lt;strong style="font-size:12px;"&gt;Summary:&lt;/strong&gt;&lt;span style="font-size:12px;"&gt; Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find installed video codecs on Windows&amp;nbsp;8.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/qanda/q-sm.jpg" alt="Hey, Scripting Guy! Question" /&gt;&amp;nbsp;Hey, Scripting Guy! Dude, I am in trouble. Big time! Last week, I installed Windows&amp;nbsp;8 on the laptops used by all our department heads and front-line supervisors. I thought the responsiveness and the apps would be very useful and a welcome upgrade&amp;mdash;I mean, Windows&amp;nbsp;8 has gotten great reviews, and personally, I love it. But no!!!!! Come to find out, I guess the only thing these people use their laptops for is to watch DVDs when they are on the road. (I imagine they also check their email, but they could use their phones to do that.) Anyway, I never noticed that Windows&amp;nbsp;8 does not ship with a CODEC to enable someone to watch a DVD. Huh? I mean, get real, this is ridiculous. Personally, I like Media Player and have used it for years, but not if it is going to get me fired. I need a way to find out if a laptop has a particular CODEC, AND I need to find a DVD CODEC now. Can you help me?&lt;/p&gt;
&lt;p&gt;&amp;mdash;ML&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/qanda/a-sm.jpg" alt="Hey, Scripting Guy! Answer" /&gt;&amp;nbsp;Hello ML,&lt;/p&gt;
&lt;p&gt;Microsoft Scripting Guy, Ed Wilson, is here. WOW, ML, I am sorry you are in trouble. I can imagine that I might have gotten into a similar predicament because I also would not consider watching a DVD on my laptop as a mission-critical use case scenario, and it would have fallen out of the test specs.&lt;/p&gt;
&lt;p&gt;Yes, there has been some mixed messaging around playing DVDs on Windows&amp;nbsp;8. A quick search via Bing reveals lots of blog posts that state that Media Center would be in Windows&amp;nbsp;8, and not so much that says it will not be in Windows&amp;nbsp;8. And since we have had Media Center in various editions of Windows for several releases now, I can also expect that you might have missed it. The good news is that you can download the Windows&amp;nbsp;8 Media Center Pack for Windows&amp;nbsp;8 Pro for $9.99 USD. &lt;a href="http://windows.microsoft.com/en-US/windows-8/feature-packs" target="_blank"&gt;The details are available via this web page&lt;/a&gt;. Also, if you are not running Windows&amp;nbsp;8 Pro, we have an upgrade that is available&amp;mdash;this upgrade also includes Windows&amp;nbsp;8 Media Center. I actually did this for one of the Scripting Wife&amp;rsquo;s computers and it worked very slick, and kept all of her settings (of course, I backed everything up first, just in case).&lt;/p&gt;
&lt;h2&gt;Finding installed video codecs&lt;/h2&gt;
&lt;p&gt;To find video codecs installed on your computers, use the &lt;strong&gt;Win32_VideoCodec &lt;/strong&gt;WMI class. You can query it via the old &lt;strong&gt;Get-WmiObject&lt;/strong&gt; cmdlet, as shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Get-WmiObject win32_codecfile -Filter &amp;#39;group = &amp;quot;video&amp;quot;&amp;#39;&lt;/p&gt;
&lt;p&gt;But because you are targeting computers running Windows&amp;nbsp;8, you can also use the &lt;strong&gt;Get-CimInstance&lt;/strong&gt; cmdlet, as shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Get-CimInstance win32_codecfile -Filter &amp;#39;group = &amp;quot;video&amp;quot;&amp;#39;&lt;/p&gt;
&lt;h2&gt;Querying multiple remote computers&lt;/h2&gt;
&lt;p&gt;To query multiple remote computers, by using the &lt;strong&gt;Get-WmiObject&lt;/strong&gt; cmdlet, you can simply add multiple computer names, and specify the appropriate credentials. This technique is shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Get-WmiObject win32_codecfile -Filter &amp;#39;group = &amp;quot;video&amp;quot;&amp;#39; -Credential iammred\administrator -ComputerName ws1,ws2,ws3&lt;/p&gt;
&lt;p&gt;To query multiple computers by using the CIM cmdlets, first create a &lt;strong&gt;cim&lt;/strong&gt; session, and then do the query. This is shown here.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;$session = New-CimSession -ComputerName ws1,ws2,ws3 -Credential iammred\adminIstrator&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Get-CimInstance win32_codecfile -Filter &amp;#39;group = &amp;quot;video&amp;quot;&amp;#39; -CimSession $session&lt;/p&gt;
&lt;h2&gt;Examine the data&lt;/h2&gt;
&lt;p&gt;After you have the data, you can examine it by piping it to the &lt;strong&gt;Format-List&lt;/strong&gt; cmdlet and selecting all of the properties. You can then peruse the output to see what properties are most useful for you. Here is an example.&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/0474.HSG_2D00_2_2D00_22_2D00_13_2D00_01.png"&gt;&lt;img title="Image of command output" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18/0474.HSG_2D00_2_2D00_22_2D00_13_2D00_01.png" alt="Image of command output" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ML, that is all there is to using WMI to examine video codecs. Join me tomorrow for the Weekend Scripter, when I will talk about creating test log files on Saturday and about parsing those log files on Sunday. It will be fun, I promise.&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;strong&gt;Ed Wilson, Microsoft Scripting Guy&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3554292" width="1" height="1" alt="" /&gt;</description></item><item><title>Use PowerShell to Easily Organize Your Music Collection</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2011/12/18/use-powershell-to-easily-organize-your-music-collection.aspx</link><pubDate>Sun, 18 Dec 2011 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:13672</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: Microsoft Scripting Guy, Ed Wilson, teaches you how to use Windows PowerShell to organize your music collection for ease of playback on Windows.&lt;/p&gt;
&lt;p&gt;Microsoft Scripting Guy, Ed Wilson, is here. I love the weekend. In general, it is a time for me to explore and to experiment with Windows PowerShell. These experimentation sessions quite often are purpose driven&amp;mdash;I have some annoying problem that has finally reached a sufficient threshold of vexation to merit a few time slices of my day.&lt;/p&gt;
&lt;p&gt;I enjoy playing music on my computer while I am writing. Often I listen to my Zune, but it is easier for me to use Windows Media player. There is little performance hit on my system because my music files are on a separate drive than my operating system or my Hey, Scripting Guy! data files. The problem with the manual method of playing music files is that the songs reside in dozens of individual, nested folders. This layout is shown in the image that follows.&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/7701.hsg_2D00_12_2D00_18_2D00_11_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/7701.hsg_2D00_12_2D00_18_2D00_11_2D00_01.png" alt="Image of folder" title="Image of folder" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For manual music operations, a better arrangement (at least for me) is to have all the songs in a single folder. With this arrangement, all I need to do is select the songs I want to listen to, and then I can select &lt;b&gt;Play&lt;/b&gt;&lt;i&gt; &lt;/i&gt;directly from Windows Explorer. This technique 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/2437.hsg_2D00_12_2D00_18_2D00_11_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/2437.hsg_2D00_12_2D00_18_2D00_11_2D00_02.png" alt="Image of folder" title="Image of folder" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The cool thing about Windows PowerShell is that I can fix annoying problems, such as the one I have with my music files, without the need to write a script. In fact, it is three commands to fix this issue. The first command sets my working location to the G:\music folder. The next command moves all of my music files to the root of the &lt;b&gt;Music&lt;/b&gt;&lt;i&gt; &lt;/i&gt;folder. I use the &lt;b&gt;Get-ChildItem&lt;/b&gt; cmdlet (&lt;b&gt;gci&lt;/b&gt; is the alias) to retrieve a listing of all the MP3&lt;i&gt; &lt;/i&gt;files in my &lt;b&gt;Music&lt;/b&gt; folder. I use the &lt;b&gt;Foreach-Object &lt;/b&gt;cmdlet (&lt;b&gt;%&lt;/b&gt; is the alias) to move each file by using the &lt;b&gt;Move-Item &lt;/b&gt;cmdlet (&lt;b&gt;move&lt;/b&gt; is alias) to the root of my &lt;b&gt;Music&lt;/b&gt;&lt;i&gt; &lt;/i&gt;folder. Here is the command.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;sl g:\music&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;gci -Filter *.mp3 -recurse | % {Move -Path $_.fullname -dest g:\music}&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: For my particular application, this technique works just fine. If you have files outside of nested folders, you will need to add a check for the parent folder, or else the command will attempt to move the file to the location where the file already exists, and it generates errors.&lt;/p&gt;
&lt;p&gt;If you are not certain what a command will actually do, make sure that you use the &lt;i&gt;WhatIf &lt;/i&gt;parameter. Here is the command, revised to incorporate the &lt;i&gt;WhatIf &lt;/i&gt;parameter.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;gci -Filter *.mp3 -recurse | % {Move -Path $_.fullname -dest g:\music -whatif}&lt;/p&gt;
&lt;p&gt;Now, I need to delete all the empty folders. To do this, I use two commands. The first command uses the &lt;b&gt;Get-ChildItem&lt;/b&gt; (&lt;b&gt;gci&lt;/b&gt; is alias) to find all of the child folders. I use the &lt;i&gt;Recurse &lt;/i&gt;parameter to force the command to find folders and all subfolders. To identify a folder, I use the &lt;b&gt;Where-Object &lt;/b&gt;(&lt;b&gt;?&lt;/b&gt; is the alias) to find the &lt;b&gt;Mode&lt;/b&gt;&lt;i&gt; &lt;/i&gt;that begins with the letter &lt;b&gt;d&lt;/b&gt;&lt;i&gt;.&lt;/i&gt; Here is the first command to find all the folders.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;$dir = gci g:\music -recurse | ? {$_.mode -match &amp;#39;^d&amp;#39;}&lt;/p&gt;
&lt;p&gt;Now I need to find the folders that are empty. I pipe the collection of &lt;b&gt;FolderInfo&lt;/b&gt; objects to the &lt;b&gt;Where-Object &lt;/b&gt;(&lt;b&gt;?&lt;/b&gt; is the alias), and I call the &lt;b&gt;GetFiles&lt;/b&gt;&lt;i&gt; &lt;/i&gt;method to see how many files exist in each folder. If there are no files, I pipe the object to the &lt;b&gt;Remove-Item &lt;/b&gt;(&lt;b&gt;del&lt;/b&gt; is the alias) cmdlet. Here is the second command.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;$dir | ? { !($_.getfiles().count) } | del&lt;/p&gt;
&lt;p&gt;Once again, if you are not certain as to what the command will accomplish, add the &lt;i&gt;WhatIf &lt;/i&gt;parameter to the &lt;b&gt;Remove-Item &lt;/b&gt;command. Here is the command that uses the &lt;i&gt;WhatIf &lt;/i&gt;parameter.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;$dir | ? { !($_.getfiles().count) } | del -whatif&lt;/p&gt;
&lt;p&gt;Cool, I now have my music collection in a single folder, and I can use Windows Media player to play directly from within Windows Explorer. Sweet! Join me tomorrow when I will welcome Microsoft PowerShell MVP, Sean Kearney, as he begins a special week in Blueville. It is great stuff!!! See you!&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=3470880" width="1" height="1" alt="" /&gt;</description></item><item><title>Expert Solution for 2011 Scripting Games Advanced Event 8: Use PowerShell to Resize Images and to Remove EXIF Data</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2011/04/27/expert-solution-for-2011-scripting-games-advanced-event-8-use-powershell-to-resize-images-and-to-remove-exif-data.aspx</link><pubDate>Wed, 27 Apr 2011 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:10137</guid><dc:creator>Anonymous</dc:creator><description>Summary : Microsoft PowerShell MVP, Marc van Orsouw, resizes images and removes EXIF metadata while solving 2011 Scripting Games Advanced Event 8. Microsoft Scripting Guy, Ed Wilson, here. Marc van Orsouw (MoW) is our expert commentator for Advanced Event...(&lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2011/04/27/expert-solution-for-2011-scripting-games-advanced-event-8-use-powershell-to-resize-images-and-to-remove-exif-data.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3423128" width="1" height="1" alt="" /&gt;</description></item><item><title>Weekend Scripter: Download lyrics for your favorite song with PowerShell</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2011/01/01/weekend-scripter-download-lyrics-for-your-favorite-song-with-powershell.aspx</link><pubDate>Sat, 01 Jan 2011 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:8879</guid><dc:creator>Anonymous</dc:creator><description>Summary: Learn how to use a Windows PowerShell function to download lyrics for your favorite songs. Retrieving song lyrics with Windows PowerShell Microsoft Scripting Guy Ed Wilson here. Well it is New Year&amp;rsquo;s day in Charlotte , North Carolina ....(&lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/01/weekend-scripter-download-lyrics-for-your-favorite-song-with-powershell.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3378007" width="1" height="1" alt="" /&gt;</description></item><item><title>Weekend Scripter: A Cool Music Explorer Script</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2010/10/09/weekend-scripter-a-cool-music-explorer-script.aspx</link><pubDate>Sat, 09 Oct 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:7817</guid><dc:creator>Anonymous</dc:creator><description>&amp;#160; Microsoft Scripting Guy Ed Wilson here. I don’t know about you, but I have thousands of music files on my computer. In fact, I have exactly 4,018 music files. I used this Windows PowerShell command to count them: PS &amp;#160; E:\Music&amp;gt; &amp;#160; ...(&lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/10/09/weekend-scripter-a-cool-music-explorer-script.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3360437" width="1" height="1" alt="" /&gt;</description></item><item><title>Hey, Scripting Guy! How Can I Use Windows PowerShell to Convert Graphics Files to Different File Formats?</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2010/07/05/hey-scripting-guy-how-can-i-use-windows-powershell-to-convert-graphics-files-to-different-file-formats.aspx</link><pubDate>Mon, 05 Jul 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:7074</guid><dc:creator>Anonymous</dc:creator><description>Hey, Scripting Guy! I have a number of graphics files that I need to convert to a different file format. Can I use Windows PowerShell 2.0 to convert a .bmp file to a .jpg file? -- SW Hello SW, Microsoft Scripting Guy Ed Wilson here. It is Guest Blogger...(&lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/07/05/hey-scripting-guy-how-can-i-use-windows-powershell-to-convert-graphics-files-to-different-file-formats.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3340570" width="1" height="1" alt="" /&gt;</description></item><item><title>Hey, Scripting Guy! Weekend Scripter: Converting All Types of Image Files to JPEG Format</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2010/05/02/hey-scripting-guy-weekend-scripter-converting-all-types-of-image-files-to-jpeg-format.aspx</link><pubDate>Sun, 02 May 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:5482</guid><dc:creator>Anonymous</dc:creator><description>This week saw the kickoff and first week of the 2010 Scripting Games . The Scripting Wife is in the midst of things, so we decided to give her a break and let her catch her breath. You can catch up with her progress by reviewing the articles in the archive...(&lt;a href="http://blogs.technet.com/heyscriptingguy/archive/2010/05/02/hey-scripting-guy-weekend-scripter-converting-all-types-of-image-files-to-jpeg-format.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3329593" width="1" height="1" alt="" /&gt;</description></item><item><title>Hey, Scripting Guy! Weekend Scripter: Converting PNG Files to JPEG Format</title><link>http://powershell.com/cs/blogs/hey-scriptingguy/archive/2010/05/01/hey-scripting-guy-weekend-scripter-converting-png-files-to-jpeg-format.aspx</link><pubDate>Sat, 01 May 2010 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:5472</guid><dc:creator>Anonymous</dc:creator><description>This week saw the kickoff and first week of the 2010 Scripting Games . The Scripting Wife is in the midst of things, so we decided to give her a break and let her catch her breath. You can catch up with her progress by reviewing the articles in the archive...(&lt;a href="http://blogs.technet.com/heyscriptingguy/archive/2010/05/01/hey-scripting-guy-weekend-scripter-converting-png-files-to-jpeg-format.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3329584" width="1" height="1" alt="" /&gt;</description></item></channel></rss>