Converting JSON Time Format in SharePoint Document Library Metadata

The SharePoint farm has a Document Library and a List which are linked for some requirements, while querying information we received some data which are not in proper format. Challenge is to split, remove characters and count the total which is little tedious

Example- The Field3 in CSV yields [“\/Date(1444995273796)\/”,”\/Date(1444996968515)\/”]

It’s a JSON format and the time format is EPOCH (UNIX format) – With Reference to the link MSDN My advice to customer was to use below code snippet to break the mystery!

To get the count: (Unfortunately, this is what customer need!) – No Fun in it because this kills the actual flavor of SharePoint development and data.

The reason for the SPContext Code by developer is unknown. So here comes the ConvertFrom-JSON power in Windows PowerShell Version 3+ 🙂 🙂 🙂

To get the information about the data in JSON: [We will deep dive in Part 2 of this Blog]

The file which is generated as report is done using C# and CSOM – So, in next blog post (Part 2) we will cover Binary Module using C# Class Library, PowerShell Module, String Manipulation and Data consolidation.

Enjoy PowerShell !

Create your own ISE Addon using Visual Studio 2013

Windows PowerShell discussion with System Administrators and Developers: Feedback – ISE has no good Add-On’s. Many uses ISE Steroids which is an excellent add-on for PowerShell ISE. We do have script browser and analyzer now.

Comparing ISE with Visual Studio is not fair 🙂 Why do you want to do that? WMF 5.0 and it’s features are far better than earlier versions. So, indeed PowerShell ISE is also grown up 🙂

We don’t have commands to meet all our needs in Windows PowerShell so we create a function , Proxy Functions, Workflow, Class or modules for various needs. Similarly, we can create our own add on for ISE. Let us see a quick demo of it using Visual Studio 2013.

We can easily create this using with the available VSIX if not you can opt for WPF Control Library and create a add-on as required by adding Microsoft.PowerShell.GPowerShell. In this article we will make our job easy by using VSIX – Click to download .

Read the documentation and install the VSIX as required. Now, we will create a simple CustomAddon which will insert a code or some string into the current ISE file.

Open Visual Studio 2013 and choose Visual C# and select PowerShell ISE Add-on for VS2013. Name it as required! In our case I have named it as CustomAddOn as shown below


Now open up the UserControl1.xaml.cs code – Just double click it and the below will be the default code.

Okay, we have the pseudo code – let’s do some modification and test the ISE add-on to insert a code or some string in ISE. To do that first we need to comment the below lines and just add get and set like shown below

Now, it’s time for us to add the controls and code as required. For, testing let us add a button and trigger an event which inserts code or string in ISE current file.

So, I have added a button in XAML file and the code looks like below

Just make a note – I have made the name of the button as code and created a click event but haven’t did any code for event firing. so, to do that we will jump back to CS file and code as given below.

Do right click on the CustomAddon in solution explorer and Build your solution then spin up your PowerShell ISE and execute the below piece of code

🙂 🙂 🙂 🙂 🙂 Tada! We have our Custom Add on in ISE


In PowerShell we can do the same using below one liner 🙂


That’s it for now ! We will see more WPF controls and building ISE Add-On’s using Visual Studio 2013!

Cheers! Enjoy PowerShell!

Microsoft Ignite 2015

Microsoft Ignite May 4-8, 2015.


This is year Microsoft is conducting Ignite at Chicago, IL. The official Link is here.

Why Ignite?




Registration Link

Explore the contents for Windows PowerShell

We can build our own schedule. Refer to this link and plan your agenda in upfront.