sharepoint - How to get SPServer's machine name? -
Usually in SharePoint, the name of an SPAserve machine is equal, but if we use it
Stsadm.exe -o renameserver -oldservername & lt; OldServerName & gt; -Ness Sercer Name & lt; NewServerName & gt;
change Name the server for, so how can I tell the name of an SPAs detecting agent?
If you use PowerShell, you can use any of these two commands :
[System.Net.Dns] :: GetHostName ()
$ env: COMPUTERNAME