Hi All,
The Last two day SharePoint Logs has been increasing significantly.
I did run below.
Now i am running out of space.
I did user Sp-web. and .Dispose();
Any help Thanks.
if($ps -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue } $NewCSVObject = @() ##########################Get-User Groups---########### $web = Get-SPWeb "https://mysite/site/subsite" foreach ($group in $web.groups){ write-host -foregroundcolor white "----Collecting users from group:"$group.Name "..." foreach($user in $group.users) { if ($user.Loginname.StartsWith("SHAREPOINT\")) {continue} if ($user.Loginname.StartsWith("NT")) {continue} write-host -foregroundcolor Yellow "-------User:"$user.DisplayName + $user.UserLogin + $group.Name $assocatedSiteObject = New-Object PSObject $assocatedSiteObject | add-Member -MemberType NoteProperty -name "DisplayName" -value $user.DisplayName $assocatedSiteObject | add-Member -MemberType NoteProperty -name "Login" -value $user.UserLogin $assocatedSiteObject | add-Member -MemberType NoteProperty -name "SP Group Name" -value $group.Name $NewCSVObject +=$assocatedSiteObject } } $web.Dispose(); $NewCSVObject | Export-CSV "E:\TeamLMI\SiteUsrs.csv" -NoTypeInformation
Abenet