文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== PowerShell リモートコマンド実行 ====== ===== PSRemoting の有効化 ===== <WRAP pewwrap 100%> <code powershell> $ sudo Enable-PSRemoting -SkipNetworkProfileCheck </code> </WRAP> <WRAP pewwrap 100% #result> <code powershell> WARNING: PowerShell remoting has been enabled only for PowerShell 6+ configurations and does not affect Windows PowerShell remoting configurations. Run this cmdlet in Windows PowerShell to affect all PowerShell remoting configurations. WinRM サービスの種類を正しく変更できました。 WinRM サービスが開始されました。 WinRM ファイアウォールの例外を有効にしました。 ローカル ユーザーにリモートで管理権限を付与するよう LocalAccountTokenFilterPolicy を構成しました。 WARNING: Waiting for service 'Windows Remote Management (WS-Management) (WinRM)' to stop... </code> </WRAP> <WRAP pewwrap 100%> <code powershell> $ sudo Set-Item WSMan:\localhost\Client\TrustedHosts -Value * </code> </WRAP> <WRAP pewwrap 100% #result> <code powershell> WinRM Security Configuration. This command modifies the TrustedHosts list for the WinRM client. The computers in the TrustedHosts list might not be authenticated. The client might send credential information to these computers. Are you sure that you want to modify this list? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y </code> </WRAP> ===== 参考文献 ===== [[https://docs.microsoft.com/ja-jp/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7|リモート コマンドの実行 - PowerShell | Microsoft Docs]]\\ [[https://blog.ipswitch.com/jp/how-to-run-commands-on-remote-computers-with-powershell|PowerShell を使ってリモートコンピュータでコマンドを実行する方法]]\\ **PowerShell Remoting**\\ [[https://ascii.jp/elem/000/001/694/1694500/|ASCII.jp:PowerShell Remotingで自宅にあるたくさんのWindowsマシンを管理する]]\\ windows/powershell/remote-commands.txt 最終更新: 2020/09/11 20:14by ともやん