This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.


The cmdlet connects you to a particular subsite or site collection where you want to perform other cmdlets (move items, create lists, change settings, etc.). It is necessary to run this cmdlet before other cmdlets. If you do not connect, other cmdlets will return an error or empty results.


 Parameter Name    Description
The URL of a site collection, e.g. 
 Username Mutually exclusive with Credential. The login name of a user, e.g.
 Credential Mutually exclusive with Username.


----- EXAMPLE 1 -----

Connect-SPOCSOM -Username -Url

 ----- EXAMPLE 2 -----

Connect-SPOCSOM -Username $username -Url $url

 ----- EXAMPLE 3 -----
Connect-SPOCSOM -Credential $cred -Url ""

See Also