Manage Your Service Apps Faster

In the SharePoint 2010 Administrators Survival Camp that I teach for Critical Path Training I teach a module on PowerShell (and a whole bunch of tips and tricks along the way). One of the tips that I teach is to use the Resources list in Central Administration to create links to the most often used service applications. While teaching the module this month I began creating a Farm Build script based on Gary Lapointe’s Farm-SPBuild script from ISC London. The script creates the Farm that the student creates manually on the first day of class. I went on to add the following script to create the links to my “favorite” web apps.

#Get the URL to Central Administration
$caUrl = Get-spwebapplication -includecentraladministration | where {$_.IsAdministrationWebApplication} | select Url -First 1
#Filter the Service Apps by those we want links
$apps = Get-SPServiceApplication | ?{($_.TypeName -eq "User Profile Service Application") `
         -or ($_.TypeName -eq "Managed Metadata Service") `
         -or ($_.TypeName -eq "Business Data Connectivity Service Application") `
         -or ($_.TypeName -eq "Search Service Application")}

#Start our assignment for the web object
$spAssignment = Start-SPAssignment
#Grab our list in Central Admin
$list = (Get-SPWeb -identity $caUrl.Url -AssignmentCollection $spAssignment).Lists["Resources"]
#Enumerate the list and create links to each
foreach ($app in $apps)
    Write-Host "Adding" $app.DisplayName
    $item = $list.Items.Add()
    $item["URL"] = "$($app.ManageLink.Url), $($app.DisplayName)"
    $item["Comments"] = "Added From PowerShell"
#Dispose of the list
Stop-SPAssignment $spAssignment
#Open IE to Central Admin
Write-Host "Launching IE"
$ie = New-Object -com "InternetExplorer.Application"
$ie.Visible = $true

I added this to the end of the script that builds all my service applications and then when Central Administration opens I see this:

Management Links

|| PowerShell || SharePoint 2010

comments powered by Disqus

Let's Get In Touch!

Ready to start your next project with us? That’s great! Give us a call or send us an email and we will get back to you as soon as possible!