Insight Enterprises, Inc. (NASDAQ: NSIT) (“Insight” or “the Company”), a leading global technology provider of hardware, software and service solutions, has announced that its U.S. operating subsidiary will acquire Tempe-based Ensynch, a leading professional services firm with multiple Microsoft Gold competencies and solutions across the complete IT stack. Ensynch’s 2010 services revenue was $16.2 million. The transaction is expected to close within thirty days.
Full Press Release
SharePoint Redemption
Tuesday, September 20, 2011
Wednesday, August 24, 2011
PowerShell Script: Create Content Type, Assign Retention and Audit Policies, Publish Via Content Hub
First I need to make sure to identify the source of most of this script: Phil Childs at http://get-spscripts.com/. He has a great site with lots o' PowerShell scripts for SharePoint.
I needed a script that could read from an input file (this case I used a CSV) and create a Content Type, assign retention and audit policies to it, and publish it afterwards (this was on a content type syndication hub). I took several different scripts and cobbled them together for the following:
$SiteColl = read-host "What is the URL of the target site collection?";
$ParentContentType = read-host "What is the Parent Content Type?"
$CTGroup = read-host "What Content Type Group Should These Be Created Under?";
$CTList = Import-Csv ContentTypes.txt
ForEach ($item in $CTList){
$Record = $($item.Record)
$Description = $($item.Description)
$Property = $($item.Property)
$Period = $($item.Period)
$PeriodType = $($item.PeriodType)
$site = get-spsite $SiteColl
$web = $site.openweb()
$ctypeName = $Record
$ctypeParent = $web.availablecontenttypes[$ParentContentType]
<# Create Content Type #>
$ctype = new-object Microsoft.SharePoint.SPContentType($ctypeParent, $web.contenttypes, $ctypeName)
$ctype.Description = $Description
$ctype.group = $CTGroup
$ctype = $web.contenttypes.add($ctype)
write-host $Record : "Content Type Created" -foregroundcolor green;
<# Set Retention and Audit Policies #>
if (($Period -ne "IND") -or ($Period -notcontains "MAX")) {
$contentType = $web.ContentTypes[$Record];[Microsoft.Office.RecordsManagement.InformationPolicy.Policy]::CreatePolicy($contentType, $null);
$newPolicy = [Microsoft.Office.RecordsManagement.InformationPolicy.Policy]::GetPolicy($contentType);
$newPolicy.Items.Add("Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration",
"<Schedules nextStageId='3'>"+
"<Schedule type='Default'>"+
"<stages>"+
"<data stageId='1' stageDeleted='true'></data>"+
"<data stageId='2'>"+
"<formula id='Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration.Formula.BuiltIn'>"+
"<number>"+$Period+"</number>"+"<property>"+$Property+"</property>"+
"<period>"+$PeriodType+"</period>"+
"</formula>"+
"<action type='action' id='Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration.Action.MoveToRecycleBin' />"+
"</data>"+
"</stages>"+
"</Schedule>"+
"</Schedules>");
$newPolicy.Items.Add("Microsoft.Office.RecordsManagement.PolicyFeatures.PolicyAudit",
"<Audit>"+
"<Update />"+
"<View />"+
"<CheckInOut />"+
"<MoveCopy />"+
"<DeleteRestore />"+
"</Audit>");
$newPolicy.Update();
write-host $Record : "Retention Policy of" $Period $PeriodType "assigned." -foregroundcolor yellow;
write-host " ";
}
else{
write-host "No Retention Policy Required" -foregroundcolor DarkCyan;
write-host " ";
}
<# Publish Content Type #>
$Publisher = New-Object Microsoft.SharePoint.Taxonomy.ContentTypeSync.ContentTypePublisher($SiteColl)
Write-Host "Publishing the content type.";
$Publisher.Publish($ctype);
}
The import file had the following formatting:
Record,Description,Property,Period,PeriodType
Billing,Billing for Completed Invoices,Document_x0020_Date,6,years
- Record = Name of Content Type
- Description = Populates Description Field of Content Type
- Property = Internal Name of Field to Base Retention Policy On
- Period = How Long of a Retention Period
- PeriodType = Years, Months, Days
Jeff
Labels:
PowerShell,
SP2010
PowerShell Script: Add a Site Column to Multiple Content Types
I needed to add a single column to multiple content types but couldn't add it to the parent because not all of the child content types needed this new column. PowerShell to the rescue!
Obviously I created the site column first... Then I used an import file and a ForEach loop to read each content type in by Name.
<# Gather variables #>
$siteColl = read-host "What is the target site collection?";
$fieldToAdd = read-host "Which site column should be added the content types in contentTypes.txt?";
<# Import from external CSV file #>
$CTList = Import-Csv contentTypes.txt
ForEach ($item in $CTList){
$TargetCT = $($item.TargetCT)
$web = Get-SPWeb $siteColl
$ct = $web.ContentTypes[$TargetCT]
<# Get link to the columnn from web #>
$spColumn = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields[$fieldToAdd])
<# Add the column to the content type #>
$ct.FieldLinks.Add($spColumn)
$ct.Update()
}
<# Dispose #>
$web.Dispose()
Jeff
Labels:
PowerShell,
SP2010
Wednesday, February 16, 2011
BCS, PeopleSoft, and the SharePoint User Profiles
I was trying to import PeopleSoft data into SharePoint User Profiles using a BCS connection to an Oracle view that was provided by my DBA. The only field that existed in both environments was “NTUSERNAME”. Although not the most ideal, this would work as they are unique in their environment (Single Domain/Forest). I had the connection working and returning data to a list so I thought I was home free. I went into the ForeFront Identity Manager Client and made the change to my BCS Management Agent so that “NTUSERNAME” from PeopleSoft was matching up to the Metaverse “username” field populated by “sAMAccountName” from AD. Figured I was good to go. Kicked off a full synchronization and a whopping two accounts matched up out of almost 2000 expected.
<INSERT DAYS OF BANGING HEAD AGAINST WALL>
We started to look and see what was different about these two accounts. Using TOAD we ran the query that was providing the View and looked for the two accounts. Strangely enough they were lowercase and all the others returned were UPPERCASE. I hit up my Identity guys and they said that shouldn’t matter in a Join. For giggles though, I had my DBA re-write the query so it returned ALL values in the NTUSERNAME field as lowercase. I ran a full synchronization and they came over like a champ!
Just throwing it out there in case I can save anyone else from a world of frustration…
Jeff
<INSERT DAYS OF BANGING HEAD AGAINST WALL>
We started to look and see what was different about these two accounts. Using TOAD we ran the query that was providing the View and looked for the two accounts. Strangely enough they were lowercase and all the others returned were UPPERCASE. I hit up my Identity guys and they said that shouldn’t matter in a Join. For giggles though, I had my DBA re-write the query so it returned ALL values in the NTUSERNAME field as lowercase. I ran a full synchronization and they came over like a champ!
Just throwing it out there in case I can save anyone else from a world of frustration…
Jeff
Friday, August 20, 2010
Oh Site Directory, Where Art Thou?
According to a colleague, he thought he saw something somewhere that stated there were issues during upgrades with the Site Directory template they came up with for 2010 so they just removed it...
But there is hope! Some MCS UK guys created a solution and placed it out on CodePlex. This site directory solution has a few sweet features like scanning for new sites and deleting old ones that are missing (including being able to configure how many times a site must be missing before being removed).
http://spsitedirectory2010.codeplex.com/
There is a good install guide up on the CodePlex site (make sure to take the time to walk through it).
There are multiple features that are installed and need to be enabled at the site collection and site level with the SP2010 Site Directory solution. Make sure to enable them on the site/site collection you wish to display your Site Directory. Once you enable those you get a list called “Site Listings”. This list will be populated with the information grabbed by the Site Scan Timer Job.
Once those features are enabled, go to Central Admin and make sure that the solution is deployed to the Central Admin web app also (or else you get an Admin Pages error). Configure all the settings for both scan and delete. Then go to the Timer Jobs and manually kick off the Microsoft.MCSUK.SPSiteDirectory2010 Scan Job. This will populate your list.
You get one web part (that I could find) to work with. It displays the current sites information:
Not really a Site Directory per se. So, I then added a Content Query Web Part and configured it to point to the “Site Listings” list. This new CQWP is sweet. You can tell it what column to use for Title, Description, Link, and Image. I configured it for the following:
We now have a web part that acts more like a Site Directory.
Thanks again to MCS UK team for putting this solution together!
Jeff
But there is hope! Some MCS UK guys created a solution and placed it out on CodePlex. This site directory solution has a few sweet features like scanning for new sites and deleting old ones that are missing (including being able to configure how many times a site must be missing before being removed).
http://spsitedirectory2010.codeplex.com/
There is a good install guide up on the CodePlex site (make sure to take the time to walk through it).
There are multiple features that are installed and need to be enabled at the site collection and site level with the SP2010 Site Directory solution. Make sure to enable them on the site/site collection you wish to display your Site Directory. Once you enable those you get a list called “Site Listings”. This list will be populated with the information grabbed by the Site Scan Timer Job.
Once those features are enabled, go to Central Admin and make sure that the solution is deployed to the Central Admin web app also (or else you get an Admin Pages error). Configure all the settings for both scan and delete. Then go to the Timer Jobs and manually kick off the Microsoft.MCSUK.SPSiteDirectory2010 Scan Job. This will populate your list.
You get one web part (that I could find) to work with. It displays the current sites information:
Not really a Site Directory per se. So, I then added a Content Query Web Part and configured it to point to the “Site Listings” list. This new CQWP is sweet. You can tell it what column to use for Title, Description, Link, and Image. I configured it for the following:
We now have a web part that acts more like a Site Directory.
Thanks again to MCS UK team for putting this solution together!
Jeff
Tuesday, March 23, 2010
Custom Alert Templates - Larger Font
For those of you who do not feel like going through the entire alerttemplates.xml file I recently had to do it for a client who wanted larger fonts in the emails that were sent out for alerts and notifications. I changed all fonts to Tahoma 12pt except for the Header which was already large enough. Nothing fancy. Just throwing it out there.
NOTE: Never modify the alertstemplates.xml directly. Make a working copy and use it with the stsadm command.
Drop the file onto your server and run the following stsadm command:
Syntax: stsadm -o updatealerttemplates -url {sitecollectionurl} -f {CustomAlertTemplate XML File}
Example: stsadm -o updatealerttemplates -url {sitecollectionurl} -f C:\customalerttemplates.xml
Remember, this is per site collection and you have to re-run the command each time you update the template as it stores the alert format in the database.
MSDN Description of Pre-defined Alert Templates: http://msdn.microsoft.com/en-us/library/bb802738.aspx
Download My Customized Template
NOTE: Never modify the alertstemplates.xml directly. Make a working copy and use it with the stsadm command.
Drop the file onto your server and run the following stsadm command:
Syntax: stsadm -o updatealerttemplates -url {sitecollectionurl} -f {CustomAlertTemplate XML File}
Example: stsadm -o updatealerttemplates -url {sitecollectionurl} -f C:\customalerttemplates.xml
Remember, this is per site collection and you have to re-run the command each time you update the template as it stores the alert format in the database.
MSDN Description of Pre-defined Alert Templates: http://msdn.microsoft.com/en-us/library/bb802738.aspx
Download My Customized Template
Labels:
Branding,
Development
Tuesday, October 20, 2009
SPC 2009: SharePoint 2010 Upgrade Part 1: Fundamentals
Upgrade Part 1 Fundamentals Break-out session notes from SPC 2009.
NOTE: New content just uploaded to TechNet for Upgrade Scenarios HERE.
Upgrade Scenarios
- Supported Scenarios:
- In-Place Upgrade
- Database Attach Upgrade:
- Content Database
- Profile Service Database
- Project Service Database
- Singlie Click Install – SQL Migration
- Windows Internal Database > SQL Express 2008 + File Stream RBS
- Unsupported
- Upgrade from earlier than WSS v3 SP2 or MOSS 2007/SP2
- Direct upgrade from WSS v2/SPS 2003 or earlier
- Side by Side installation
- Gradual Upgrade
Upgrade Prep Tools
- WSS v3/MOSS 2007 SP2
- Farm Insight
- Pre-Upgrade Checker
- stsadm –o EnumAllWebs (Now includes the features that are installed in a Web)
- SPDiag V2
- Customizations gathering
- stsadm –o ExportIPFSAdminObjects
- SharePoint 2010
- Farm Insight
- stsadm –o EnumAllWebs
- SPDisg 2010 (TBD)
- Content Database Insight
- Test-SPContentDatabase
Pre-Upgrade Checker Command
Command: stsadm –o preupgradecheck [-localonly]
- Details
- Reports farm and server data
- Identifies useful farm information
- Identifies current or potential issues
- Modes
- Load server + farm databases (default)
- Local server only
- Makes no changes to environment or data (Yes! This was a huge complaint with going from 2003 to 2007)
- Introduced in SP2; improved in October 2009 CU
- Not required like it was for upgrading from 2003 to 2007 but still highly recommended
- Rules Files (Partial List)
- Informational
- Farm Servers, Databases
- AAM Configuration
- Lists Site Definitions, Features, Web Parts, Event Receivers
- Installed Language Packs
- CAML views/CAML content types
- Issues
- Missing Site Definitions, Features, Assemblies
- Data orphans
- Modified content databases
- Command outputs an easy to read HTML-based file
Test-SPContentDatabase Command
- Content database insight from O14
- Complements pre-upgrade checker report
- Reports data from server/database paring
- Compare against a specific web app
- Identifies current or potential issues:
- Data orphans
- Missing site definitions
- Missing features
- Missing assemblies
- Can show table sizing metrics
- Scan O12 and O14 content databases
- Makes no changes to the database(s)
Windows PowerShell Upgrade Cmdlets
Note: B2B – Patching Upgrades,V2V Version to Version Upgrade
- Upgrade-SPContentDatabase
- Content database B2B/V2V upgrade
- Common Scenarios:
- Initiate/resume content database B2B upgrades
- Resume failed content database V2V upgrades
- Upgrade-SPEnterpriseSearchServiceApplication
- Search Service Application Instance B2B upgrade
- Upgrade-SPSingleSignOnDatabase
- O12 data to Secure Store database V2V upgrade
Feature Upgrade Capability
- Optional Capability
- Version Ranging for B2B or V2V Upgrades
- Declarative Feature Upgrade Activities (Final list for RTM, stated that there “may” be more in the future)
- ApplyElementManifests
- AddContentTypeField
- MapFile
- Custom Code Feature Upgrade
- CustomUpgradeAction Activity
- SPFeatureReceiver.FeatureUpgrading
- Assembly in GAC
Visual Upgrade Capability
- Stay in O12 UI (default) or move to O14 UI
- O14 ships O12 Master pages and CSS
- UI Preview capability (Recommend to perform limited changes will in preview mode)
- Farm admin or site admin controlled
- Web level settings and OM
- Some items not O12 compatible:
- My site host
- PWS site collection
- Report Server web parts
Patch Management Capability
- Patching state insight
- Patch management UI
- Patch reporting PowerShell UI
- Patch status health rules
- Backwards compatibility mode (This is awesome! No need to upgrade the entire farm right after patch install)
- Binaries can be ahead of the database(s)
- Defer upgrade for short period of time
- Not intended for long duration
Downtime Mitigation Process
- WSS v3/MOSS 2007 SP2
- Read-only databases
- Parallel upgrade farms
- Gradual Upgrade
- SharePoint 2010
- Read-only databases
- Parallel upgrade farms
- Single farm, multiple upgrade sessions
- Content database attach with AAM redirection
Upgrade Logging/Status Reporting
- Upgrade Logging
- New – One upgrade log per sessions
- New – Upgrade errors only log
- New – Fixed upgrade log schema
- Upgrade Status Reporting
- Improved – Upgrade status page (This is SO much better. It provides a lot more information during upgrade compared to the 2007 version. It will also show all concurrent database upgrades.)
- New – Upgrade status history
- New – Command line progress indication
Upgrading a MOSS 2007 Farm
- Each SSP upgrades into:
- A Search service app
- A User profiles service app
- An excel service app
- An application registry back-compat service app
- A new managed metadata service app
- Web application association are preserved
- a proxy is created for each service app
- New databases are created
Subscribe to:
Posts (Atom)



