Presentation is loading. Please wait.

Presentation is loading. Please wait.

Painless PowerShell for SharePoint Admins Rick Taylor.

Similar presentations


Presentation on theme: "Painless PowerShell for SharePoint Admins Rick Taylor."— Presentation transcript:

1 Painless PowerShell for SharePoint Admins Rick Taylor

2 Special Thanks to our Platinum Sponsor …and our Gold Sponsor

3 Who am I??? Who am I ??????????

4 Rick Taylor, MCSE, MCT SharePoint architect, formerly with Microsoft SharePoint Platform Architecture Team for SharePoint Online (O365) Contact

5 Agenda What is Windows PowerShell Windows PowerShell basics Windows PowerShell scripts for administrators

6 Command-line interface and scripting language used for SharePoint Server administration Complements CMD Extends STSADM Uses XML & Objects Built on the.Net Framework What is Windows PowerShell?

7 cmdlet pronounced "command-let“ More than 500 cmdlets for SharePoint alone Windows PowerShell Basics

8 ©2012 Microsoft Corporation. All rights reserved.

9 SharePoint 2013 Nouns and Verbs 774 Total commands Nouns start with SP 334 Nouns

10 Windows PowerShell Basics cmdlets = verbs (actions) & nouns (objects) Combine the two to build specific commands Examples Get-SPSite Get = Verb SPSite = Noun

11 Get a list of all commands: Get-Command –noun sp* Get help for a specific command: Get-Help Getting the list of SharePoint cmdlets

12 Windows PowerShell for SharePoint Command Builder

13 For more detailed help add the following parameters: Get-Help -full Get-Help -examples Get-Help -detailed Getting the list of SharePoint cmdlets

14 Differences in Get-help: -full

15 Differences in Get-help: -detailed

16 Differences in Get-help: - examples

17 -WhatIf Evaluate what happens without side-effects

18 ©2012 Microsoft Corporation. All rights reserved.

19 Adding SharePoint Snap-In to ISE

20 Checking out Windows PowerShell DEMO

21 Build scripts to easily execute through common commands and tasks Develop using PowerShell ISE or other shells Schedule using Task Scheduler. PowerShell Scripts

22 SharePoint Basic Site Structure

23 Site Structure Creation CommandDescription New-SPManagedAccountRegisters a new managed account New-SPWebApplicationCreates a new web application New-SPContentDatabaseCreates a new content database for a web application New-SPManagedPathCreates a managed path New-SPSiteCreates a new site collection New-SPWebCreates a new web within a site collection

24 Permissions for Shell Admins for Backup and Restore Farm componentMember of Administrators group on the local computer Member of Farm Administrators SharePoint group Full Control on backup folder FarmYesNoYes Service applicationYesNoYes Content databaseYesNoYes Site collectionNoYes Site, list, document library YesNoYes

25 Examples: Activate a feature across multiple site collections Provisioning of Managed Accounts Creating of New Sites Backup all Site Collections in Farm PowerShell Scripts

26 Service Application Setup/Configuration Cmdlet NameExample Get-SPServiceInstance $svc = (Get-SPServiceInstance | ? {$_.TypeName -eq "Managed Metadata Web Service"}) Start-SPServiceInstance if ($svc.Status –eq "Disabled") { $svc | Start-SPServiceInstance } while($svc.Status -ne "Online") { Write-Host "Waiting to provision"; sleep 5; } New-SP*ServiceApplication PS C:\> Get-Command New-SP*ServiceApplication New-SP*ServiceApplicationProxy PS C:\> Get-Command New-SP*ServiceApplicationProxy New-SPServiceApplicationProxyGroup Add-SPServiceApplicationProxyGroupMember New-SPServiceApplicationProxyGroup "Demo" $mms = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "Managed Metadata Service Connection"} Add-SPServiceApplicationProxyGroupMember -Identity "Demo" - Member $mms

27 Connect-SPOService –Url https://apps2013demo-admin.sharepoint.comhttps://apps2013demo-admin.sharepoint.com –credential

28 PS C:\windows\system32> get-command -noun spo* | Group Noun Count Name Group SPOUser {Add-SPOUser, Get-SPOUser, Remove-SPOUser, S... 2 SPOService {Connect-SPOService, Disconnect-SPOService} 1 SPOAppErrors {Get-SPOAppErrors} 1 SPOAppInfo {Get-SPOAppInfo} 3 SPODeletedSite {Get-SPODeletedSite, Remove-SPODeletedSite,... 2 SPOExternalUser {Get-SPOExternalUser, Remove-SPOExternalUser} 7 SPOSite {Get-SPOSite, New-SPOSite, Remove-SPOSite, R... 4 SPOSiteGroup {Get-SPOSiteGroup, New-SPOSiteGroup, Remove SPOTenant {Get-SPOTenant, Set-SPOTenant} 1 SPOTenantLogEntry {Get-SPOTenantLogEntry} 1 SPOTenantLogLastAvaila... {Get-SPOTenantLogLastAvailableTimeInUtc} 1 SPOWebTemplate {Get-SPOWebTemplate} 1 SPOUpgradeEvaluationSite {Request-SPOUpgradeEvaluationSite}

29 Windows PowerShell for SharePoint Foundation us/library/ee662510(office.14).aspx us/library/ee662510(office.14).aspx Windows PowerShell Getting Started Guide us/library/aa973757(VS.85).aspx us/library/aa973757(VS.85).aspx Windows PowerShell Cheat Sheet STSADM to Windows PowerShell mapping Zach Rosenfield’s blog Additional PowerShell Resources

30


Download ppt "Painless PowerShell for SharePoint Admins Rick Taylor."

Similar presentations


Ads by Google