Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Display the Current Time and Date on a Remote Computer

$
0
0

Summary: See how to use Windows PowerShell to display the current date and time on a remote computer.

Hey, Scripting Guy! Question How can I display the current date and time on a remote computer by using Windows PowerShell?

               Hey, Scripting Guy! Answer Use Windows PowerShell remoting, and the Invoke-Command cmdlet to run Get-Date.

                                     invoke-command -ComputerName dc1 -ScriptBlock {get-date}

                             A shorter version of this command is shown here:

                                     icm dc1 {get-date}


Viewing all articles
Browse latest Browse all 3333

Trending Articles