Question

I need to get all the users that are added to spgroup "XX" on specific date .

$url = "https://spsite.com
$User = Get-SPUser -web $url -Group "XX"

$User | Select Userlogin,Groups,DisplayName,Email,LoginName

how to get creation date ?

Was it helpful?

Solution

well the answer is to get users from the hide spList: "siteUserinfoList"

$today=Get-Date -Format "MM/dd/yyyy"        
        $spSite = Get-SPSite $url 
        $spWeb = Get-SPWeb $url 
        $todayNewUsers =$spWeb.SiteUserInfoList.Items | ?{ (Get-date -Date $_['Created'] -UFormat "%m/%d/%Y") -eq $today}
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top