• Know more about me

Mai Omar Desouki

~ Senior Cloud Solution Architect @ Microsoft

Mai Omar Desouki

Category Archives: PowerShell

I am speaking in Abu Dhabi SharePoint Saturday

29 Sunday Sep 2013

Posted by Mai Omar Desouki in Events I am Speaking In, PowerShell, SharePoint 2013

≈ 3 Comments


The event is on 5 Oct 2013 from 8 AM to 5 PM in Abu Dhabi. Once venue is published by the organizer, will update this post so save the link & make sure you check it again this week.

My session will be about “Automate variations for SharePoint 2013”

The whole session will be about what to write in PowerShell Script & C# to automate variation.

I will show a demo & provide tools to make it easier too.

Session description: SharePoint Variations gives a Multilingual SharePoint sites which allows copying sites and content from the source variation label to one or more target variation labels. The real value from this session is to fasten your deployment, make it reliable, stable, faster & easier to do with some lines of PowerShell Scripts. In this session we will learn the best practice when it comes to deployment with Variations. First we will write code in C# & convert it to PowerShell for Variations. Will show a demo for the whole process for SharePoint 2013 Variations from scratch till the end by keeping an eye on the Variation Jobs from PowerShell Scripts. You will know the Tips & Tricks for the variation including settings, configuring variation, creating labels & creating hierarchies; all from PowerShell, finally it is important to know the best practices for working with variations and with deploying it.

Share this:

  • Facebook
  • LinkedIn
  • Twitter
  • Email
  • Print
  • Reddit

Like this:

Like Loading...

Automate Variations in SharePoint 2013 using PowerShell & C#

14 Sunday Jul 2013

Posted by Mai Omar Desouki in PowerShell, SharePoint 2013, SharePoint Administration

≈ 20 Comments

Tags

C-sharp, Microsoft, Microsoft SharePoint, Multilingual, Multilingual sites, PowerShell, SharePoint, SharePoint 2013, Variations, Windows PowerShell


“Thanks to Waldek Mastykarz for his post, he posted about it but for SP 2010 and only in C#” but then I was able to convert it to Powershell, also thanks to “Eric Soo” for his reply but I was done already but thank you both.”

Let’s Start.. Automating variations settings and configuration so whenever a deployment is needed, you will be ready with your PowerShell scripts.

Manual deployment is time consuming as it is repetitive task, in this post I will let you know how to automate one of those many tasks when it comes to deployment.

SharePoint Variations has a UI which I will show you its steps now;

The steps in this post is for automation of variation in UI, in C# & finally in PowerShell.

  1. Go to “Site Actions” à“Site settings”;
  2. Under “Site collection administration”, click “Variation Settings”,

  3. The code below is in C# for the page above to change or update the “Variation Settings”;



  4. The same code but this time in PowerShell,


  5. Now we need to create labels; go back to “Site Settings”, under “Site Collection Administration” click “Variation Settings”;

  6. I have 2 labels, currently if this is your first time, it will be empty, click now “New Label” (as if you are telling SharePoint List to create new item) since we will do this in the code 😉


  7. Now same code but PowerShell for creating variation labels;



  8. Now to create hierarchies; you should see the labels added as below, click above them “Create Hierarchies”, before creating hierarchies, the values for the labels are “No”,

  9. After creating hierarchies, the values should be yes under “Hierarchy is Created”,
  10. To create Hierarchies in C#,


  11. Now let’s create hierarchies in PowerShell,


     

    Thank you and please write your comments or in case you have any questions.

Share this:

  • Facebook
  • LinkedIn
  • Twitter
  • Email
  • Print
  • Reddit

Like this:

Like Loading...

Out-GridView …. Not Supported Exception

05 Saturday May 2012

Posted by Mai Omar Desouki in PowerShell, SharePoint 2010

≈ Leave a comment

Tags

PowerShell, SharePoint 2010


Untitled

Today I was writing some PowerShell functions and I wanted to see the results in GridView like below;

img3

This output to the results from PowerShell in GridView and as if it is a windows application..

