Comments? Questions? Have a look at my GitHub repo, where you can find this SharePoint Online solution and many others!

PowershellScripts @ GitHub

 

Support and description available: SharePoint Online SPOMod cmdlets & resources The .rar file contains the current version of the module and all the previous ones.

The module is a massive work comprising over 3000 lines of code and 50 SharePoint Online cmdlets

 

 

Get-SPOWeb

Get-SPOListCount

Get-SPOList

Set-SPOList

New-SPOList 

New-SPOListView

Set-SPOListView

Remove-SPOListView

Get-SPOListView

Set-SPOListCheckout

Set-SPOListVersioning

Set-SPOListMinorVersioning

Remove-SPOListInheritance

Restore-SPOListInheritance

Set-SPOListContentTypesEnabled

Remove-SPOList

Set-SPOListFolderCreationEnabled

Set-SPOListIRMEnabled

Get-SPOListColumn

New-SPOListColumn

Set-SPOListColumn

Remove-SPOListColumn

Get-SPOListColumnFieldIsObjectPropertyInstantiated

Get-SPOListColumnFieldIsPropertyAvailable

New-SPOListChoiceColumn

Get-SPOListFields

Get-SPOListItems

New-SPOListItem

Remove-SPOListItemInheritance

Remove-SPOListItemPermissions

Restore-SPOListItemInheritance

Remove-SPOListItem

Update-SPOListItem

Set-SPOFileCheckout

Approve-SPOFile

Set-SPOFileCheckin

Copy-SPOFile

Remove-SPOFile

Deny-SPOFileApproval

Get-SPOFileIsPropertyAvailable

Move-SPOFile

Publish-SPOFile

Undo-SPOFileCheckout

Undo-SPOFilePublish

Get-SPOFolderFilesCount

Get-SPOFolderFiles

Get-SPOFileByServerRelativeUrl

Get-SPOFolderByServerRelativeUrl

New-SPOListContentType

New-SPOSiteContentType

New-SPOSiteContentTypeColumn

New-SPOListContentTypeColumn

Get-SPOContentType

Remove-SPOContentType

Set-SPOContentType

Get-SPOListItemVersions

Connect-SPOCSOM  (for SharePoint Online)

Connect-SPCSOM  (for SharePoint Server)

 

You can find their descriptions here: SharePoint Online SPOMod cmdlets & resources

 

How to use it?

 

 

 

 

1. Install  SharePoint Online SDK.

 

2.  Search for those 2 files:

 

 

Did you find them at those exact paths? Cool! Move on to the next step.

No?

a) Find Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll   - where did you install your SDK?

b) Open SPOModCURRENT.psm1 in NotePad or Powershell ISE.

c) Scroll down to the (almost) very end

d) Replace the paths in inverted commas ("" "") with the paths on your computer

# Paths to SDK. Please verify location on your computer.

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" 

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" 

 

 

PowerShell
Edit|Remove
# Paths to SDK. Please verify location on your computer. 
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"  
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"  
 

 

 

e) Save the file.

 

 

 

3. Open any Powershell.

If you are using SharePoint Online Management Shell or Azure AD Module you will have more options. If not - it works as well.

 

4. Write:

Set-ExecutionPolicy unrestricted

 

5. Write:

Import-Module c:\thePathWhereYouDownloadedIt\SPOModCURRENT.psm1

 

or b) Import-Module c:\thePathWhereYouDownloadedIt\SPOModCURRENT.psm1 -Verbose

 

The -verbose option will allow you to see all the cmdlets included in the module.

 


 

6. Connect! Otherwise the cmdlets will return no data! :

Connect-SPOCSOM

 

7. Enjoy :)

 

As with all Powershell cmdlets Tab is your friend. If you want to retrieve some information, write Get- and tab through all the options. 

If you want to set some settings, enter Set-  and again Tab through all the options. 

If you want to check what parameters are required enter the name of the cmdlet, e.g. new-spolist -        and Tab will show you possible parameters.

