How do I get machine name off of the SPContext
-
06-12-2019 - |
Domanda
Simple question... how do I get the machine name off of the SPContext object.
Soluzione
Maybe SPServer.Local is what you are looking for...
Altri suggerimenti
I'm not sure why you would use SPContext for that - perhaps you are looking for this instead: Environment.MachineName
Try HttpContext.Current.Server.MachineName
POSH Scripts to get you server info
(Get-SPServer has other params - check for unique server)
$myserver = Get-SPServer $myserver | select-object *
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange