Tech blogger and Problem solver, I share my experiences, insights, and solutions to technical challenges through my articles. With a strong background in Microsoft technologies like Power Platform, SharePoint, Azure, and RPA, I write about process automation, migration planning, troubleshooting, and best practices. My goal is to simplify complex concepts, provide practical solutions, and help others navigate technical roadblocks efficiently. Through my blogs, I aim to contribute to the tech comm
Wednesday, September 23, 2020
Azure Function Chaining - Get web Title in SharePoint Online
Console Application to Create new Subsite under site collection using CSOM + SharePoint Online
using System;
using System.Security;
using Microsoft.SharePoint.Client;
namespace ConsoleAppCreateSubsite
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter Your Username Please ------- ");
string userName = Console.ReadLine();
//string userName = "girish.kumar@happiestbarik.onmicrosoft.com";
Console.WriteLine("Enter Your Password Please ------- ");
SecureString password = GetPasswordOfYourSite();
Console.WriteLine("Enter Your Site collection URL ------- ");
string SiteCollURL = Console.ReadLine();
Console.WriteLine("Enter Your New Subsite URL name ------- ");
string newSubsiteName = Console.ReadLine();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
using (var clientContext = new
ClientContext(SiteCollURL))
{
// SharePoint Online Credentials
clientContext.Credentials = new SharePointOnlineCredentials(userName, password);
// Get the SharePoint web
WebCreationInformation creation = new WebCreationInformation();
creation.Url = newSubsiteName; //"MyConsoleWeb";
creation.Title = "WelcomeToConsoleWeb";
Web newWeb = clientContext.Web.Webs.Add(creation);
// Retrieve the new web information.
clientContext.Load(newWeb, w => w.Title);
clientContext.ExecuteQuery();
clientContext.ExecuteQuery();
}
}
private static SecureString GetPasswordOfYourSite()
{
ConsoleKeyInfo info;
//Get the user's password as a SecureString
SecureString securePassword = new SecureString();
do
{
info = Console.ReadKey(true);
if (info.Key != ConsoleKey.Enter)
{
securePassword.AppendChar(info.KeyChar);
}
}
while (info.Key != ConsoleKey.Enter);
return securePassword;
}
}
}
Thursday, February 13, 2020
Powershell Script for add “everyone, except external users” to the visitors group
PS C:\WINDOWS\system32> $orgName="{Tenant name}"
PS C:\WINDOWS\system32> $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
PS C:\WINDOWS\system32> Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
Get-SPOUser -Site https://$orgName.sharepoint.com/sites/SiteName | Select DisplayName, LoginName
PS C:\WINDOWS\system32> Add-SPOUser -Site https://$orgName.sharepoint.com/sites/Coronavirus -LoginName "c:0-.f|rolemanager|spo-grid-all-users/{GUID}" -Group "Site Visitors"
Display Name Login Name Groups User Type
------------ ---------- ------ ---------
Everyone except external users spo-grid-all-users/{GUID} {Site Visitors} Member
All the Best! Thanks for reading my blog, please do comment and share if you feel helpful.
PowerShell script to delete file versions from the specified SharePoint document library
Managing file versions in SharePoint Online is essential to maintain storage hygiene and performance, especially when versioning is enabled ...
-
AI Builder is an add-on for the Power Platform that enables AI-powered automation within Power Apps and Power Automate . It provides pr...
-
Forget Naukri, Upwork, Fiver, and Indeed These are overcrowded... Here are 30 Websites for job seekers to check out in 2025! 🏷Save this ...
-
• SharePoint REST service architecture-2013 SharePoint 2013 introduces a Representational State Transfer (REST) service that is compar...