12/04/2012

SharePoint 2007 PowerShell cmdlets

 

This article includes the 2007 functions to emulate the SharePoint 2010 cmdlets used in my series of articles in SharePoint Pro Magazine. The first article, Exploring and Inventorying SharePoint Using PowerShell, is here: http://www.sharepointpromag.com/article/sharepoint-server-2010/exploring-inventorying-sharepoint-using-powershell-144834 . Part 2 is here: http://sharepointpromag.com/sharepoint/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts with part 3 to follow.

Check back over the next week or two as I expand this content and add links to download the PowerShell module…

While this little project will in no way include all of the 500 SharePoint 2010 cmdlets, it will provide a core set of cmdlets needed to run my auditing and inventorying SharePoint 2010 PowerShell scripts. These cmdlets are implemented as PowerShell functions so you can study them and enhance them or even use them as models to create additional cmdlets. There will also be links to a download you can simply load them as a PowerShell module.

 

As a teaser… here's a starter set…   (check back in a few days for the full article)

Save the following as SP2007cmdlets.psm1:

#Notes:
# The scripts below are from http://TechTrainingNotes.blogspot.com 
# These scripts may be used in your projects but may not be republised in any form
# Formatting data found in SP2007cmdlets.format.ps1xml  (optional)

function Get-SP2007help
{
"Currently implemented cmdlets:"
"  Get-SPFarm"
"  Get-SPWebApplication"
"  Get-SPSite"
"  Get-SPWeb"
"  Get-SP"
}

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")


function Get-SPFarm()
{
  [Microsoft.SharePoint.Administration.SPFarm]::Local
}


function Get-SPWebApplication ($url)
{
  begin
  {  $foundit=$false
     if ($url -ne $null) { 
       $foundit=$true; 
       [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("$url") }
  }
  process
  {
  }
  end
  {
    if ($foundit -eq $false)
    {
       [Microsoft.SharePoint.Administration.SPWebService]::ContentService.WebApplications
    }
  }
}



function Get-SPSite ([string]$Identity, [string]$ContentDatabase)
{
<#
.SYNOPSIS
 Returns all site collections that match the given criteria.
.PARAMETER computername
  The computer name to query. Just one.
.DESCRIPTION
 The Get-SPSite cmdlet returns either a single site that matches the Identity parameter, or all the sites that match the Filter parameter for the specified scope. The scopes are the WebApplication, ContentDatabase , and SiteSubscription parameters. If none of these scopes is provided, the scope is the farm. If the scope is specified with parameter, all sites in that scope are returned.
.PARAMETER Identity 
 Specifies the URL or GUID of the site collection to get. The type must be a valid URL, in the form http://server_name or http://server_name/sites/sitename, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).
.PARAMETER ContentDatabase
Specifies the GUID of the content database from which to list site collections.

The type must be a valid database name, in the form  SPContentDB01, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).
#>

  begin
  {  $foundit=$false
     if ($Identity -ne "" -or $ContentDatabase -ne "") { 
       $foundit=$true;
       if ($ContentDatabase -ne "")
       {
         if(Test-TTNIsGuid($ContentDatabase))
         {
          Get-SPWebApplication | select -ExpandProperty ContentDatabases | where { $_.id -eq "$ContentDatabase"} | get-spsite
         }
         else 
         { 
          Get-SPWebApplication | select -ExpandProperty ContentDatabases | where { $_.name -eq "$ContentDatabase"} | get-spsite
         }
       }
       else
       {
         if ($Identity.toLower().StartsWith("http"))
           { New-Object Microsoft.SharePoint.SPSite("$Identity") }
         else 
           { New-Object Microsoft.SharePoint.SPSite([guid]"$Identity") }
       }
     }
  }
  process
  {
    if ($_ -ne $null)
    {
      $foundit=$true;  $_.Sites
    }
  }
  end
  {
    if ($foundit -eq $false)
    {
       Get-SPWebApplication | Get-SPSite
    }
  }
}


function Get-SPWeb ($url)
{
  begin
  {
     if ($url -ne $null) { (New-Object Microsoft.SharePoint.SPSite("$url")).OpenWeb() }
  }
  process
  {
     $_.AllWebs
  }
}


