external help file | Module Name | online version | schema |
---|---|---|---|
SPClientCore.dll-Help.xml |
SPClientCore |
2.0.0 |
Connects to a site.
Connect-KshSite [-Url] <Uri> [-ClientId <String>] [-Authority <Uri>] [-UserMode] [<CommonParameters>]
Connect-KshSite [-Url] <Uri> -Credential <PSCredential> [-ClientId <String>] [-Authority <Uri>] [-UserMode]
[<CommonParameters>]
Connect-KshSite [-Url] <Uri> -ClientId <String> [-Authority <Uri>] -CertificatePath <String>
-CertificatePassword <SecureString> [<CommonParameters>]
Connect-KshSite [-Url] <Uri> [-ClientId <String>] [-Authority <Uri>] [-Cached] [<CommonParameters>]
Connect-KshSite [-Url] <Uri> -ClientId <String> -ClientSecret <String> [<CommonParameters>]
The Connect-KshSite cmdlet creates new connection to a site.
PS C:\> Connect-KshSite -Url 'https://example.sharepoint.com'
Connects to a site with device code.
PS C:\> Connect-KshSite -Url 'https://example.sharepoint.com' -Credentials (Get-Credential)
Connects to a site with user name and password.
PS C:\> Connect-KshSite -Url 'https://example.sharepoint.com' -ClientId 'e157e5b9-f2df-4417-991d-60546d11c21d' -CertificatePath 'C:\Certificate.pfx' -CertificatePassword '********'
Connects to a site with client certificate.
PS C:\> Connect-KshSite -Url 'https://example.sharepoint.com' -Cached
Connects to a site with cached credentials.
PS C:\> Connect-KshSite -Url 'https://example.sharepoint.com' -ClientId '0c51fcfc-****-****-****-*************' -ClientSecret '********'
Connects to a site with client secret.
Specifies the authorization endpoint URL. This parameter is provided for some environment. (Germany, China, and US Government)
Type: Uri
Parameter Sets: ParamSet1, ParamSet2, ParamSet3, ParamSet4
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, uses the last login credentials.
Type: SwitchParameter
Parameter Sets: ParamSet4
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the password for certificate file (.pfx).
Type: SecureString
Parameter Sets: ParamSet3
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the path which located certificate file (.pfx).
Type: String
Parameter Sets: ParamSet3
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the app ID of Azure AD app or SharePoint add-in.
Type: String
Parameter Sets: ParamSet1, ParamSet2, ParamSet4
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: ParamSet3, ParamSet5
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the app secret.
Type: String
Parameter Sets: ParamSet5
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the credentials (user name and password) of Office 365.
Type: PSCredential
Parameter Sets: ParamSet2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the site URL.
Type: Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
If specified, connects with the user mode. (without admin consent)
Type: SwitchParameter
Parameter Sets: ParamSet1, ParamSet2
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.