Home

SharePoint Online: PowerShell script to Remove a defined column accross the Site collection

%3CLINGO-SUB%20id%3D%22lingo-sub-291710%22%20slang%3D%22en-US%22%3ESharePoint%20Online%3A%20PowerShell%20script%20to%20Remove%20a%20defined%20column%20accross%20the%20Site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291710%22%20slang%3D%22en-US%22%3E%3CP%3EOur%20large%20SharePoint%20Online%20Site%20collection%20used%20for%20Intranet%20Corporate%20Portal%20based%20on%20Publishing%20site%2C%20we%20have%20a%20large%20number%20of%20subsites%20into.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20had%20to%20remove%20a%20field%20place%20into%20the%20page%20library%20of%20all%20those%20subsites.%3C%2FP%3E%0A%3CP%3EThe%20following%20script%20was%20built%20to%20do%20that%20removal.%3C%2FP%3E%0A%3CP%3EYou%20can%20adapt%20it%20as%20you%20want%20for%20your%20own%20requirements.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%5Bstring%5D%24username%20%3D%20%22Admin%40yourtenant.onmicrosoft.com%22%0A%5Bstring%5D%24PwdTXTPath%20%3D%20%22C%3A%5CSECUREDPWD%5CExportedPWD-%24(%24username).txt%22%0A%24secureStringPwd%20%3D%20ConvertTo-SecureString%20-string%20(Get-Content%20%24PwdTXTPath)%0A%24adminCreds%20%3D%20New-Object%20System.Management.Automation.PSCredential%20%24username%2C%20%24secureStringPwd%0A%0A%5Bstring%5D%24RootSiteToCheck%20%3D%20%22https%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FYourSiteCollection%22%0A%5Bstring%5D%24SPListToCheck%20%3D%20%22Pages%22%0A%5Bstring%5D%24SPFieldInternalNameToCheck%20%3D%20%22PublishedDate%22%0A%0Afunction%20Load-DLLandAssemblies%0A%7B%0A%20%5Bstring%5D%24defaultDLLPath%20%3D%20%22%22%0A%20%23%20Load%20assemblies%20to%20PowerShell%20session%20%0A%20%24defaultDLLPath%20%3D%20%22C%3A%5CProgram%20Files%5CSharePoint%20Online%20Management%20Shell%5CMicrosoft.Online.SharePoint.PowerShell%5CMicrosoft.SharePoint.Client.dll%22%0A%20%5BSystem.Reflection.Assembly%5D%3A%3ALoadFile(%24defaultDLLPath)%0A%20%24defaultDLLPath%20%3D%20%22C%3A%5CProgram%20Files%5CSharePoint%20Online%20Management%20Shell%5CMicrosoft.Online.SharePoint.PowerShell%5CMicrosoft.SharePoint.Client.Runtime.dll%22%0A%20%5BSystem.Reflection.Assembly%5D%3A%3ALoadFile(%24defaultDLLPath)%0A%20%24defaultDLLPath%20%3D%20%22C%3A%5CProgram%20Files%5CSharePoint%20Online%20Management%20Shell%5CMicrosoft.Online.SharePoint.PowerShell%5CMicrosoft.Online.SharePoint.Client.Tenant.dll%22%0A%20%5BSystem.Reflection.Assembly%5D%3A%3ALoadFile(%24defaultDLLPath)%0A%7D%0A%0Afunction%20Check-And-Fix-Field-In-SPList%20(%5BMicrosoft.SharePoint.Client.ClientContext%5D%24Context%2C%20%5BMicrosoft.SharePoint.Client.Web%5D%24CurrentWeb)%0A%7B%0A%20%24MyCurrentListTocheck%20%3D%20%24CurrentWeb.Lists.GetByTitle(%24SPListToCheck)%0A%20%24AllSPListCT%20%3D%20%24MyCurrentListTocheck.ContentTypes%0A%20%24Context.Load(%24MyCurrentListTocheck)%0A%20%24Context.Load(%24AllSPListCT)%0A%20%24Context.ExecuteQuery()%0A%20Write-Host%20%22%20%20%3D%3D%3D%26gt%3B%26gt%3B%26gt%3B%20SubSite%20to%20check%3A%22%2C%20%24CurrentWeb.Title%2C%20%22-%20URL%3A%22%2C%20%24CurrentWeb.Url%20-ForegroundColor%20Green%0A%20Write-Host%20%22%20%20%3D%3D%3D%26gt%3B%26gt%3B%26gt%3B%20List%20to%20check%3A%22%2C%20%24MyCurrentListTocheck.Title%20-ForegroundColor%20Green%0A%20foreach(%24MySpListCT%20in%20%24AllSPListCT)%0A%20%7B%0A%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20--%26gt%3B%26gt%3B%20Content%20Type%20Name%3A%22%2C%20%24MySpListCT.Name%0A%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20--%26gt%3B%26gt%3B%20Content%20Type%20ID%3A%22%2C%20%24MySpListCT.id%0A%20%20%24Myfields%20%3D%20%24MySpListCT.Fields%0A%20%20%24Context.Load(%24Myfields)%0A%20%20%24Context.ExecuteQuery()%0A%20%20%24MyfieldToCheck%20%3D%20(%24Myfields%20%7C%20where%20%7B%24_.InternalName%20-eq%20%24SPFieldInternalNameToCheck%7D)%0A%20%20if(%24MyfieldToCheck%20-ne%20%24null)%0A%20%20%7B%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20----------------------------------------------%20%22%20-ForegroundColor%20Yellow%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B%20Field%20Name%3A%22%2C%20%24MyfieldToCheck.Title%20-ForegroundColor%20Yellow%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B%20Field%20InternalName%3A%22%2C%20%24MyfieldToCheck.InternalName%2C%20%22-%20Field%20ID%3A%22%2C%20%24MyfieldToCheck.id%20-ForegroundColor%20Yellow%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B%20Field%20Required%3A%22%2C%20%24MyfieldToCheck.Required%20-ForegroundColor%20Yellow%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20----------------------------------------------%20%22%20-ForegroundColor%20Yellow%0A%20%20%20%24MyfieldToCheck.DeleteObject()%3B%0A%20%20%20%24MySpListCT.Update(%24false)%3B%0A%20%20%20%24Context.Load(%24MySpListCT)%3B%0A%20%20%20%24Context.ExecuteQuery()%0A%20%20%20Write-Host%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B%20Field%20Deleted%20!!!!%22%20-ForegroundColor%20Red%0A%20%20%7D%0A%20%7D%0A%7D%0A%0Afunction%20Get-SPOSubWebs%0A%7B%0A%20Param(%20%0A%20%20%20%20%20%20%20%20%5BMicrosoft.SharePoint.Client.ClientContext%5D%24Context%2C%20%0A%20%20%20%20%20%20%20%20%5BMicrosoft.SharePoint.Client.Web%5D%24RootWeb%0A%20%20%20%20)%20%0A%20%24Webs%20%3D%20%24RootWeb.Webs%0A%20%24Context.Load(%24Webs)%0A%20%24Context.ExecuteQuery()%0A%20ForEach%20(%24sWeb%20in%20%24Webs)%0A%20%7B%0A%20%20Write-host%20%22%20%20%20%3D%3D%3D%3D%26gt%3B%26gt%3B%20SubSite%3A%22%2C%20%24sWeb.URL%20-ForegroundColor%20red%0A%20%20Check-And-Fix-Field-In-SPList%20%24Context%20%24sWeb%0A%20%20Get-SPOSubWebs%20-RootWeb%20%24sWeb%20-Context%20%24Context%0A%20%7D%20%0A%7D%20%0A%0Acls%0AWrite-Host%20%22%20----------------------------------------------%20%22%0ALoad-DLLandAssemblies%0AWrite-Host%20%22%20----------------------------------------------%20%22%0AWrite-host%20%22%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%22%20-ForegroundColor%20Green%0A%24mySitectx%20%3D%20New-Object%20Microsoft.SharePoint.Client.ClientContext(%24RootSiteToCheck)%0A%24mySitectx.Credentials%20%3D%20New-Object%20Microsoft.SharePoint.Client.SharePointOnlineCredentials(%24adminCreds.UserName%2C%20%24adminCreds.Password)%0A%24mySitectx.RequestTimeout%20%3D%201000000%20%23%20milliseconds%0A%24myCurrentWeb%20%3D%20%24mySitectx.Web%0A%24mySitectx.Load(%24myCurrentWeb)%0A%24mySitectx.ExecuteQuery()%0AWrite-Host%20%22%20%22%0AWrite-Host%20%22%20---------------------------------------------------------%22%0AWrite-Host%20%22%20%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B%20%23%20Server%20Version%3A%22%20%24mySitectx.ServerVersion%20%22%20%23%20%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%22%20-ForegroundColor%20Green%20%0AWrite-Host%20%22%20---------------------------------------------------------%22%0AWrite-Host%20%22%20%22%0AWrite-host%20%22%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%22%0AWrite-host%20%22%20%20%20--%26gt%3B%26gt%3B%20RootSite%3A%22%2C%20%24myCurrentWeb.URL%20-ForegroundColor%20green%0AWrite-host%20%22%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%22%0ACheck-And-Fix-Field-In-SPList%20%24mySitectx%20%24myCurrentWeb%0AGet-SPOSubWebs%20%24mySitectx%20%24myCurrentWeb%0AWrite-host%20%22%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%22%0A%3C%2FPRE%3E%0A%3CP%3EFabrice%20Romelard%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFrench%20version%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.developpeur.org%2Ffabrice69%2Farchive%2F2018%2F11%2F27%2Fsharepoint-online-script-powershell-pour-supprimer-une-colonne-dans-tous-les-sites-d-une-collection.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fblogs.developpeur.org%2Ffabrice69%2Farchive%2F2018%2F11%2F27%2Fsharepoint-online-script-powershell-pour-supprimer-une-colonne-dans-tous-les-sites-d-une-collection.aspx%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3ESource%20used%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F31151.sharepoint-online-content-types-in-powershell-get.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F31151.sharepoint-online-content-types-in-powershell-get.aspx%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F31444.sharepoint-online-content-types-in-powershell-edit.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F31444.sharepoint-online-content-types-in-powershell-edit.aspx%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.sharepoint.client.contenttype.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.sharepoint.client.contenttype.aspx%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.sharepoint.client.field.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.sharepoint.client.field.aspx%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fthesharedcontext.wordpress.com%2F2014%2F12%2F11%2Fremoving-a-site-column-from-a-content-type-using-the-client-object-model%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fthesharedcontext.wordpress.com%2F2014%2F12%2F11%2Fremoving-a-site-column-from-a-content-type-using-the-client-object-model%2F%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3E%3CEM%3E%3CA%20href%3D%22http%3A%2F%2Fwww.sharepointdiary.com%2F2016%2F08%2Fsharepoint-online-rename-column-using-powershell.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.sharepointdiary.com%2F2016%2F08%2Fsharepoint-online-rename-column-using-powershell.html%3C%2FA%3E%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-291710%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efield%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Frequent Contributor

Our large SharePoint Online Site collection used for Intranet Corporate Portal based on Publishing site, we have a large number of subsites into.

 

We had to remove a field place into the page library of all those subsites.

The following script was built to do that removal.

You can adapt it as you want for your own requirements.

 

[string]$username = "Admin@yourtenant.onmicrosoft.com"
[string]$PwdTXTPath = "C:\SECUREDPWD\ExportedPWD-$($username).txt"
$secureStringPwd = ConvertTo-SecureString -string (Get-Content $PwdTXTPath)
$adminCreds = New-Object System.Management.Automation.PSCredential $username, $secureStringPwd

[string]$RootSiteToCheck = "https://yourtenant.sharepoint.com/sites/YourSiteCollection"
[string]$SPListToCheck = "Pages"
[string]$SPFieldInternalNameToCheck = "PublishedDate"

function Load-DLLandAssemblies
{
	[string]$defaultDLLPath = ""
	# Load assemblies to PowerShell session 
	$defaultDLLPath = "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"
	[System.Reflection.Assembly]::LoadFile($defaultDLLPath)
	$defaultDLLPath = "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"
	[System.Reflection.Assembly]::LoadFile($defaultDLLPath)
	$defaultDLLPath = "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"
	[System.Reflection.Assembly]::LoadFile($defaultDLLPath)
}

function Check-And-Fix-Field-In-SPList ([Microsoft.SharePoint.Client.ClientContext]$Context, [Microsoft.SharePoint.Client.Web]$CurrentWeb)
{
	$MyCurrentListTocheck = $CurrentWeb.Lists.GetByTitle($SPListToCheck)
	$AllSPListCT = $MyCurrentListTocheck.ContentTypes
	$Context.Load($MyCurrentListTocheck)
	$Context.Load($AllSPListCT)
	$Context.ExecuteQuery()
	Write-Host "  ===>>> SubSite to check:", $CurrentWeb.Title, "- URL:", $CurrentWeb.Url -ForegroundColor Green
	Write-Host "  ===>>> List to check:", $MyCurrentListTocheck.Title -ForegroundColor Green
	foreach($MySpListCT in $AllSPListCT)
	{
		Write-Host "         -->> Content Type Name:", $MySpListCT.Name
		Write-Host "         -->> Content Type ID:", $MySpListCT.id
		$Myfields = $MySpListCT.Fields
		$Context.Load($Myfields)
		$Context.ExecuteQuery()
		$MyfieldToCheck = ($Myfields | where {$_.InternalName -eq $SPFieldInternalNameToCheck})
		if($MyfieldToCheck -ne $null)
		{
			Write-Host "             ---------------------------------------------- " -ForegroundColor Yellow
			Write-Host "             >>>> Field Name:", $MyfieldToCheck.Title -ForegroundColor Yellow
			Write-Host "             >>>> Field InternalName:", $MyfieldToCheck.InternalName, "- Field ID:", $MyfieldToCheck.id -ForegroundColor Yellow
			Write-Host "             >>>> Field Required:", $MyfieldToCheck.Required -ForegroundColor Yellow
			Write-Host "             ---------------------------------------------- " -ForegroundColor Yellow
			$MyfieldToCheck.DeleteObject();
			$MySpListCT.Update($false);
			$Context.Load($MySpListCT);
			$Context.ExecuteQuery()
			Write-Host "             >>>> Field Deleted !!!!" -ForegroundColor Red
		}
	}
}

function Get-SPOSubWebs
{
	Param( 
        [Microsoft.SharePoint.Client.ClientContext]$Context, 
        [Microsoft.SharePoint.Client.Web]$RootWeb
    ) 
	$Webs = $RootWeb.Webs
	$Context.Load($Webs)
	$Context.ExecuteQuery()
	ForEach ($sWeb in $Webs)
	{
		Write-host "   ====>> SubSite:", $sWeb.URL -ForegroundColor red
		Check-And-Fix-Field-In-SPList $Context $sWeb
		Get-SPOSubWebs -RootWeb $sWeb -Context $Context
	} 
} 

cls
Write-Host " ---------------------------------------------- "
Load-DLLandAssemblies
Write-Host " ---------------------------------------------- "
Write-host "===================================================================================================" -ForegroundColor Green
$mySitectx = New-Object Microsoft.SharePoint.Client.ClientContext($RootSiteToCheck)
$mySitectx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($adminCreds.UserName, $adminCreds.Password)
$mySitectx.RequestTimeout = 1000000 # milliseconds
$myCurrentWeb = $mySitectx.Web
$mySitectx.Load($myCurrentWeb)
$mySitectx.ExecuteQuery()
Write-Host " "
Write-Host " ---------------------------------------------------------"
Write-Host "  >>>> # Server Version:" $mySitectx.ServerVersion " # <<<<<<" -ForegroundColor Green 
Write-Host " ---------------------------------------------------------"
Write-Host " "
Write-host "==================================================================================================="
Write-host "   -->> RootSite:", $myCurrentWeb.URL -ForegroundColor green
Write-host "==================================================================================================="
Check-And-Fix-Field-In-SPList $mySitectx $myCurrentWeb
Get-SPOSubWebs $mySitectx $myCurrentWeb
Write-host "==================================================================================================="

Fabrice Romelard

 

French version:

Source used:

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies