Last active
February 3, 2023 13:05
-
-
Save ivanhub/01c4336ce1b7395f96c69a74b0148128 to your computer and use it in GitHub Desktop.
Export all users with their permissions Sharepoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $web = Get-SPWeb http://SITE | |
| $user=$web.AllUsers | |
| $user|Select LoginName,@{Name='Groups';Expression={$_.Groups -join '|'}} | set-Content -Encoding UTF8 filename | |
| or | |
| get-SPUser -Web http://SITE|Select LoginName,@{Name='Groups';Expression={$_.Groups -join '|'}} | set-Content -Encoding UTF8 filename | |
| or | |
| get-SPUser -LIMIT ALL -Web http://URL |Select LoginName,@{Name='Groups';Expression={$_.Groups -join '|'}}|select-string XXX|select-string "=}" -NotMatch |set-Content -Encoding UTF8 file.csv | |
| #$user|Select LoginName,@{Name='Groups';Expression={$_.Groups -join '|'}}|select-string XXX|select-string "=}" -NotMatch |set-Content -Encoding UTF8 blabla.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment