Presentation is loading. Please wait.

Presentation is loading. Please wait.

This image was selected is show placement and can be replaced with another full slide image. The Amazing World of PowerShell with SharePoint Online (and.

Similar presentations


Presentation on theme: "This image was selected is show placement and can be replaced with another full slide image. The Amazing World of PowerShell with SharePoint Online (and."— Presentation transcript:

1 This image was selected is show placement and can be replaced with another full slide image. The Amazing World of PowerShell with SharePoint Online (and Azure) Todd Klindt, SharePoint MVP Distinguished Architect @toddklindt http://www.toddklindt.com/blog

2 2 Who is this Todd Klindt guy? WSS MVP since 2006 Speaker, writer, consultant, Aquarius, has never ridden a mule Personal Blog www.toddklindt.com/blog www.toddklindt.com/blog Company web site http://sharepoint.rackspace.com http://sharepoint.rackspace.com E-mail todd.klindt@rackspace.com todd.klindt@rackspace.com Twitter me! @toddklindt If you’re not already sick of him http://www.toddklindt.com/netcast

3 3 Agenda PowerShell with SharePoint Online cmdlets PowerShell with Windows Azure cmdlets PowerShell with CSOM

4 4 PowerShell with SharePoint Online Be prepared for disappointment Allows basic manipulation of SharePoint Online – Users and groups – Tenants – Site Collections Download here

5 5 Fire It Up! Windows 7 – Download and Install WMF 3.0WMF 3.0 Download and Install SPO Management ShellManagement Shell “Run As Administrator” if you have any problems Import-Module microsoft.online.sharepoint.powershell - DisableNameChecking

6 6 In All Its Glory 42 cmdlets! All in one module!

7 7 Get Connected

8 8 A Word About Credentials Don’t store them in plain text Save to a file – http://www.toddklindt.com/PoshSecurePasswords http://www.toddklindt.com/PoshSecurePasswords Per user, per machine

9 9 What Now? Mostly just look around 2 Connect/disconnect cmdlets 5 New/Add/Submit cmdlets 6 Set cmdlets 7 Remove cmdlets 7 Upgrade/repair cmdlets 14 Get cmdlets

10 10 What’s out there?

11 11

12 12 Create a Site Collection

13 13

14 14 Windows Azure AD / MSOnline cmdlets Can use Microsoft Online or Azure cmdlets as well Install the Sign-On AssistantSign-On Assistant Install the Azure AD ModuleAzure AD Module Connect to your tenant Add-Module msonline

15 15 WAAD cmdlets continued… 84 cmdlets Some overlap – User management – Group management Additional stuff – Licensing – Federation – Domains

16 16 Familiar Friends 16 www.rackspace.com

17 17 Fun Gotchas 17 www.rackspace.com

18 18 Don’t Try This At Home 18 www.rackspace.com

19 19 Real world example Param( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $User ) # Add the Active Directory bits and not complain if they're already there Import-Module ActiveDirectory -ErrorAction SilentlyContinue 19 www.rackspace.com

20 20 # Add the Azure Active Directory module Import-Module MSOnline # Define AD group that is synced to AAD and is used for ODFB audience $syncgroupname = "CloudSync" $syncgroup =Get-ADGroup $syncgroupname 20 www.rackspace.com

21 21 # Location to AAD Connect manual sync EXE # $syncclient = "C:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe" # Uncomment for old Azure AD Connect (shame, shame) # Name of the Azure License to apply $license = "reseller-account:ENTERPRISEPACK" 21 www.rackspace.com

22 22 # Azure AD domain suffix $aadsuffix = “tkdemo.com" # First, add the user to the group Add-ADGroupMember -Identity $syncgroupname -Members $User # Remind them to recompile their SharePoint audience Write-Host "You'll need to recompile your SharePoint audience to reflect the group change" 22 www.rackspace.com

23 23 # Sync up to Azure AD # & $syncclient # Old, crappy way Start-ADSyncSyncCycle # Now tweak the user in Azure AD # First connect Connect-MsolService # Get the user $aaduser = "$user@$aadsuffix" 23 www.rackspace.com

24 24 # Set the user's location. Without that the license will fail Set-MsolUser -UserPrincipalName $aaduser -UsageLocation "US" # Set the user's license Set-MsolUserLicense -UserPrincipalName $aaduser -AddLicenses $license 24 www.rackspace.com

25 25 The Sneaky Way: CSOM with PowerShell Can use the Client Side Object Model with PowerShell to do more Developery, be afraid Copy DLLs from server Or download SharePoint 2013 Client SDKSharePoint 2013 Client SDK

26 26 Top Of Script

27 27 Get-SPOweb Examples from: http://www.sharepointnutsandbolts.com/2 013/12/Using-CSOM-in-PowerShell-scripts- with-Office365.html http://www.sharepointnutsandbolts.com/2 013/12/Using-CSOM-in-PowerShell-scripts- with-Office365.html

28 28 More Examples

29 29 Patterns and Practices More scary developer stuff Hidden in Github Adds 157 more cmdlets – Get-Command - FullyQualifiedModule OfficeDevPnP.PowerShell.Comman ds http://dev.office.com/pnp

30 30 More links! New SharePoint CSOM version released for SharePoint Online - May 2016 Connect To All Office 365 Services With PowerShell Gary Lapointe’s SPO cmdlets SPO Automation cmdlets on Codeplex

31 Questions? (Make’m Easy Ones)

32 ONE FANATICAL PLACE | SAN ANTONIO, TX 78218 US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM © RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM US Thank you


Download ppt "This image was selected is show placement and can be replaced with another full slide image. The Amazing World of PowerShell with SharePoint Online (and."

Similar presentations


Ads by Google