{"id":2691,"date":"2013-10-21T11:59:00","date_gmt":"2013-10-21T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/10\/21\/powertip-search-for-youtube-videos\/"},"modified":"2013-10-21T11:59:00","modified_gmt":"2013-10-21T11:59:00","slug":"powertip-search-for-youtube-videos","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-search-for-youtube-videos\/","title":{"rendered":"PowerTip: Search for YouTube Videos"},"content":{"rendered":"<p><strong>Summary<\/strong>: Learn how to use Windows PowerShell to search YouTube videos.\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;How can I search for YouTube videos about Desired State Configuration in Windows PowerShell&nbsp;4.0?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;Use <strong>Invoke-RestMethod<\/strong>:<\/p>\n<p style=\"padding-left: 90px\">Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221;&nbsp;<\/p>\n<p style=\"padding-left: 60px\">The following command lists each video by title, author, and link:<\/p>\n<p style=\"padding-left: 90px\">Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221; | <br \/>foreach {[PSCustomObject]@{Title=$_.Title; Author=$_.author.name; Link=$_.content.src}} | Format-List<\/p>\n<p style=\"padding-left: 60px\">Prefer a function for your profile?<\/p>\n<p style=\"padding-left: 90px\">function Get-DSCVideos {<\/p>\n<p style=\"padding-left: 90px\">Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221; | <br \/>foreach {[PSCustomObject]@{Title=$_.Title; Author=$_.author.name; Link=$_.content.src}} | Format-List }\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to search YouTube videos. &nbsp;How can I search for YouTube videos about Desired State Configuration in Windows PowerShell&nbsp;4.0? &nbsp;Use Invoke-RestMethod: Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221;&nbsp; The following command lists each video by title, author, and link: Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221; | foreach {[PSCustomObject]@{Title=$_.Title; Author=$_.author.name; Link=$_.content.src}} | Format-List Prefer a function for [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,370,356,3,45],"class_list":["post-2691","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-june-blender","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to search YouTube videos. &nbsp;How can I search for YouTube videos about Desired State Configuration in Windows PowerShell&nbsp;4.0? &nbsp;Use Invoke-RestMethod: Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221;&nbsp; The following command lists each video by title, author, and link: Invoke-RestMethod -uri &#8220;https:\/\/gdata.youtube.com\/feeds\/api\/videos?v=2&amp;q=Desired+State+Configuration+PowerShell&#8221; | foreach {[PSCustomObject]@{Title=$_.Title; Author=$_.author.name; Link=$_.content.src}} | Format-List Prefer a function for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2691"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2691\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}