Documentation for all public commands for the module can be viewed:
Get-Help -Full <commandName>
To use this module you need to create an Azure AD application. Once you have created the application you will need to perform the following tasks:
- Get the Client ID (Application ID) of the application
- Get the Tenant ID of the Azure AD environment
- Create a Client Secret or Client Certificate for the application
- Add the following Microsoft Graph Application Permissions to the application: Files.ReadWrite.All, Sites.ReadWrite.All, Users.Read.All
- If you are using a Client Certificate you must have it stored on your workstation or loaded in your workstation's certificate store
Connect-ODS -TenantId "00000000-0000-0000-0000-000000000000" -ClientId "00000000-0000-0000-0000-000000000000" -ClientSecret (ConvertTo-SecureString -String "000000000000000000000000000" -AsPlainText -Force)
Connect-ODS -TenantId "00000000-0000-0000-0000-000000000000" -ClientId "00000000-0000-0000-0000-000000000000" -ClientCertificate (Get-Item -Path 'Cert:\CurrentUser\My\0000000000000000000000000000000000000000)
Disconnect-ODS
New-OneDriveShortcut -Uri "https://contoso.sharepoint.com/sites/WorkingSite" -DocumentLibrary "Working Document Library" -UserPrincipalName "[email protected]"
New-OneDriveShortcut -Uri "https://contoso.sharepoint.com/sites/WorkingSite" -DocumentLibrary "Working Document Library" -UserPrincipalName "[email protected]" -ShortcutName "Working DL"
New-OneDriveShortcut -Uri "https://contoso.sharepoint.com/sites/WorkingSite" -DocumentLibrary "Working Document Library" -FolderPath "Working Folder" -UserPrincipalName "[email protected]"
New-OneDriveShortcut -Uri "https://contoso.sharepoint.com/sites/WorkingSite" -DocumentLibrary "Working Document Library" -FolderPath "Working Folder" -UserPrincipalName "[email protected]" -ShortcutName "Working"
Get-OneDriveShortcut -ShortcutName "Working Folder" -UserPrincipalName "[email protected]"
Remove-OneDriveShortcut -ShortcutName "Working Folder" -UserPrincipalName "[email protected]"