Query Host Name ?

  • 89 Views
  • Last Post 25 June 2017
manasrrp6 posted this 25 June 2017

Hi, 
How to find out the host name or computer name in  a domain, a user has currently logged onto ?
user name = known to me.host name = unknown to me, that to find out.
Please don't suggest me psloggedon tool or net view or any for script,  since it query the user name who logged onto remote computer. 
--
With Warm Regards,
Manas Dash.
AD & Exchange Admin
+91 9437615424
+91 7400342191
Skype : manasrrp6
Plant a Tree & Save the Earth.

bshwjt posted this 25 June 2017

Push the below one liner from GPO .
("$env:COMPUTERNAME"+"."+"$env:USERDNSDOMAIN"+":"+"$env:USERNAME").ToUpper() | Out-File -FilePath D:\Scripts\"$env:USERNAME".txtCopy-Item "$env:USERNAME".txt  \$Remoreserver\remoteshare$
RegardsBiswajit Biswas


show

Close