Archive for the ‘PowerShell’ Category

How To Fix the User Profile Service Not Starting   Leave a comment

There could be many reasons for the Forefront Identity Service from not starting.  Spencer Harbor provides a pretty comprehensive article on this subject.  However, none of them worked for me.  I had the UPS Service configured correctly.  As it turned out in my case it seemed to only happen when I rebooted the server.  The resolve for me was the “Profile.ps1” file I created to incorporate the SharePoint PowerShell Snap-In.  Renaming this file or removing it solved my issue.

You can locate the Profile.ps1 file (if it exists) at: C:\Windows\system32\Windows PowerShell\1.0


Posted February 16, 2015 by Bismarck in PowerShell

How To Get SharePoint Site and Web Guids   Leave a comment

I received a request to export a list of all SharePoint Site Collection GUIDs. Each Site Collection (Site)and Sub-Site (Web) contains a GUID (Global Unique Identifier).

This script below will enumerate through a Web Application and export the Site Guids to a
Comma Delimited File (.csv).

Simply copy this script and Save as SP-ExportSiteAndWebGuids.ps1

#* Author: Paul D. Fox
#* Date: 07/04/2013
#* Description: PowerShell Script to List Site and Web GUIDs.
#* Purpose: This PowerShell Script will Export all of the SharePoint Site and Web GUIDs to a
#* Comma Delimited file.
#* Modifications: MM/DD/YYYY – Description
#* Execution: To run this script Open the PowerShell Snap-in navigate to the directory where
#* this script resides and type the following: .\SP-ExportSiteAndWebGuids.ps1
#* Note: List must reside prior to executing this script

#Reference the SharePoint Assembly

### Begin Variables ###
$webApplicationUrl=Read-Host `n`n”Type the Url of the Web Application you wish to get Site and Web GUIDs”`n
### End Variables ###

#Set Output File
set-variable -option constant -name out -value “C:\DisplaySiteWebGuids.csv”

$webapplication = Get-SPWebApplication $webApplicationUrl

#Enumerate each Site (Site Collection)
foreach($site in $webapplication.Sites){
#Enumerate each Web (Site)

foreach($web in $site.AllWebs){
write-host $web.title “:” $spweb.URL
write-host $
“Web Title: ” + $web.title | Out-File $out -Append
“Web : ” + $web.Url | Out-File $out -Append
“Web Id: ” + $ | Out-File $out -Append
Write-Host “Script Completed!”


Posted July 26, 2013 by Bismarck in PowerShell