dinsdag 20 december 2011

Shutdown and install updates….noooooo!

Right, you’re ready to call it a day, shutdown your computer and...start waiting for those 20 updates to install…      dohh!

Just a reminder for myself, below the steps to disable the auto-adjust from “Shut Down” to “Shut Down and Install Updates”

1. Start > Run > gpedit.msc
2. User Configuration > Administrative Templates > Windows Components > Windows Update
3. Enable the option “Do not adjust default option to ‘Install Updates And Shut Down’ in Shut Down Windows dialog box”.

Install Updates is still available in the fly-out menu, but isn’t the default option in the start menu.

vrijdag 4 november 2011

Unable to write to ULS Log using LogToOperations

Today I had to find out why errors of our SharePoint 2010 application were not showing up in the ULS log. We’re using the iLogger interface from SP Patterns & Practices to instantiate a Logger class, using the LogToOperations method to log to the EventViewer and the ULS log.

Unfortunately, no log entries ended up in the ULS log, despite the fact that they were showing up in the EventViewer. Turns out that you have to add the application pool account to the Performance Log Users group.

Another possibility is make sure the SPTraceV4 windows service is run under a managed account and add this account to the Performance Log Users group as this blog describes.

zaterdag 15 oktober 2011

HowTo: Getting the Content By Query WebPart to work in Office 365 P1

The Content By Query WebPart (CBQWP) is only available when the publishing features are activated. A feature not available in the P1 of Office 365. But, with a little (probably) not supported hackerdy-hack, you can get it to work.

Step 1; Making the webpart available in the webpart gallery

Because we can’t use the publishing feature which makes the webpart available in the webpart gallery, we have to add it manually;

  1. Navigate to the Site Settings of your portal by entering the following url http://xxxxxxxx.sharepoint.com/_layouts/settings.aspx
  2. Navigate to the webpart gallery
  3. Hit the new document link in the ribbon. The dialog framework pops up with a list of webparts you want to add. Select the Content By Query WebPart

image

Step 2; Making the required files available

The CBQWP needs three files in the Style Library; ContentQueryMain.xsl, Header.xsl and ItemStyle.xsl. These files needs to be available in a folder called ‘XSL Style Sheets’. But here’s the kicker, you can’t add folders in this list through the UI;

2.1; Add the ‘XSL Style Sheets’ folder

  1. Navigate to the Style Library by entering the following url http://xxxxxxxx.sharepoint.com/Style Library
  2. Replace AllItems.aspx in the Url with the ‘Upload.aspx?RootFolder=%2FStyle%20Library&Type=1’. This will take you to Upload.aspx whith Type=1 which will render the form to make folder creation possible
  3. Enter ‘XSL Style Sheets’ and hit OK

2.2; Upload the required files to the XSL Style Sheets folder2.2; Upload the required files to the XSL Style Sheets folder

Now upload ContentQueryMain.xsl, Header.xsl and ItemStyle.xsl to this folder. Unfortunately i can’t deploy the required files here because they are property of Microsoft…. but I’m sure you can find them somewhere.

And you’re done. The webpart is now available in the webpart gallery and has the required files to work

dinsdag 14 juni 2011

PowerShell: Convert WebApp from Classic to Claims Based Authenticated

To convert a WebApplication from classis to claims, you can use the script below. Make sure the required parameters $WebAppName, $account and $wa are correct for your enviroment.

-----------------------------------------
Add-PSSnapin Microsoft.SharePoint.PowerShell

$WebAppName = "http://[URL WEBAPPLICATION]"
$account = "[DOMAIN]\[FARM ADMIN ACCOUNT]"
$wa = get-SPWebApplication $WebAppName

# This will set the webapp to claims
Set-SPwebApplication $wa -AuthenticationProvider (New-SPAuthenticationProvider) -Zone Default

#This step will create the admin for the site
$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()

# Once the user is added as admin, we need to set the policy so it can have the right access
$zp = $wa.ZonePolicies("Default")
$p = $zp.Add($account,"PSPolicy")
$fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
$p.PolicyRoleBindings.Add($fc)
$wa.Update()

# Final step is to trigger the user migration process from classic to claims
$wa.MigrateUsers($true)