Partilhar via


SPCmdlet.GetSwitch Method

Retrieves a SwitchParameter object, if one is found.

Namespace:  Microsoft.SharePoint.PowerShell
Assembly:  Microsoft.SharePoint.PowerShell (in Microsoft.SharePoint.PowerShell.dll)

Syntax

'Declaration
Protected Function GetSwitch ( _
    fieldName As String _
) As SwitchParameter
'Usage
Dim fieldName As String
Dim returnValue As SwitchParameter

returnValue = Me.GetSwitch(fieldName)
protected SwitchParameter GetSwitch(
    string fieldName
)

Parameters

  • fieldName
    Type: System.String

    A string that provides the field name.

Return Value

Type: SwitchParameter
Returns a SwitchParameter object, if one is found. Otherwise, this method returns a SwitchParameter object with a value of false.

See Also

Reference

SPCmdlet Class

SPCmdlet Members

Microsoft.SharePoint.PowerShell Namespace