All posts tagged PowerShell

Microsoft Purview – How to Get a Retention Label’s GUID

When creating custom solutions or even troubleshooting your data lifecycle management processes, you may need to know the retention label’s underlying GUID (Globally Unique Identifier).  This is the ID created for the retention label that Microsoft Purview uses for its back-end processes.  Unfortunately, there isn’t an easy way to find this ID from the Purview user interface.  To find the ID, a PowerShell command will need to be run; I’ll cover that process in this post.

Read more

SharePoint Online – The Property Bag, What is it and How to Configure It

Anyone who has worked with SharePoint development in the golden age of server-side object model development (SOM) likely used the property bag for different requirements in their solutions.  With the onset of new development techniques and foundations, the property bag went by the wayside and wasn’t used as often (or at all) when creating solutions.  With the new adaptive scope feature in Microsoft Purview, property bag usage has made a resurgence as a necessary location to store values when assigning policies.  I will be covering these features in a future post, but for now, I’d like to set the foundation for these posts by discussing property bags and their usage.

Read more

Terminate SharePoint 2013 Workflows with PowerShell

Let’s admit it.  Sometimes things just go wrong and you need an easy or straight forward way of cleaning it up and starting over again.  An example of this happened to me the other day where I had a bad workflow that went unnoticed and started suspending.  By the time it was noticed there were about 50+ suspended workflows (it was an active list).  So after stopping the workflow I started working through cleaning it up and thought there has to be a way to terminate SharePoint 2013 workflows with PowerShell.  Turns out I could do it.  Here’s how:

Read more

Proper way to handle workflows that throw a Microsoft.Workflow.Client.ActivityValidationException

I had to build a fairly complex workflow not long ago.  The workflow was built in SharePoint Designer 2013 and had a lot of moving parts to it.  So many, that when I went to publish it I received the following error message: “Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: Activity “SomeXActivity” has 65 arguments, which exceeds the maximum number of arguments per activity (50).”  This error message is actually telling us that our workflow has too many variables within it.  Basically, this is happening because when the workflow is running the Workflow Manager has to manage more 58 (in my case) variables.  Workflow Manager only allows there to be 50 variables in the workflow… by default.

Read more

Read XML Data Files Stored in a SharePoint Library with PowerShell

I recently had a need to read data from an xml configuration file that was stored within a SharePoint library.  To make things easier I of course went to Google (or Bing) and checked to see if someone else had yet blogged this.  Couldn’t find anything, so in order to help out someone else that may need to do the same at some point, I wrote up a quick little blog.  Note: this will only work for on-premises versions of SharePoint.  I’ll update with a SharePoint Online version in the future.  I’ll also write up how to add and delete contents in a future post as well.

Read more