Worried that you missed a required parameter? No worries! Powershell will ask you for any required data you forgot to enter.   

 

For more information on each cmdlet visit links below. Bear in mind that cmdlets in this module do not require you to use -UserName -Url -AdminPassword  after you have connected with Connect-SPOCSOM.

 

Get-SPOWeb

Get-SPOListCount

Get-SPOList

Set-SPOList

New-SPOList

Remove-SPOList

New-SPOListView

Set-SPOListView

Remove-SPOListView

Get-SPOListView

Set-SPOListCheckout

Set-SPOListVersioning

Set-SPOListMinorVersioning

Remove-SPOListInheritance

Restore-SPOListInheritance

Set-SPOListContentTypesEnabled

Set-SPOListFolderCreationEnabled

Set-SPOListIRMEnabled

Get-SPOListColumn

New-SPOListColumn

Set-SPOListColumn

Remove-SPOListColumn

Get-SPOListColumnFieldIsObjectPropertyInstantiated

Get-SPOListColumnFieldIsPropertyAvailable

New-SPOListChoiceColumn

Get-SPOListFields

Get-SPOListItems

New-SPOListItem

Remove-SPOListItemInheritance

Remove-SPOListItemPermissions

Restore-SPOListItemInheritance

Remove-SPOListItem

Update-SPOListItem

Set-SPOFileCheckout

Approve-SPOFile

Set-SPOFileCheckin

Copy-SPOFile

Remove-SPOFile

Deny-SPOFileApproval

Get-SPOFileIsPropertyAvailable

Move-SPOFile

Publish-SPOFile

Undo-SPOFileCheckout

Undo-SPOFilePublish

Get-SPOFolderFilesCount

Get-SPOFolderFiles

Get-SPOFileByServerRelativeUrl

Get-SPOFolderByServerRelativeUrl

New-SPOListContentType

New-SPOSiteContentType

New-SPOSiteContentTypeColumn

New-SPOListContentTypeColumn

Get-SPOContentType

Remove-SPOContentType

Set-SPOContentType

Get-SPOListItemVersions

Get-SPOTermStore

Get-SPOHashTagsTermSet

Get-SPOHashTagsTerms

Get-SPOKeyWordsTermSet

New-SPOTermGroup

Set-SPOTermGroup

Get-SPOTermGroups

New-SPOTermSet

Set-SPOTermSet

Get-SPOTermSets

Get-SPOTerm

Connect-SPOCSOM

 

 

 

 

Some Examples:

The cmdlets have at least a thousand of possible uses. Here's some:

 

 

 

 

Updates:

18/5/2015 - added BaseTemplate to Get-SPOList cmdlet

30/09/2015 - SecureStringed the password

02/10/2015 - Added new "View" cmdlets: Get-SPOListView, New-SPOListView, Remove-SPOListView, Set-SPOListView   

27/10/2015 -Added new "Content Type" cmdlets: New-SPOListContentType, Connect-SPOCSOM, New-SPOSiteContentType, New-SPOSiteContentTypeColumn, New-SPOListContentTypeColumn, Get-SPOContentType, Remove-SPOContentType, Set-SPOContentType

28/10/2015 -Added support links in the cmdlets for help 

23/02/2016 - Modified lookupValue in Get-SPOListItems

26/03/2016 - Added Get-SPOListItemVersions  cmdlet

02/08/2016 - Added 2 parameters to New-SPOListColumn cmdlet. The parameters allow to specify the lookup list and lookup field.

07/01/2017 - added new taxonomy cmdlets

06/03/2017 - added Connect-SPCSOM cmdlet so that the module can be used in SharePoint on premise;

  Connect-SPOCSOM and Connect-SPCSOM accept $credentials as one variable (thanks R.Variable)

04/09/2017 - added FolderUrl parameter to New-SPOListItem; added handling for 5000+ items list in Get-SPOListItems cmdlet

2019 - SPOMod can be also found at https://github.com/PowershellScripts where it welcomes all your comments and suggestions