{"id":4701,"date":"2009-01-11T13:41:00","date_gmt":"2009-01-11T13:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/01\/11\/finding-a-url-for-file-transfer-cmdlets\/"},"modified":"2019-02-18T13:12:54","modified_gmt":"2019-02-18T20:12:54","slug":"finding-a-url-for-file-transfer-cmdlets","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/finding-a-url-for-file-transfer-cmdlets\/","title":{"rendered":"Finding a URL For File Transfer Cmdlets"},"content":{"rendered":"<p>I just posted a <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2009\/01\/11\/transferring-large-files-using-bits.aspx\" target=\"_blank\">blog about our new File Transfer Cmdlets<\/a> in which I artfully dodged a difficult question:&nbsp; How do you get the URL to do the file transfer?&nbsp; Sometimes you are going to have it but other times you\u2019ll go to a website and it can be bloody impossible to find the URL that you need to download.&nbsp; That was the case with the example I used.&nbsp; Let me provide it.&nbsp; Navigate <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&amp;displaylang=en\" target=\"_blank\">HERE<\/a> and tell me if you can find the URLs to download the kits? (If you find out how \u2013 let me know \u2013 I\u2019d REALLY appreciate it.) <\/p>\n<p>My new motto is Experiment, Enjoy, Engage (which means share).&nbsp; Luckily, we have a great community of people already doing this.&nbsp; One of them is <a href=\"http:\/\/blog.robbiefoust.com\/\" target=\"_blank\">Robbie Foust<\/a>.&nbsp; Robbie recently wrote a <a href=\"http:\/\/blog.robbiefoust.com\/?p=68\" target=\"_blank\">Packet Sniffer For PowerShell<\/a>.&nbsp; I picked it up over the holidays and thought it was wicked cool but I wasn\u2019t sure when I would use it.&nbsp; Well\u2026. I didn\u2019t have to wait to long for that question to be answered.&nbsp; <\/p>\n<p>Here is how I got the URL for to transfer the file.&nbsp; I downloaded Robbie\u2019s script from <a href=\"http:\/\/poshcode.org\/get\/764\" target=\"_blank\">HERE<\/a>.&nbsp; I ran Get-Packet and it went displayed everything and caused a beep-storm on my PC.&nbsp; I thought about a minute and came up with the one-liner below.&nbsp; I navigated to the download page in my browser, ran the one-liner, clicked the download button, captured the packet, hit ESC to stop Get-packet and then stopped the file transfer.&nbsp; Here is what it looked like:<\/p>\n<p><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">PS&gt; Get-Packet |where {$_.data -match &#8220;download&#8221;} <br \/>Using IPv4 Address: 192.168.1.195 <\/font><\/p>\n<p><font face=\"Consolas\" color=\"#0000ff\" size=\"2\"><font color=\"#ff8000\">Press ESC to stop the packet sniffer &#8230;<\/font> <\/font><\/p>\n<p><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">Destination : 192.168.1.195 <br \/>Source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 207.46.19.254 <br \/>Version&nbsp;&nbsp;&nbsp;&nbsp; : 4 <br \/>Protocol&nbsp;&nbsp;&nbsp; : TCP <br \/>Sequence&nbsp;&nbsp;&nbsp; : 3205106908 <br \/>Window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 65535 <br \/>DestPort&nbsp;&nbsp;&nbsp; : 57728 <br \/>SourcePort&nbsp; : 80 <br \/>Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {PSH, ACK} <br \/>Data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : HTTP\/1.1 302 Found <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cache-Control: private <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Content-Type: text\/html; charset=utf-8 <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"#ff0000\">Location: <\/font><\/font><a href=\"http:\/\/download.microsoft.com\/download\/D\/0\/E\/D0E6D2C1\"><font face=\"Consolas\" color=\"#ff0000\" size=\"2\">http:\/\/download.microsoft.com\/download\/D\/0\/E\/D0E6D2C1<\/font><\/a> <br \/><font face=\"Consolas\" color=\"#0000ff\" size=\"2\"><font color=\"#ff0000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -2593-4017-B26D-7375BC9263D5\/PowerShell_Setup_amd64.msi <br \/><\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server: Microsoft-IIS\/7.0 <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X-AspNet-Version: 2.0.50727 <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P3P: CP=&#8221;ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TA <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI&#8221; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X-Powered-By: ASP.NET <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date: Sun, 11 Jan 2009 18:37:18 GMT <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Content-Length: 225 <\/font><\/p>\n<p><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;html&gt;&lt;head&gt;&lt;title&gt;Object moved&lt;\/title&gt;&lt;\/head&gt;&lt;body&gt; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h2&gt;Object moved to &lt;a href=&#8221;<\/font><a href=\"http:\/\/download.microsoft.com\/down\"><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">http:\/\/download.microsoft.com\/down<\/font><\/a> <br \/><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; load\/D\/0\/E\/D0E6D2C1-2593-4017-B26D-7375BC9263D5\/PowerShell_Setu <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p_amd64.msi&#8221;&gt;here&lt;\/a&gt;.&lt;\/h2&gt; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/body&gt;&lt;\/html&gt; <\/font><\/p>\n<p><font face=\"Consolas\" color=\"#0000ff\" size=\"2\">Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1\/11\/2009 10:36:44 AM <\/font><\/p>\n<p>Is that sweet or what?&nbsp; 10,000 thanks Robbie \u2013 you moved the ball forward.<\/p>\n<p>Experiment, Enjoy, Engage!<\/p>\n<p>Jeffrey Snover [MSFT] <br \/>Windows Management Partner Architect <br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a> <br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just posted a blog about our new File Transfer Cmdlets in which I artfully dodged a difficult question:&nbsp; How do you get the URL to do the file transfer?&nbsp; Sometimes you are going to have it but other times you\u2019ll go to a website and it can be bloody impossible to find the URL [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[110,137,210,270],"class_list":["post-4701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-bits","tag-ctp3","tag-jeffrey-snover","tag-powershell-v2"],"acf":[],"blog_post_summary":"<p>I just posted a blog about our new File Transfer Cmdlets in which I artfully dodged a difficult question:&nbsp; How do you get the URL to do the file transfer?&nbsp; Sometimes you are going to have it but other times you\u2019ll go to a website and it can be bloody impossible to find the URL [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=4701"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=4701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}