Posts

How to get site collection created date in SharePoint Online

Image
  Q: How to get the site collection created date in SharePoint online Answer:  This can be done using the PnP SharePoint commands $connection  =   Connect-PnPOnline   - Url  " <SITE URL> "   - ReturnConnection  - UseWebLogin $web  =   Get-PnPWeb   - Includes Created  - Connection $connection Write-Host  $web.Created Happy Coding...!!!

How to check for empty for null and empty Values in Power Automate?

Image
  Q: How to check for empty for null and empty Values in Power Automate? ANSWER:  Checking for NULL Value. In order to check for the null value Go to Expressions and then type null, the value will show up Checking for EMPTY Value There is no direct way to check on the empty value, so in order to check if the string value is empty, check the length of the variable Happy Coding..!!!

How to get the difference in 'DAYS' between two dates in Power Automate?

Image
  Q: How to get the difference in 'DAYS' between two dates in Power Automate? A: In order to get the difference in Days follow the Below Formula div(sub(ticks('2021-05-10'), ticks('2021-05-10')), 864000000000) Happy Coding..!!

How to execute parallel/ Threaded jobs in PowerShell

Image
  Many times we need to work in parallel when executing the Powershell commands. Today in this post I will tell how we can execute the commands in parallel.  In my case, I have used these parallel jobs for the migration of SharePoint On-Prem to SharePoint Online using Sharegate, executing multiple instances and then monitoring those instances to initiate as soon as any of the instances is finished executing. Step 1: Installing the Module To leverage the benefit of the parallel jobs, we need to install the Module so to install the module, execute the following command Install-Module   - Name  " ThreadJob "   - Scope AllUsers Once the module is installed, then you are ready to go. Step 2: Execute Parallel Jobs Now you can start parallel jobs in the background. Here is the sample for executing the parallel jobs $Job  =   Start-ThreadJob   - FilePath  " .\PowershellScript.ps1 "   - ArgumentList  @ ($param1, $param2)  - Name 

How to stop computer from sleeping

Image
  This is a very generic post, but I felt though this is small thing but can be of good use. So, many times we do run the PowerShell scripts or some processing on our local computer and it is blocked due to the system entering into sleep mode. Due to which the process gets stopped. There are third-party apps for this but do not rely on installing many 3rd party apps to my system. So I found the script which does the job for me. I know what's written in the script so I am confident while running this script. Here is the script, Clear-Host $myshell  =   New-Object   - com  " Wscript.Shell " while  ( $true ) {      Write-Host  ([ char ] 9829 )  - ForegroundColor Red  - NoNewline     $myshell.sendkeys( " . " )      Start-Sleep   - Seconds  300 } Hope this will help you as well, do comment and share if you like it. Happy Coding..!! Sumit Kanchan

Alternative to Discussion list in SharePoint Online

Image
  In SharePoint Online one of the most missed features from the legacy system is the ability to create discussion forums. Since we do not have the OOB functionality, but we still can achieve it using the OOB features. In this post, I will show you how you can create the discussion forums using OOB features and with a more attractive UI.  Let's start and set up the discussion Forum. STEP 1: Create necessary columns in Site Pages Library To Achieve the functionality, I have made use of the "Site Pages" Library as it gives you the OOB ability to comment and like on the page. In order to make it fully usable, we will create a column  PageType: This will tell us whether the page created is a discussion or the page Values: Page, Discussion STEP 2: Create Custom View Create a View (in my case I have created the view by the name Discussion),

Play Big with large lists and document libraries

Image
  What if the SharePoint list or library grew too big? This is a very common question when you are designing the SharePoint solution. So in this article, I will try to explain how you can do that. Impact of unhandled Large List So, the problem first, What is the impact if it grew too large..?? Will we lose data ... ?? NO Will, the data be deleted... ?? NO Is data not safe.. ?? NO What is the Threshold limit? So what is the impact of a large list?? yes, Threshold is the cause The impact is that you will get the threshold error if your view contains records greater than 5000. When any list or library view returns records of more than 5000 it displays the threshold error. This is the hard-line limit a view can show up the number of records. So, there are multiple ways you can handle this error Solution 1: Switch to Modern View, as the latest the best and will be continuously improved. For modern Microsoft is continuously evolving and more enhancement will be there in the future. Solution