Posts

Create and configure Azure Functions

Image
If you want to build a single endpoint which is capable of performing business and performance critical and high available process behind the scene and at the same time it should be accessible to all the ecosystem and development approach right from Mobile to REST calls and Cloud Apps "Azure Function" has it all. Microsoft Azure as evolved(ing) to give best it can from PaaS, IaaS and Azure Functions as FaaS(Function as a Service). The biggest advantage of using Azure Function is its server-less. So, no configuration and maintenance of infrastructure is needed. In this way we can only  pay for resource we consume, But still Azure provides you the ability to configure fixed service plan for better dedicated performance for your function. So i leave it up to you to choose the plan by considering not paying for un-utilized or under utilized server cost or consumption based plan.  Create Azure Functions using Visual Studio Install "Azure Functions" template f

People picker Control in PowerApps

Image
With the latest PowerApps update we can do more customization to achieve more use-cases. Especially with the new "Rule" feature in PowerApps(which keeps remembers me of InfoPath form 😏) But, Then I was looking for People picker control in this latest PowerApps update. cant find any straight forward control thought. But now saw a connector called "Office365Users" then I started exploring it. How to create People picker control in PowerApps Update 1. Add  "Office365Users" data source to the app. 2.  Insert a "Combobox" from the ribbon. 3. Select "Combobox" and select 'Items' in the formula bar then enter below formula Office365Users . SearchUser ({searchTerm :  ComboBox1. Text }) 4. Then, select "Fields" from the property pane and choose "Primary text" a.k.a "Display Names" and "Search Fields". 5. Play the app and test it. The below steps applies mostly in the early st

Create multilingual app in PowerApps

Image
Man-o-Man PowerApps has been increasing its feature ever since they launch it. Now it can do more than what it does in the past  quarter . If you are interested check out my Step by step PowerApps series from here . How to develop multilingual control in PowerApps First step starts from Excel Set it as a table like below          Create another table for Language drop down: Now, Back to PowerApps development tab. Then go to Insert->Data source->Click              Create your screen and control design in my case i have Home & Choose Language screen   Configure "ChangeLanguage" to read the translated values dynamically. repeat the steps for other controls which are intended for translation Now, Select "Home screen" and configure translated text for the respective controls Select "Change Language" button and do the following to navigate to Language selection screen Finally Run the

Enable/Disable SharePoint OOTB SPAlerts using PowerShell

Image
SPAlerts aka User Alerts is one of nice feature that SharePoint provides OOTB, This feature get automatically enabled once we configure SMTP Outbound mail address in Central Admin.  Basically it has 3 types of Alerts Frequency: Immediate Daily Weekly  Each runs on it own respective TimerJob in CA.User can set alerts for both List/Library level or item level for any existing and newly created SPList/Lib objects.  However, There is no UI option available in SharePoint to enable/disable this feature per User/List/Library level; Without deleting  it. But some time our requirements are never been interesting that we need to disable alerts for Specific User or All the users from specific List/Library $oWeb = Get-SPWeb "https://site.domain.com/sites/web" $oList = $oWeb .Lists.TryGetList( "Communication" ) # Get all alert # $alerts = $oWeb.Alerts | ? { ($_.List.Title -eq $oList.Title) } # Get alerts of specific frequency $alerts = $oWeb .Aler

SharePoint Server - Recycle / Stop-Start Application/Site pool using C#

Image
As a continuation of my previous post List All Servers in SharePoint Farm using C# Now w'll see to Start/Stop Pools without login to the server each time. { Please check the NOTE at the very end on this post } List All Application/Site Pools /// <summary> /// Load Pools from the given server /// </summary> /// <param name="serverName">Server name</param> /// <param name="pool">Pool type</param> public void LoadPools( string serverName, PoolType pool) { var server = ServerManager.OpenRemote(serverInstance); if (pool == PoolType.AppPool) { appPoolCollection = new List<ApplicationPool>(); appPoolCollection = server.ApplicationPools.ToList(); } else if (pool == PoolType.SitePool) { siteCollection = new List<Site>(); siteCollection = server.Sites.ToList(); } } Start/Stop Application Pool /// <summary> /// Reset Applicat

Powershell Scripts 2

Image
Lets see continuation of my previous PowerShell series. This time will start from the basic commands. Load Assembly references in PowerShell Declare Global Variables in PowerShell Pass/Read Command Line arguments Convert DateTime based on regional settings in PowerShell Read RESX value in PowerShell Perform CAML Query in PowerShell Add SharePoint Snapin if (( Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue } Load default/custom Assembly references [void][System.Reflection.Assembly] :: LoadWithPartialName( "System.Net" ) [void][System.Reflection.Assembly] :: LoadWithPartialName( "System.IO" ) [void][System.Reflection.Assembly] :: LoadWithPartialName( "System.Xml" ) [void][System.Reflection.Assembly] :: LoadWithPartialName( "System.Collections.Generic" ) [void][System.Reflection.Assem

List All Servers in SharePoint Farm - C#

Image
Some times we need to login to all the servers in SharePoint farm just to restart selected Application or Site Pool. Let's see a C# code how to retrieve and recycle selected pools from all the servers in our SharePoint farm. In this series will see How to retrieve all servers in SharePoint farm using C# PS: Please check the NOTE at the very end on this post. First things first import dll's using System ; using Microsoft.SharePoint ; using Microsoft.SharePoint.Administration ; using Microsoft.Web.Administration ; Declare global variables // Global enum Variables public enum Action { Start, Stop, Invalid } ; public enum PoolType { AppPool, SitePool } ; // Global Server variable public List<string> servers = null ; // Global Pool ' s collection variables public List<ApplicationPool> appPoolCollection = null ; public List<Site> siteCollection = null ; Get All SharePoint Farm server names public