MSTSC環境でコマンドを使用してリモート統合シャットダウンを実現
4926 ワード
リモートデスクトップの場合、windowsシステムは安全を考慮してスタートメニューにシャットダウンや再起動オプションを提供していませんが、このときどうすればいいのでしょうか.命令行は大きな役割を果たしました
12時のシャットダウンなど、ある時点でシャットダウンする必要がある場合は、次のコマンドを使用します.
shutdownコマンドが主に使用されていることがわかります.次に、パラメータの説明について説明します.
リモートアプリケーションの場合に加えて、他の場合でも半分の効果を達成することができます.簡単にいくつかの例を挙げて説明します.
1>>.1時間後に自動的にコンピュータを閉じたい場合は、ソフトウェアや映画をダウンロードしていますが、急用があって出かけます.どうすればいいですか.ダウンロードを停止しますか?もったいない!続けますか?ダウンロードが終わったら、パソコンはどうやって閉じますか?心配しないで!このコマンドを使用して解決できます.
これで安心して外に出ることができて、コンピュータが長期にわたって開いていることを心配する必要はありません.
2>>. RPCの脆弱性により、カウントダウンが自動的にシャットダウンされ、このコマンドを使用してカウントダウンの自動シャットダウンをキャンセルします.
3>>.複数のパソコンが統一的に電源を切る必要があり、1台で処理するのは不便で、合理的ではありません.shutdownコマンドとグループポリシー管理による統合導入が迅速かつ効率的
具体的な方法は以下の通りです.
ステップ1.「グループポリシーエディタ」ウィンドウの左側に「コンピュータ構成→Windows設定→セキュリティ設定→ローカルポリシー→ユーザーエンタイトルメント割り当て」を開き、右側のウィンドウで「リモートシステムから強制シャットダウン」を選択します.ポップアップ・ダイアログ・ボックスには、現在Administratorsグループのメンバーのみがリモート・シャットダウンを許可していることが表示されます.ダイアログボックスの下にある[ユーザまたはグループを追加]ボタンをクリックし、ポップアップダイアログボックスに[リモートユーザアカウント]を入力し、[OK]をクリックします.
ステップ2.各コンピュータに対して上記の操作を行うと、各コンピュータの「リモートユーザーアカウント」ユーザーにリモートシャットダウンの権限を付与します.
ステップ3.本体に「Shutdown-I」と入力すると、画面に「リモートシャットダウン」ダイアログが表示され、インストール状況がリモートコンピュータを制御する
では、ここで紹介します.より良い、より強力な応用方法は、発掘に残されています.メッセージ交換もできます
shutdown -s -t 0
shutdown -r -t 0
12時のシャットダウンなど、ある時点でシャットダウンする必要がある場合は、次のコマンドを使用します.
at 12:00 shutdown -s //key "Enter"
shutdownコマンドが主に使用されていることがわかります.次に、パラメータの説明について説明します.
shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/f]
[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
No args Display help. This is the same as typing /?.
/? Display help. This is the same as not typing any options.
/i Display the graphical user interface (GUI).
This must be the first option.
/l Log off. This cannot be used with /m or /d options.
/s Shutdown the computer.
/r Full shutdown and restart the computer.
/g Full shutdown and restart the computer. After the system is
rebooted, restart any registered applications.
/a Abort a system shutdown.
This can only be used during the time-out period.
/p Turn off the local computer with no time-out or warning.
Can be used with /d and /f options.
/h Hibernate the local computer.
Can be used with the /f option.
/hybrid Performs a shutdown of the computer and prepares it for fast startup.
Must be used with /s option.
/e Document the reason for an unexpected shutdown of a computer.
/o Go to the advanced boot options menu and restart the computer.
Must be used with /r option.
/m \\computer Specify the target computer.
/t xxx Set the time-out period before shutdown to xxx seconds.
The valid range is 0-315360000 (10 years), with a default of 30.
If the timeout period is greater than 0, the /f parameter is
implied.
/c "comment" Comment on the reason for the restart or shutdown.
Maximum of 512 characters allowed.
/f Force running applications to close without forewarning users.
The /f parameter is implied when a value greater than 0 is
specified for the /t parameter.
/d [p|u:]xx:yy Provide the reason for the restart or shutdown.
p indicates that the restart or shutdown is planned.
u indicates that the reason is user defined.
If neither p nor u is specified the restart or shutdown is
unplanned.
xx is the major reason number (positive integer less than 256).
yy is the minor reason number (positive integer less than 65536).
リモートアプリケーションの場合に加えて、他の場合でも半分の効果を達成することができます.簡単にいくつかの例を挙げて説明します.
1>>.1時間後に自動的にコンピュータを閉じたい場合は、ソフトウェアや映画をダウンロードしていますが、急用があって出かけます.どうすればいいですか.ダウンロードを停止しますか?もったいない!続けますか?ダウンロードが終わったら、パソコンはどうやって閉じますか?心配しないで!このコマンドを使用して解決できます.
shutdown –s –t 3600 ( 3600 , )
これで安心して外に出ることができて、コンピュータが長期にわたって開いていることを心配する必要はありません.
2>>. RPCの脆弱性により、カウントダウンが自動的にシャットダウンされ、このコマンドを使用してカウントダウンの自動シャットダウンをキャンセルします.
shutdown –a
3>>.複数のパソコンが統一的に電源を切る必要があり、1台で処理するのは不便で、合理的ではありません.shutdownコマンドとグループポリシー管理による統合導入が迅速かつ効率的
具体的な方法は以下の通りです.
ステップ1.「グループポリシーエディタ」ウィンドウの左側に「コンピュータ構成→Windows設定→セキュリティ設定→ローカルポリシー→ユーザーエンタイトルメント割り当て」を開き、右側のウィンドウで「リモートシステムから強制シャットダウン」を選択します.ポップアップ・ダイアログ・ボックスには、現在Administratorsグループのメンバーのみがリモート・シャットダウンを許可していることが表示されます.ダイアログボックスの下にある[ユーザまたはグループを追加]ボタンをクリックし、ポップアップダイアログボックスに[リモートユーザアカウント]を入力し、[OK]をクリックします.
ステップ2.各コンピュータに対して上記の操作を行うと、各コンピュータの「リモートユーザーアカウント」ユーザーにリモートシャットダウンの権限を付与します.
ステップ3.本体に「Shutdown-I」と入力すると、画面に「リモートシャットダウン」ダイアログが表示され、インストール状況がリモートコンピュータを制御する
では、ここで紹介します.より良い、より強力な応用方法は、発掘に残されています.メッセージ交換もできます