Webサービスを介して呼び出すc#からPowerShellコマンドを実行しています
これはコマンドですSet-MailboxAutoReplyConfiguration -identity
これが私のコードです。
string command = "Set-MailboxAutoReplyConfiguration -identity " + user;
Webサービスを通過するユーザー。
ただし、実行するとこのエラーが発生します。
System.Management.Automation.RemoteException: The term 'Set-MailboxAutoReplyConfiguration -identity babbey' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
コマンドの前後で&#39がどこから来ているのかわかりません。ただし、+user部分を削除すると正常に動作します。だから私の問題は、コマンド変数にある変数です。