PowerShellを立ち上げてみる。
「大きな違いは、コマンドプロンプトが、ファイル操作とプログラム実行が中心で機能が限られるのに対し、PowerShellはWindowsが備える大半の機能を実行でき、実に1000を超えるコマンドを利用できる。」
「PowerShellは基本的な機能をもつ様々なコンポーネントを組み合わせたタスクによって構成される。[9]コンポーネントは、コマンドレット (cmdlet) と呼ばれるプログラムであり、その実体は.NETのクラスである。」
よくわからんが、まずは例文をISEに打ってみた。
PS C:\Users\boboo> $rssUrl = "http://blogs.msdn.com/powershell/rss.aspx" PS C:\Users\boboo> $blog = [xml](New-Object System.Net.WebClient).DownloadString($rssUrl) PS C:\Users\boboo> $blog.rss.channel.item | Select title -first 8 title ----- Coming Soon – PowerShell in Azure Cloud Shell Windows 10 Creators Update and PowerShell DSC Announcing PowerShell for Visual Studio Code 1.0! PowerShell Core 6 Beta.1 Release OpenSSH Security Testing Kick Off DSC Configuration Sharing DSC Resource Kit Release April 2017 A Comparison of Shell and Scripting Language Security
RSSを取得して一部を表示できた。
さて、問題のプロクシ設定の切り替えだが。
PowerShellスクリプトの作成と実行 CapmNetwork
ここを見ると、バッチファイル, *.ps1として保存し、管理者として実行すればいいのだろう。