It’s not an uncommon task to want to find out in what webs you have a specific feature enabled. This little script does just that, taking 2 params (site collection url, feature name) and simple output the SharePoint web url. Nothing fancy, but certainly a useful script to have in your toolbox! A good example of this is where you are using content publishing going from an Enterprise internal farm to a Foundation external farm, certain feature won’t be in the Foundation farm and will cause the Content ......
Recently I came up against a problem where I was getting 401 Unauthorized and 403 Forbidden errors in SharePoint on an extended anonymous only site. It worked perfectly when using windows authentication, for any level of user. In the end I tracked the problem down to accessing SPContext.Current I found this article which states you should use SPSecurity.RunWithElevatedP... when using the current context and it worked!! A little surprising, but not unexpected the SharePoint logs showed nothing ......
What you need / What you've got? Pretty obvious, when a user edits/changes a page, you need someone to check its all good before it goes live! Aka Publishing Approval You can use the "Publishing site with workflow" template or enable it manually or set it up in your custom site definition. BUT...you've got an entire site collection full of web sites and you need to do it "en-mass" … step up Powershell. A common scenario could be you were working in Stage or Pre-go live and having Approval workflow ......
Took me a little while to figure this one out, you’ve assigned your workflow to a library and you can set all other other flags like “AllowStartChange” and “AllowStartCreate”, but cant see how to set “Start this workflow to approve publishing a major version of an item.” That’s because its a property on the library itself called “DefaultContentApprovalWork... So you might want to do something like this…where you have the WorkFlow Association object ($wfAssociation) and the list/library ($list). ......