ネットワーク共有フォルダの管理には管理者権限が必要 前回に引き続き、PowerShellとWMIを使ってネットワーク共有リソースを管理する方法を紹介します。共有リソースの設定を変更するとき、PowerShellにも管理者権限が必要ですので、[管理者として実行]でPowerShellを起動してください。 ※「管理者として実行」については当記事の連載第20回を参照してください。 共有フォルダ設定の変更 PowerShellとWMIを使って既存の共有フォルダの設定を変更するためには、2つの方法があります。 1つは、Get-WmiObjectコマンドレットで共有オブジェクトを取得してから、そのSetShareInfoメソッド(メンバ関数)で設定する方法です。ただし、この方法で設定できるのは最大接続ユーザー数と、共有オブジェクトの説明文です。もう1つは、Get-WmiObject(省略形gwmi)で