Wednesday, February 6, 2013

New SharePoint 2013 Interface on Android

I was performing testing of the new SharePoint 2013 HTML5/CSS3 interface and did a couple of screenshots on my Samsung Galaxy S3.  Looks great, nice and responsive.


I was even able to create a new Word Document on my phone and save it back to the site.

 
And on top of that, it was on Office 365 Preview!

Thursday, May 10, 2012

PowerShell Script: Identify All Workflows in Your SharePoint Farm


The following script will return all Workflows currently associated within your SharePoint 2007 or SharePoint 2010 farm using PowerShell and output it to a CSV file.  It returns the URL of the site, Title of the list, Title of the workflow, and the number of currently running instances.

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null 
$outputFile = Read-Host "Filename and location (i.e. C:\output.txt)"

$farm = [Microsoft.SharePoint.Administration.SPFarm]::local
$websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} 
$webapps = @() 

$outputHeader = "Url;List;Workflow;Running Instances" > $outputFile

foreach ($websvc in $websvcs) { 

    foreach ($webapp in $websvc.WebApplications) { 
  foreach ($site in $webapp.Sites) {
   foreach ($web in $site.AllWebs) {
    foreach ($List in $web.Lists) {
     foreach ($workflow in $List.WorkflowAssociations) {
      $output = $web.Url + ";" + $List.Title + ";" + $workflow.Name + ";" + $workflow.RunningInstances
      Write-Output $output >> $outputFile
    }}
    } 
   } 
  }
 }
$Web.Dispose();
$site.Dispose();

It can also be downloaded from my Google Drive here: CheckWorkflowsInFarm.zip 

Output Example:

Url;List;Workflow;Running Instances
http://intranet;Report a Problem or New Request;Notification Workflow for Bug List (Previous Version:4/13/2011 3:01:15 PM);0
http://intranet;Report a Problem or New Request;Notification Workflow for Bug List;0
http://intranet;Report a Problem or New Request;Notification Workflow for Bug List (Previous Version:4/13/2011 3:04:13 PM);0
http://intranet/contracts;PDF Doc Library;Send to Sales;0
http://intranet/contracts;PDF Doc Library;Send to Sales (Previous Version:6/4/2010 5:33:55 PM);0
http://intranet/contracts;Doc Library;DOC Approval (Previous Version:6/29/2010 3:55:22 PM);1
http://intranet/contracts;Doc Library;DOC Approval;0
http://intranet/contracts;Doc Library;DOC Approval (Previous Version:6/29/2010 3:49:51 PM);0
http://intranet/contracts;Doc Library;DOC Approval (Previous Version:6/29/2010 3:37:48 PM);0
http://intranet/contracts;Doc Library;DOC Approval (Previous Version:6/29/2010 11:18:26 AM);0

Tuesday, March 13, 2012

Converting a Web Application to NTLM from Kerberos

  1. Open Central Administration
  2. Click on “Manage Web Applications”.
  3. Highlight the targeted web applications.
  4. Click on “Authentication Providers”.
  5. Click “Default” next to Windows.
  6. Scroll down and change IIS Authentication Settings from Negotiate (Kerberos) to NTLM.
  7. Click Save at the bottom of the window.  *This will take a few seconds up to a minute.
  8. Close the Authentication Providers window.
  9. Repeat for any additional web applications.

Tuesday, September 20, 2011

Insight to Acquire Ensynch

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

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
Maybe I will work on adding exception handling on the next go around.

Jeff

    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

    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