In SharePoint 2007 or 2010, if you cannot access the SharePoint user interface, you
can still use PowerShell to view and modify the site settings, including the
socialization settings, for a specific SharePoint site.
Note: This approach should
be done as a last resort when the screens are not working properly for some
reason. Using this approach does not perform a handshake with Jive so it can
cause SharePoint and Jive to not be in sync.
SharePoint 2007
Download and install PowerShell from Microsoft Support. Once installed, launch PowerShell by going to
Start > All Programs > Accessories > Windows PowerShell > Windows
PowerShell.
When PowerShell opens, you'll need to load the SharePoint libraries for
PowerShell. Do this by copying/pasting the following lines into the PowerShell
command window:
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
[System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
To view the settings:
$spsite = [Microsoft.SharePoint.SPSite] ("<root_web_url>")
$web = $spsite.OpenWeb("<relative_site_url>")
$ss = $web.properties["jive.sitesettings"]
$ss
For example:
PS C:\Users\Administrator> $spsite = [Microsoft.SharePoint.SPSite]("http://sharepoint.redlinkmobile.local/")
PS C:\Users\Administrator> $web = $spsite.OpenWeb("/marketing/")
PS C:\Users\Administrator> $ss = $web.properties["jive.sitesettings"]
PS C:\Users\Administrator> $ss
<jiveSiteSettings xmlns="http://jive.com/sharepoint/administration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
><InheritParentSettings>false</InheritParentSettings><DefaultJiveInstanceId>1</DefaultJiveInstanceId><SocializationEnab
led>true</SocializationEnabled><SocialTargets xmlns:a="http://schemas.datacontract.org/2004/07/Jive.SharePoint.Common.A
dministration"><a:SocialTarget><a:AccessControl>AllowMetaData</a:AccessControl><a:JiveGroupType>0</a:JiveGroupType><a:J
ivePlaceId>1001</a:JivePlaceId><a:JivePlaceName>Marketing</a:JivePlaceName><a:JivePlaceType>700</a:JivePlaceType><a:Use
rAccountForAccess>SP2007\kliemohn</a:UserAccountForAccess></a:SocialTarget></SocialTargets><StreamingEnabled>true</Stre
amingEnabled><SocializedSite>http://jive.redlinkmobile.local/rpc/rest/spintegration/sites/1000</SocializedSite></jiveSi
teSettings>
If you want to see the XML a little nicer you can copy the text out of the output
and paste it in notepad and then format it. Or, you can do the following:
$ssxml = [xml]$ss
$ssxml.jiveSiteSettings
$ssxml.jiveSiteSettings.SocialTargets.SocialTarget
For example:
PS C:\Users\Administrator> $ssxml = [xml]$ss
PS C:\Users\Administrator> $ssxml.jiveSiteSettings
xmlns : http://jive.com/sharepoint/administration
i : http://www.w3.org/2001/XMLSchema-instance
InheritParentSettings : false
DefaultJiveInstanceId : 1
SocializationEnabled : true
SocialTargets : SocialTargets
StreamingEnabled : true
SocializedSite : http://jive.redlinkmobile.local/rpc/rest/spintegration/sites/1000
PS C:\Users\Administrator> $ssxml.jiveSiteSettings.SocialTargets.SocialTarget
AccessControl : AllowMetaData
JiveGroupType : 0
JivePlaceId : 1001
JivePlaceName : Marketing
JivePlaceType : 700
UserAccountForAccess : SP2007\kliemohn
To clear out the settings simply do the following. Make sure you have saved your
site settings into a local variable ($ss) first in case you want to set them
back!
$web.properties["jive.sitesettings"] = ""
$web.properties.update()
If you go to your site socialization page you should see a notice in red that
"This site is inheriting Jive Socialization Settings from its parent site." In
addition, the rest of the screen should be disabled with the "No Socialization"
option selected.
To change your site settings back simply do the following:
$web.properties["jive.sitesettings"] = $ss
$web.properties.update()
Now if you go to your site socialization page you should see it back the way it
was before.
If you want to modify just pieces of the settings you can do something like the
following:
$ssxml.jiveSiteSettings.StreamingEnabled = "false"
$web.properties["jive.sitesettings"] = $ssxml.outerxml
$web.properties.update()
SharePoint 2010
Open the PowerShell command prompt on the SharePoint server by navigating to
Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint
2010 Management Shell.
To view the settings:
$web = Get-SPWeb <site_url>
$ss = $web.properties["jive.sitesettings"]
$ss
For example:
PS C:\Users\Administrator> $web = Get-SPWeb http://sharepoint.redlinkmobile.local/marketing
PS C:\Users\Administrator> $ss = $web.properties["jive.sitesettings"]
PS C:\Users\Administrator> $ss
<jiveSiteSettings xmlns="http://jive.com/sharepoint/administration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
><InheritParentSettings>false</InheritParentSettings><DefaultJiveInstanceId>1</DefaultJiveInstanceId><SocializationEnab
led>true</SocializationEnabled><SocialTargets xmlns:a="http://schemas.datacontract.org/2004/07/Jive.SharePoint.Common.A
dministration"><a:SocialTarget><a:AccessControl>AllowMetaData</a:AccessControl><a:JiveGroupType>0</a:JiveGroupType><a:J
ivePlaceId>1001</a:JivePlaceId><a:JivePlaceName>Marketing</a:JivePlaceName><a:JivePlaceType>700</a:JivePlaceType><a:Use
rAccountForAccess>SP2010\kliemohn</a:UserAccountForAccess></a:SocialTarget></SocialTargets><StreamingEnabled>true</Stre
amingEnabled><SocializedSite>http://jive.redlinkmobile.local/rpc/rest/spintegration/sites/1000</SocializedSite></jiveSi
teSettings>
If you want to see the XML a little nicer you can copy the text out of the output
and paste it in notepad and then format it. Or, you can do the following:
$ssxml = [xml]$ss
$ssxml.jiveSiteSettings
$ssxml.jiveSiteSettings.SocialTargets.SocialTarget
For example:
PS C:\Users\Administrator> $ssxml = [xml]$ss
PS C:\Users\Administrator> $ssxml.jiveSiteSettings
xmlns : http://jive.com/sharepoint/administration
i : http://www.w3.org/2001/XMLSchema-instance
InheritParentSettings : false
DefaultJiveInstanceId : 1
SocializationEnabled : true
SocialTargets : SocialTargets
StreamingEnabled : true
SocializedSite : http://jive.redlinkmobile.local/rpc/rest/spintegration/sites/1000
PS C:\Users\Administrator> $ssxml.jiveSiteSettings.SocialTargets.SocialTarget
AccessControl : AllowMetaData
JiveGroupType : 0
JivePlaceId : 1001
JivePlaceName : Marketing
JivePlaceType : 700
UserAccountForAccess : SP2010\kliemohn
To clear out the settings simply do the following. Make sure you have saved your
site settings into a local variable ($ss) first in case you want to set them
back!
$web.properties["jive.sitesettings"] = ""
$web.properties.update()
If you go to your site socialization page you should see a notice in red that
"This site is inheriting Jive Socialization Settings from its parent site." In
addition, the rest of the screen should be disabled with the "No Socialization"
option selected.
To change your site settings back simply do the following:
$web.properties["jive.sitesettings"] = $ss
$web.properties.update()
Now if you go to your site socialization page you should see it back the way it
was before.
If you want to modify just pieces of the settings you can do something like the
following:
$ssxml.jiveSiteSettings.StreamingEnabled = "false"
$web.properties["jive.sitesettings"] = $ssxml.outerxml
$web.properties.update()