Install SharePoint PnP PowerShell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Install-Module SharePointPnPPowerShellOnline -Verbose
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Install-Module SharePointPnPPowerShellOnline -Verbose
#Parameters value $spopasswordFile = "c:\PSscripts\Credentials\spo_password.txt"; $spopassword = Get-Content $spopasswordFile | ConvertTo-SecureString $NetworkpasswordFile = "c:\PSscripts\Credentials\Network_password.txt"; $Networkpassword = Get-Content $NetworkpasswordFile | ConvertTo-SecureString #Setup Credentials to connect $Credentials = New-Object System.Net.NetworkCredential($src_username, $Networkpassword, $domain)…
function new-SPOnlineSite ($siteUrl,$title,$siteOwner, $template) { $siteExists = $null; $siteExistsInRecycleBin = $null; try { #verify if site already exists in SharePoint Online $siteExists = get-SPOSite $siteUrl; #verify if site already exists…
This website uses cookies. By continuing to use this site, you accept our use of cookies.