Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
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
SharePoint: Powershell List all the Users under Particular Site Collection
WhatsApp
Karthik Muthu Karuppan
Apr 29
2015
1.5
k
0
0
if
( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $
null
) {
Add-PSSnapin Microsoft.SharePoint.Powershell
}
$SiteCollURL = read-host
"Enter the site colelction URL "
$siteColl = get-spsite $SiteCollURL
foreach($web
in
$sitecoll.allwebs)
{
write-host
"Users under the web "
$web.url -fore cyan
foreach($user
in
$web.siteusers)
{
write-host
"User: "
$User.loginname -fore green
}
}
write-host
""
write-host
"SCRIPT COMPLETED"
-fore green
SharePoint
PowerShell List Users
Up Next
SharePoint: Powershell List all the Users under Particular Site Collection