Mon. Jan 3rd, 2022
#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)
$SPOcredentials = New-Object System.Management.Automation.PSCredential($dst_username,$spopassword)


$SiteURL = "https://yourdomain.sharepoint.com"
Connect-PnPOnline -Url $SiteURL -Credential $SPOcredentials

This website uses cookies. By continuing to use this site, you accept our use of cookies.