Last active
May 10, 2022 22:37
-
-
Save soulhakr/8fda29f00cbefe0b11463f69280dbb67 to your computer and use it in GitHub Desktop.
[Get Remote Hostname (Powershell)] #powershell #pwsh #utility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Command -ComputerName (Read-Host -Prompt 'Enter the computer IP') -ScriptBlock { [System.Net.Dns]::GetHostName() } -Credential (Get-Credential) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment