C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Get All Personal Sites In SharePoint Online
WhatsApp
Praveen Pudi
7y
19.8
k
0
2
25
Blog
We can fetch all personal sites that are provisioned in our tenant using the below scripts.
#Parameter required
Param(
[string]$Username,
[string]$Password,
[string]$SPAdminUrl
)
$SecurePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
$Credential = New-Object -TypeName
"System.Management.Automation.PSCredential"
-ArgumentList $Username, $SecurePassword
Connect-SPOService -Url $SPAdminUrl -Credential $Credential
Write-Host
"#Connected to SP Tenant"
$OD4BSites = Get-SPOSite -IncludePersonalSite $
true
-Template
"SPSPERS#10"
Write-Host
"There are total "
$OD4BSites.Length
Foreach($OD4BSite in $OD4BSites){
Write-Host $OD4BSite.Url
}
Save the above as a PowerShell script and execute it. Please find the output image below.
People also reading
Membership not found