PowerShell PowerShell ディスプレイの解像度を考慮したフォーム画面の作成例(System.Windows.Forms.SystemInformation の活用) # フォーム作成$Form = New-Object System.Windows.Forms.Form #SystemInformationからWorkingAreaのLocationとSizeを取得$maxlocation = ::Wo... 2021.08.01 PowerShell
EXCEL PowerShell 読みやすいコーディング技法(スプラッティングの活用) スプラッティングについて スプラッティングとは、パラメーター値のコレクションを1つの単位としてコマンドに渡す方法。 PowerShell は、コマンドパラメーターを使用して、コレクション内の各値を関連付けます。 Splatted パラメータ... 2021.07.30 EXCELPowerShell
PowerShell PowerShell スクリプト内の変数宣言を強制させる方法(VBAのOption Explicitに相当) スクリプトの先頭で 【Set-PSDebug -Strict】とすると、変数の宣言を強制させることができる。これまで自分が扱った言語(C言語 等)では、変数宣言が当たり前だったから、これは馴染む。使用例1:あえて代入間違えのコードの先頭に ... 2021.07.14 PowerShell
PowerShell PowerShell プログレスバーのサンプル 進捗状況を表示させる場合に利用する。for ($i = 1; $i -le 100; $i++){ Write-Progress "プログレスバーのサンプル" "進捗状況:" -PercentComplete $i Start-Sleep ... 2021.07.14 PowerShell
PowerShell 【PowerShell】 メッセージボックスの使い方 .net framworkを静的メソッドを呼び出すことで使える。# アセンブリの読み込みAdd-Type -Assembly System.Windows.Forms# メッセージボックスの表示 デフォルト$Ret = ::Show("省略... 2021.07.14 PowerShell
PowerShell 【PowerShell 】【インプット】コンソール入力例 Write-Host "Welcome to demo of powershell prompt input" -ForegroundColor DarkYellow$name= Read-Host -Prompt "Enter your ... 2021.07.08 PowerShell
PowerShell 【PowerShell】【TCP/IP】サーバとクライアントのサンプル サーバーとクライアント (TCP ソケット) |オペレーティング システム、スクリプト、PowerShell、およびセキュリティ|jesusninoc.comを参考に、ソースの一部パラメータを変更させてもらいました。まずサーバ側については、... 2021.06.28 PowerShell
Outlook [VBA] 【PowerShell】ファイル名をリネームする上で必要な【GetDetailsOf】の番号を取得するスクリプト 【PowerShell】ファイル名をリネームする上で必要な【GetDetailsOf】の番号を取得するスクリプト 2020.04.19 Outlook [VBA]PowerShellVBA
EXCEL 【PowerShell】更新日、またはメディアの撮影日を厳選にファイル名をリネームするスクリプト 更新日、またはメディアの撮影日を厳選にファイル名をリネームするスクリプト 2020.04.19 EXCELOutlook [VBA]PowerShellVBA
PowerShell 【PowerShell】管理者権限を使わず実行権限の変更から変更戻しを行う手順(最小限の設定変更と設定戻し方法) (1) 「PowerShell ISE」の起動 Windowsで「PowerShell ISE」を起動する。 (2) 初期値の確認 PS C:\xxx\yyy> Get-ExecutionPolicy Restricted ※statusが... 2016.01.14 PowerShell