And I got exception in the first screenshot saying “ [ Out-GridView ], Not supported exception.

But that was easy since PowerShell is telling you how to solve it.

In the coming line from the exception it is saying, “ Out-GridView : To use the Out-GridView cmdlet, install the Windows PowerShell Integrated Scripting Environment Feature from Server Manager. “

You need to go Features in Server Manager..

img2

And Install…. Smile

That was easy and start forward from PowerShell !

Share this:

  • Facebook
  • LinkedIn
  • Twitter
  • Email
  • Print
  • Reddit

Like this:

Like Loading...

Blog Visitors

  • 82,365 Visitors

Categories

  • About me (1)
  • Microsoft Teams (3)
    • SharePoint Online (1)
  • Microsoft Viva (1)
  • Migration (2)
  • OneDrive for Business (1)
  • Parents (1)
  • Power Platform (1)
  • SharePoint 15 (5)
  • SharePoint 2010 (56)
    • Content Types (1)
    • Developer Dashboard (1)
    • Document Set (1)
    • Events I am Speaking In (2)
    • External Lists (1)
    • FAQ (2)
    • FBA (1)
    • Form Based Authentication (1)
    • Integration of CRM 2011 with SharePoint 2010 (1)
    • JQuery (1)
    • Master Page (1)
    • My Site (1)
    • PowerShell (3)
    • SharePoint Administration (5)
    • SharePoint Branding (1)
    • SharePoint Customization (5)
    • SharePoint Designer (4)
    • SharePoint Designer Workflow (1)
    • SharePoint Events (2)
    • SharePoint Online (1)
    • SharePoint Permissions (1)
    • SharePoint Workflow (1)
    • User Profile (2)
    • User Profile Sync (1)
    • Videos (1)
    • WebParts (1)
    • Workflow (1)
  • SharePoint 2013 (91)
    • Cloud App (1)
    • Event Handler (1)
    • iPad (1)
    • IPhone (1)
    • Napa (1)
  • SharePoint Updates (1)
  • Visual Studio 2012 (3)
  • Viva Engage (1)
  • Yammer (1)

Tag Cloud

About me Document Set Events I am Speaking In FAQ FBA Form Based Authentication JQuery Master Page Microsoft Teams Migration My Site PowerShell SharePoint 15 SharePoint 2010 SharePoint 2013 SharePoint Administration SharePoint Branding SharePoint Customization SharePoint Designer SharePoint Designer Workflow SharePoint Events SharePoint Online SharePoint Permissions SharePoint Workflow User Profile User Profile Sync Videos Visual Studio 2012 WebParts Workflow

Calendar

March 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Sep    

Archive

  • September 2022 (2)
  • August 2022 (2)
  • July 2022 (2)
  • March 2022 (1)
  • August 2021 (2)
  • September 2020 (2)
  • May 2020 (2)
  • April 2020 (6)
  • March 2020 (1)
  • September 2019 (2)
  • July 2015 (1)
  • May 2015 (3)
  • April 2015 (1)
  • March 2015 (1)
  • February 2015 (2)
  • January 2015 (1)
  • October 2014 (1)
  • September 2014 (3)
  • June 2014 (7)
  • May 2014 (5)
  • April 2014 (4)
  • March 2014 (3)
  • February 2014 (1)
  • January 2014 (2)
  • December 2013 (6)
  • November 2013 (5)
  • October 2013 (6)
  • September 2013 (5)
  • August 2013 (5)
  • July 2013 (5)
  • June 2013 (2)
  • May 2013 (2)
  • February 2013 (2)
  • January 2013 (1)
  • October 2012 (2)
  • September 2012 (7)
  • August 2012 (15)
  • July 2012 (5)
  • June 2012 (2)
  • May 2012 (4)
  • April 2012 (2)
  • March 2012 (1)
  • August 2011 (3)
  • July 2011 (15)

Blog at WordPress.com.

  • Follow Following
    • Mai Omar Desouki
    • Join 63 other followers
    • Already have a WordPress.com account? Log in now.
    • Mai Omar Desouki
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: