共用方式為


SPGlobalAdmin.IsCurrentUserMachineAdmin Method

NOTE: This API is now obsolete.

Obsolete. In Windows SharePoint Services 2.0, the IsCurrentUserGlobalAdmin method returned a Boolean value that indicated whether the current user is a member of the local administrators group for the computer running SharePoint Foundation, and is maintained for backward compatibility.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Most of the functionality in this class is available in SPFarm or SPWebService.",  _
    False)> _
Public Function IsCurrentUserMachineAdmin As Boolean
'Usage
Dim instance As SPGlobalAdmin
Dim returnValue As Boolean

returnValue = instance.IsCurrentUserMachineAdmin()
[ObsoleteAttribute("Most of the functionality in this class is available in SPFarm or SPWebService.", 
    false)]
public bool IsCurrentUserMachineAdmin()

Return Value

Type: System.Boolean
true if the current user is a member of the local administrators group; otherwise, false.

See Also

Reference

SPGlobalAdmin Class

SPGlobalAdmin Members

Microsoft.SharePoint.Administration Namespace