Skip to main content

Posts

Showing posts with the label SharePoint Online

Powershell Script to get Report Group-enabled SharePoint sites Get all sites with the Office 365 Group template

<# .NOTES      =========================================================================================================================================   Author: Kamal Pandey         DESCRIPTION : Report Group-enabled SharePoint sites Get all sites with the Office 365 Group template  #> $siteUrl = Read-Host  "Enter SharePoint Admin Center Url" try {     Set-ExecutionPolicy RemoteSigned     $Cred = Get-Credential     $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection     Import-Module (Import-PSSession $Session -Allowclobber) -Global      Connect-MsolService -Credential $Cred     Connect-SPOService -Url $siteUrl -credential $Cred } catch {     write-host "Failed to connect to SharePoint online site at " $siteUrl -ForegroundColor R...

Power shell Script to get External Users on Office 365

Hello Everyone,  Below is the Powershell script to get all external users from office 365 tenant. #--------------------------------------------------------------------------------------------------------------------------- $host.Runspace.ThreadOptions = "ReuseThread" #Definition of the function that gets all the external users in a SharePoint Online Tenant. function Get-SPOExternalUsers {     param ($sUserName,$sMessage,$sSPOAdminCenterUrl)     try     {             Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green         Write-Host "Getting all the external users in a SharePoint Online Tenant" -foregroundcolor Green         Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green         $msolcred = Get-Credential -UserName...

Build SharePoint SharePoint Framework solution with Essential JS 2

Hello All, I'm very excited to say that I build Syncfusion JavaScript components that can be used in the SharePoint Framework to build a quick and reusable responsive SharePoint solution which makes it a powerful combo.  I have built and attached a  simple  PnP and  Syncfusion   Grid control-based  web part you can download and unzip the project and start building great SharePoint Framework solutions for great business. Prerequisites :  Node.js Visual Studio Code Internet connection to download Node js, SpFx, and Syncfusion components.   How to run the project Download and unzip attached the project to a location on your local disk. Open the project in the Visual Studio Code. Execute the following commands, npm install gulp serve Run the project. Reference links: https://ej2.syncfusion.com/home/   https://ej2.syncfusion.com/javascript/demos/#/material/grid/grid-overview.html Download Project from here: https://github.com/Syncfu...

PS script to generate reports of the guest users last login information from the Office 365 tenant.

 Dear All,  As you know office 365/ SharePoint has a profound impact on the collaboration space where we collaborate with external users or business partner to work together sometimes we need to audit our platform such as how many guest users present on our tenant, I am posting a script that helps you to generate a report out of it.  The script is below you may copy create a PS file to run from your machine. if need any help please reach out to me at kamal_pandey@outlook.com I would be very happy to help.  <# .NOTES  DESCRIPTION: This script will generate guest users' last login information from the Office 365  tenant.  #> #Import SharePoint Online Management Shell Import-Module Microsoft.Online.Sharepoint.PowerShell -DisableNameChecking   #Config Parameters $AdminSiteURL="https://cpsgpartners-admin.sharepoint.com" $ReportOutput ="C:\Temp\ExternalUsersRpt.csv"   #Get Credentials to connect $Cred = Get-Credential   #Connect to Share...

PowerShell CSOM code to export term set from SharePoint online

 #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll"     #Variables for Processing $AdminURL = "https://abc-admin.sharepoint.com" $ReportOutput="C:\Temp\TermStoreData.csv"   Try {     #Get Credentials to connect     $Cred = Get-Credential     $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)     Connect-SPOService -Url https://mmibi-admin.sharepoint.com #-Credential $Creds      Connect-MsolService #-Credential $Creds       #Setup the context     $Ctx = N...

Create multiple SharePoint site collections from .csv file

 <# .NOTES  DESCRIPTION : Using the Script SharePoint admin will be able to Create Multiple Site Collections in Bulk from a CSV File using PowerShell  #> #Config Parameters $TenantUrl = Read-Host  "Enter SharePoint tenant admin URL" $CSVPath = "C:\Temp\SiteCollections.csv" #Connect to Tenant Connect-PnPOnline -url $TenantUrl -Credentials (Get-Credential) #or -UseWebLogin for MFA   Try {     #Get Site Collections to create from a CSV file     $SiteCollections = Import-Csv -Path $CSVPath       #Loop through csv and create site collections from each row     ForEach ($Site in $SiteCollections)     {         #Get Parameters from CSV                  $Title = $Site.Title         $Url = $Site.Url         $Owner =$Site.Owner         $Template = $Site.Template       ...