1 / 45

PowerShell with SharePoint 2013 and Office 365

PowerShell with SharePoint 2013 and Office 365. Jerry Yasir , www.NetComLearning.com SharePoint Server MVP , MCT MCSE SharePoint 2013, MCSA 2012. Agenda. SharePoint and PowerShell Basics Managing Web Applications and Site Collections Upgrading SharePoint Managing Apps with PowerShell

gizela
Download Presentation

PowerShell with SharePoint 2013 and Office 365

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PowerShell with SharePoint 2013 and Office 365 Jerry Yasir, www.NetComLearning.com SharePoint Server MVP, MCT MCSE SharePoint 2013, MCSA 2012

  2. Agenda SharePoint and PowerShell Basics Managing Web Applications and Site Collections Upgrading SharePoint Managing Apps with PowerShell Managing Office 365 & SharePoint Online

  3. PowerShell and SharePoint Basics

  4. Add PowerShell Snap-In to PowerShell • PowerShell does not Load SharePoint cmdLets • First Add SharePoint SnapIn to Load SharePoint cmdLets

  5. Working with SharePoint Objects

  6. Working with SharePoint Objects • Creating Site Collections and Sites • Moving Site Collections • Restoring Site Collection • Creating Web Applications • Working with Services • Managing Service Applications

  7. Upgrade to SharePoint 2013

  8. Getting Ready for Upgrade Test-SPContentDatabase& Mount-SPContentDatabase Deferred Site Collection Upgrade = New cmdlets Managing solutions in 14 / 15 hive Test-SPContentDatabase –Name Wss_Content –WebApplication http://servername Mount-SPContentDatabase –Name Wss_Content –WebApplication http://servername

  9. Content Database Upgrade

  10. Solution Management No Change with same commands Add-SPSolution Install-SPSolution Activates solution for web application(s) -CompatibilityLevel (14, 15) – Installs solution to 14 / 15 hive Add-SPSolution –LiteralPath C:\solution.wsp Install-SPSolution -Identity solution.wsp-GACDeployment-CompatibilityLevel15

  11. Deferred Site Collection Upgrades Cmdlets to: Manage Health Checks Upgrade Request Evaluation Site Collections Copy View upgrade status with Get-SPSite

  12. Site Collection Health Checks Test-SPSite Runs Site Collection Health Checks All rules by default or specify specific rule Repair-SPSite Automatically repairs all issues Test-SPSite –Identity http://server/sitecollection Repair-SPSite–Identity http://server/sitecollection

  13. Upgrading Site Collections Upgrade-SPSite Starts Upgrade Process on Site Collection Also resumes failed upgrades -Unthrottled – bypasses throttle limits -VersionUpgrade – used to upgrade from version 14 Upgrade-SPSite http://server/sitecollection -VersionUpgrade

  14. Monitoring Upgrade Status Get-SPSiteUpgradeSession Reports upgrade status for content db and site collection Use with -ContentDatabase or -Site Content Database requires a filter parameter: -HideWaiting -ShowCompleted -ShowFailed -ShowInProgress Get-SPSiteUpgradeSession –Site http://server/sitecolection $database = Get-SPContentDatabaseMyContentDb Get-SPSiteUpgradeSession –ContentDatabase $database -ShowInProgress

  15. Upgrade Evaluation Site Collections Request-SPUpgradeEvaluationSite Requests an upgrade evaluation site collection Target URL auto-generated -Email – specify whether site collection owner and farm admin receive notification Request-SPUpgradeEvaluationSite http://server/sitecollection

  16. Copying Site Collections Copy-SPSite Copies a site collection to a new URL -Identity – source URL -TargetUrl – destination URL -DestinationDatabase (optional) – name of new database Copy-SPSite http://server/sitecollection -DestinationDatabaseMyContentDb -TargetUrl http://server/sitecollection2

  17. Site Collection Upgrade

  18. Service Applications

  19. Automating Provisioning Most Service Applications deployed by: Creating a Service Creating a Proxy Parameters vary by application Service Application Name Database Application Pool Most SAs take time to provision

  20. Translation Provides translation capability with Bing Translation New-SPTranslationServiceApplication –Name TranslationService -ApplicationPool “SharePoint Web Services Default” –DatabaseServerMyDatabaseServer–DatabaseNameTranslationServiceDatabase New-SPTranslationServiceApplicationProxy–Name TranslationServiceProxy –ServiceApplicationTranslationService –DefaultProxyGroup

  21. Work Management Service Provides aggregation between SharePoint, Exchange, and Project New-SPWorkManagementServiceApplication –Name "WM Service App" -ApplicationPool “SharePoint Web Services Default” New-SPWorkManagementServiceApplicationProxy -name "WMServiceProxy" -ServiceApplication “WM Service App”

  22. Services Provisioning You need to Provision the Services from Services on Server Page $ExcelService = Get-SPServiceInstance | Where TypeName -like "Excel*" $ExcelService.Provision() Windows 7

  23. Provisioning Service Applications and Service Instances

  24. Managing Apps

  25. PowerShell – App Terminology AppPackage – physical file containing the app (.app) App – instance of an app on a given subsite .Idpropery used often in cmdlets

  26. Installing Apps with PowerShell Import-SPAppPackage – imports app package -Path – location of .app file -Site – URL of site collection -Source – MarketPlace / ObjectModel / CorporateCatalog / DeveloperSite Install-SPApp – installs instance of an app -Identity – app object -Web – URL to the site $spapppack = Import-SPAppPackage -Path .\myapp.app-Site http://dev.adventure.com -Source ObjectModel $appinstance= Install-SPApp -Web http://dev.adventure.com -Identity $spapppack

  27. Exporting Apps with PowerShell Get-SPAppInstance – returns an instance of an app -Identity – app instance -Web – URL of site Export-SPAppPackage – exports app package from content db -App – id of app -Path – path of exported file $appinstance = Get-SPAppInstance –Web http://dev.adventure.com | Where-Object { $_.Title -eq“AppTitle" } Export-SPAppPackage–App $appinstance.App–Path .\myexportedapp.app

  28. Uninstalling & Updating Apps Update-SPAppInstance – updates an instance of an app Uninstall-SPAppInstance – removes an instance of an app Get a reference to the previous app instance Import new App Package Update app instance using new app package $appInstance= Get-SPAppInstance -web http://dev.adventure.com | Where-Object { $_.Title -eq“AppTitle" } $appv2 = Import-SPAppPackage -Path .\myapp-v2.app -Site http://dev.adventure.com -Source ObjectModel Update-SPAppInstance – Identity $appInstance–App $appv2 #To Uninstall an App Uninstall-SPAppInstance-Identity $app

  29. Managing Apps with PowerShell

  30. Office365 & SharePoint Online

  31. Getting Started with PowerShell and SPO Base OS Windows Server 2012, Windows Server 2008 R2 SP1, Windows 8, Windows 7 SP1 .NET Framework 4.5 Windows Management Framework 3.0 Microsoft Online Services Sign-in Assistant All the latest updates Windows Azure AD Module for Windows PowerShell 32-bit Windows Azure AD Module for Windows PowerShell64-bit SharePoint Online Management Shell

  32. Connecting to SharePoint Online Connect-SPOService Connects to SharePoint Online -Url – URL to SharePoint Online tenant administration i.e.: https://mytenant-admin.sharepoint.com -Credential – complete username of a global administrator i.e.: admin@mytenant.onmicrosoft.com Connect-SPOService –Url https://mytenant-admin.sharepoint.com –Credential admin@mytenant.onmicrosoft.com

  33. What commands are available? Get-Command –Module Microsoft.Online.SharePoint.PowerShell

  34. Working with Site Collections Get-SPOSite Returns one or more site collections -Identity (optional) – URL of site collection -Limit (optional) – number of site collections to return Default 200, ALL can be used -Filter (optional) – server side filtering using { } Used in lieu of –Identity Note case sensitive operators (-like, -notlike, -eq, -ne) -Detailed – Returns non-default properties such as CompatibilityLevel Get-SPOSite Get-SPOSite -Detailed Get-SPOSite –Identity https://mytenant.sharepoint.com Get-SPOSite –Filter {Url -like “*term*}

  35. Creating new Site Collections New-SPOSite Creates a site collection -Url – full URL of new site collection -Owner – full user name of site owner i.e.: admin@mytenant.onmicrosoft.com -StorageQuota – in MB -Template (Optional) – i.e.: STS#0 Get-SPOWebTemplate – returns all installed site templates -Title (Optional) – name of site collection New-SPOSite -Url https://mytenant.sharepoint.com/sites/mynewsite -Owner user@domain.com -StorageQuota 1000 -Title "My new site collection“ –Template STS#0

  36. Deleting Site Collections Remove-SPOSite Moves site collection to recycle bin -Identity – URL of site collection Supports –confirm and -NoWait Remove-SPOSite –Identity http://mytenant.sharepoint.com/sites/sitename -NoWait

  37. Restoring Site Collections Restore-SPODeletedSite Restores a site collection from the recycle bin -Identity – URL of site collection Restore-SPODeletedSite–Identity http://mytenant.sharepoint.com/sites/sitename -NoWait

  38. Upgrading Site Collections Test-SPOSite -Identity – URL of site collection Upgrade-SPOSite -Identity – URL of site collection -V2VUpgrade – Required to do a version upgrade -QueueOnly – only add the site collection to the upgrade queue Test-SPOSite -Identity http://mytenant.sharepoint.com/sites/sitename Upgrade-SPOSite -Identity http://mytenant.sharepoint.com/sites/sitename -V2VUpgrade

  39. Working with Users Get-SPOUser -Site – full URL of site collection -LoginName (Optional) – specific user account name i.e.: admin@mytenant.onmicrosoft.com Add-SPOUser Adds existing user to a SharePoint Group -Site – full URL of site collection -LoginName – specific user account name -Group – SharePoint group Get-SPOUser -Site https://mytenant.sharepoint.com -LoginName user@domain.com Add-SPOUser -Site https://mytenant.sharepoint.com -LoginName user@domain.com -Group "Team Site Members“

  40. PowerShell with Office 365 and SharePoint Online

  41. ThanksStick around for Q & A

  42. www.netcomlearning.com PowerShell 3.0 Courses Automating Administration with Windows PowerShell (10961) • July 22nd DC, NYC & Live Online • September 16th DC, NYC & Live Online Pre-requisites: • Previous Windows Server and Windows Client management knowledge and hands on experience • Experience Installing and Configuring Windows Server into existing enterprise environments, or as standalone installations. • Knowledge and experience of network adapter configuration, basic Active Directory user administration, and basic disk configuration. Locations: Attend in-class or Live Online Instructor-led • New York • Las Vegas (All Inclusive Travel Package) • Arlington VA

  43. www.netcomlearning.com MCSE: SharePoint MCSE: SharePoint • 20331: Core Solutions of Microsoft SharePoint Server 2013 • 20332: Advanced Solutions of Microsoft SharePoint Server 2013 Upcoming Classes: • August 5th in NYC, DC & Live Online • August 26th in Las Vegas & Live Online ** Contact Netcom Learning for SharePoint 2010 Course Schedules Locations: Attend in-class or Live Online Instructor-led • New York • Las Vegas (All Inclusive Travel Package) • Arlington VA • Philadelphia, PA

  44. www.netcomlearning.com MCSD: SharePoint Developer MCSD: SharePoint Developer • 20488: Developing Microsoft SharePoint Server 2013 Core Solutions • 20489: Developing Microsoft SharePoint Server 2013 Advanced Solutions Upcoming Classes: • September 23rd in NYC, DC & Live Online • October 7th in Las Vegas & Live Online (All Inclusive Travel Package) Locations: Attend in-class or Live Online Instructor-led • New York • Las Vegas (All Inclusive Travel Package) • Arlington VA

  45. Q & A 1-888-5-NETCOM (563-8266) info@netcomlearning.com www.NetComLearning.com

More Related