function Test-TTNIsGuid ($guid)
{
  # TechTrainingNotes helper function
  ($guid -match "^[A-Fa-f0-9]{32}$|({|\()?[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}(}|\))?$|^({)?[0xA-Fa-f0-9]{3,10}(, {0,1}[0xA-Fa-f0-9]{3,6}){2}, {0,1}({)([0xA-Fa-f0-9]{3,4}, {0,1}){7}[0xA-Fa-f0-9]{3,4}(}})$")
}

Save the following as SP2007cmdlets.format.ps1xml: 
( file to be posted with the complete article )
 
. 

11/27/2012

SharePoint 2013 First Looks for ITPros and Developers

 

I will be presenting two FREE First Look clinics this Friday at MAX Technical Training. You can attend these sessions in person at MAX's Mason, Ohio training center or remotely using your PC.

Just for fun, when registering… add a note that "Mike sent me!"  (Or maybe… "Attending in spite of Mike")

 

MS-40027 First Look: What's New for Developers in Microsoft SharePoint 2013

More info here: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=43826

This 1/2 day instructor-led developer first-look course provides an overview of the new features, functional areas, product enhancements, and application models in SharePoint 13.

At Course Completion

  • Provide an overview of the new features, functional areas, and product enhancements in SharePoint 2013.
  • Summarize the key features of the SharePoint 2013 application development platform and describe the key features of Marketplaces.
  • Explain what a SharePoint-Hosted app is, and describe how to build a SharePoint-Hosted app.
  • Explain what a Cloud-Hosted app is, and describe how to build a Cloud-Hosted app.
  • Describe how developers extend Office Application user interfaces by creating Apps for Office and publishing them in different catalogs.
  • Describe how to create and code a simple App for Office that interacts with document content.
  • Describe improvements in Manage Metadata Services, Enterprise Content Management and Web Content Management in SharePoint 2013.
  • Describe the new social networking functionality available to SharePoint 2013 App developers.
  • Describe how the new capabilities of the SharePoint Search engine can be used in SharePoint Apps.
  • Describe how to query the index from a SharePoint-Hosted app using CSOM.

 

MS-40028 First Look Clinic: What’s New for IT Professionals in Microsoft SharePoint Server 2013

More info here: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=44107

This 1/2 day instructor-led first-look clinic explains the new and improved product features as applicable to IT Professionals and how to install, deploy, manage, and administer SharePoint Server 2013. It also provides information on how to integrate SharePoint Server 2013 with key applications and how to maintain and troubleshoot SharePoint Server 2013.

At course completion:

  • Identify the major new features in SharePoint 2013 for IT Pros
  • Discuss the major architectural changes in SharePoint 2013
  • Describe the major changes to the BCS and the search service
  • Describe the new BI and composites features in SharePoint 2013
  • Describe the new content management and compliance features
  • Identify the new features for social computing and mobile users

 

See ya Friday!

 

.

11/15/2012

SharePoint 2013 Exams

 

The SharePoint 2013 exams are starting to show up!  As I prepare for these exams I will collect and share my notes. Of course all of these notes will only be from my prep and will not be updated after I take the exams.

If you are looking for the 2007 exams… well it's too late for all but one, at least according the exam pages at the Microsoft Learning site (70-631 expires 3/31/2011, 70-630 expires 9/30/12, 70-541 expires 6/30/11 and 70-542 expires 1/31/2013).

If you are looking for the 2010 exams and notes then see here: http://techtrainingnotes.blogspot.com/2010/02/sharepoint-certification.html
If you experienced at SharePoint 2010 then I would recommend taking the 2010 exams before taking the 2013 exams. There should be a lot of overlap in the core content that will help you with the 2013 exams.

MCSE!

Notice the new name for the certification, MCSE, not MSITP. And now "MCSE" = Microsoft Certified Solutions Expert, not Microsoft Certified System Engineer.

For SharePoint Administrators:

Windows Server 2012 certification plus the two SharePoint 2013 exams. Let me say that again… Windows Server 2012 certification… plus the two SharePoint exams gets you the MSCE. (Some more info here.)

For Windows Server 2012:

You will need to have the Microsoft Certified Solutions Associate (MCSA) certification for Server 2012. For this you will need:

  • Windows Server exams 70-410 plus 70-411 plus 70-412
  • Or the "SharePoint 2010 MCITP: SharePoint Administrator" plus 70-417

For SharePoint 2013, the above plus:

 

For SharePoint Developers:

(coming soon!)

 

.

SharePoint Admins… are you Windows Server 2012 MCSA certified?

 

The public certification exams for SharePoint 2013 will not be available until the first of the year. But… new for the SharePoint Server Administrator is the requirement to be “MCSA: Windows Server 2012” certified. (details here: http://www.microsoft.com/learning/en/us/certification/cert-sharepoint-server.aspx)

This is going to be a surprise to many SharePoint admins and something they need to get working on if they plan to be SharePoint 2013 certified. Existing SharePoint 2010 “MCITP: SharePoint Administrator” certified folks can upgrade by taking Exam 417.

Training:

The following classes are available to help get your there: 20417A: Upgrading Your Skills to MCSA Windows Server 2012 (5 Days) or 20410A plus 20411A plus 20412A (15 days total).

Here's the links to the exams:

70-410 Installing and Configuring Windows Server 2012

70-411 Administering Windows Server 2012

70-412 Configuring Advanced Windows Server 2012 Services

70-417 Upgrading Your Skills to MCSA Windows Server 2012

.

11/13/2012

Searching the MSDN and TechNet forums for SharePoint 2013

 

I'm doing a lot of 2013 work right now. Learning it, preparing for the exams, writing courseware, getting ready to deliver training sessions… all of which send me to the MSDN and TechNet forums to find stuff. The only problem is, there is no obvious way to search a single forum.

Use the Wiki Luke!

http://social.technet.microsoft.com/wiki/contents/articles/6453.how-to-use-the-search-in-the-msdntechnet-forums-and-library-en-us.aspx

There is a forum wiki article all about search and the tips there seem to work great for everything except for the SharePoint forums. The official way to search a single forum is to enter the following into the "Search TechNet with Bing" box on the TechNet pages or "Search MSDN with Bing" box on the MSDN pages:

keywords meta:Search.MSForums.GroupName(forumname)

The forumname is the name listed in the URL of the forum:
   http://social.msdn.microsoft.com/Forums/en-US/sharepointadminprevious/threads

There's a problem though… recently Microsoft rearranged and renamed many of the SharePoint forums. Instead of giving them useful names like 2013, 2010 and 2007 they called them (in the case of the admin forums) "sharepointadmin", "sharepointadminprevious" and "sharepointadminlegacy". (Makes you wonder what they will do when the next version is released!)

Second problem… to use the above tip you have to start in the right page. I have always thought that the forums were the forums. TechNet and MSDN where just two brandings of the same content. Doing a basic search in either returns content from both. Doing a basic search for a DEV topic in TechNet finds the DEV content and displays the DEV forums with a TechNet URL. (the same is true for basic searches in MSDN finding admin content and displaying it with an MSDN URL)

But when it comes to searching in MSDN for a SharePoint admin forum, it fails. I.e. Entering "meta:Search.MSForums.ForumName(sharepointadmin)" into "Search MSDN with Bing" will get zero results.

Repeating the same search in TechNet works! I.e. Entering "meta:Search.MSForums.ForumName(sharepointadmin)" into "Search TechNet with Bing" works!

 

Google to the Rescue?

OK, currently it looks like the best way to search the forums is by using Google. Sad smile

Enter the following into Google: (Thanks Robert Aldwinckle!)

keywords inurl:sharepointadmin site:microsoft.com intitle:2013

The text for inurl is the forum name as found in the URL to the forum.
  http://social.msdn.microsoft.com/Forums/en-US/sharepointadmin/...

Setting intitle to 2013 removes the "legacy" forums from the results.

So now I can search the "SharePoint 2013 - Setup, Upgrade, Administration and Operations" (sharepointadmin) for info about "Quick Launch":

Quick Launch inurl:sharepointadmin site:microsoft.com intitle:2013

 

So the forums actually came to the rescue in the end!

To see the discussion that led to this solution see here:
http://social.msdn.microsoft.com/Forums/en-US/reportabug/thread/1b94ec41-c2c7-406f-aa03-81179b40b1ce

 

.

11/09/2012

SharePoint 2013 Requirement: "The SharePoint parsing process crashes"

 

Yah, I know, it's just the title of a KB patch. But it sure looks like it's a requirement that SharePoint must crash Windows Server!

Minimum software requirements:
The SharePoint parsing process crashes in Windows Server 2008 R2"

 

image

.

11/05/2012

Finding the Missing SharePoint 2013 Slide Library


The Slide Library is not listed as an "App" or displayed in the old Create.aspx page (_layouts/create.aspx). But… you can still get it with a direct URL. I would not depend on it being there forever as the Slide Library is officially not in 2013, but for now you can create one.

The direct URL to create the old Slide Library:
http://yourserver/sites/yoursite/_layouts/15/slnew.aspx?FeatureId={0be49fe9-9bc9-409d-abf9-702753bd878d}&ListTemplate=2100


Update 11/9/12: I just tested the Office 365 (2013) Preview and it works there too!
Update 04/5/16: I just tested the Office 365 (current) and SP 2016 and it works there too!

SharePoint 2013 Education Templates

 

Does SharePoint 2013 have built-in education related sites, quizzes and tools for schools?

I'm starting my prep for the future SharePoint 2013 exams. In looking at the new PowerShell commands (there are 199 of them! 572 vs 771) I ran across these: Install-SPEduSites and New-SPEduClass. So far I can't find anything official on these new "education" features. PowerShell's help command only lists the name of the cmdlet and no description or other details.

  image

Below is all I've found so far. I'll update this as I find more… and please post comments to anything you may find. This may be an incomplete feature that may never be supported in 2013, or it may be a feature that becomes official in a future service pack, or it may only be available under a special school only edition. Who knows at this point…

 

What I've found so far:

Microsoft Goes Back to School and Gets Smart: SharePoint 2013 & Education Services
http://www.cmswire.com/cms/information-management/microsoft-goes-back-to-school-and-gets-smart-sharepoint-2013-education-services-017197.php

SharePoint Education – Installing and Configuring
http://blog.furuknap.net/sharepoint-education-installing-and-configuring

Some key SharePoint 2013 features (scroll down towards the end to find "Education Services"): (thanks Tanya for the link!)
http://www.sharepointgeoff.com/sharepoint-2013-features/

It appears to be managed from Central Administration:
http://imageshack.us/photo/my-images/831/centrald.png/

A question has been posted in the MSDN/TechNet forums, so a discussion has been started here:
http://social.msdn.microsoft.com/Forums/en-US/sharepointgeneral/thread/4851485e-5089-494b-bddd-1362eaebb0bf

 

.

11/03/2012

Moving SharePoint 2013 Web Parts

 

In SharePoint 2007 and 2010 we moved web parts by dragging them. That's still true for SharePoint 2013 web part pages, but for the wiki-style home pages you now cut and paste them! That's an improvement for consistency in home page editing, but also means that users need to know two ways to work with web parts.

Now for the details:

  • You can't Right-Click and Copy or Cut (no option in the popup menu)
  • You can't click the Copy or Cut buttons in the ribbon (unless you also include some non-web part text in your copy selection)
  • You can use Ctrl-C or Ctrl-X followed by a Ctrl-V in the new location if you first click the title bar area of the web part. The results are the same for both Copy and Cut. I.e. Copy followed by a Paste is actually a Cut and Paste operation. (strange!)   (So, if you want two of the same web part you have to insert it twice, not copy and paste.)
  • Copy of a web part from page A to page B looks like it works, but does not. The web part appears in page B when you paste, but disappears when you click Save.  (Bug!)

.

11/01/2012

Cincinnati SharePoint User Group Meeting

Date: 11/1/2012, Thursday
Time: 6:00 – 8:00 pm.
Where: Max Technical Training, 4900 Parkway Dr. #160 Mason, OH.
Click on the link for directions http://www.maxtrain.com/directions/

 

Next meeting: 11/1/2012 - 6:30 PM (Pizza and networking at 6:00 PM!)

November's presentation:

Vantiv team collaboration between the ePMO and Enterprise Collaboration Team is about to launch the second phase of MS Project Server 2010 / SharePoint 2010. This phase integrates all components including Project Management, Resource Management and Time Management.

Key members of this successful collaboration between business and technology will be presenting lessons learned as well as demo of:

  • Vantiv’s customized version of MSPS
  • Vantiv’s Project SharePoint sites
  • Use of various reporting tools: SSRS, SSAS, Excel Reporting Service

Speakers will be:

Manager Enterprise Collaboration Team Jenn Siebel

SharePoint / MSPS Administrator Johnathon Vasiliadis

Vantiv ePMO Governance/Methodology Jona Huffer

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.