$spweb.hasuniqueroleassignments will return $true not "True"
SharePoint 2010
Hi All,
Looking for expert opinions on this script I have written. The intention is to deny access to sites identified as not being used, in preparation for a migration from SharePoint 2010 to SharePoint Online. Have I missed anything?
I have skipped removing the limited access permissions, because I am not really sure what they are there for... Are they required system permissions?
Also,
I am a bit concerned about this line:
$spweb.hasuniqueroleassignments -eq "True"
should it actually be:
$spweb.hasuniqueroleassignments -eq $True
Had to rename my PS1 to TXT, I guess it is deemed dangerous
2 answers
Sort by: Most helpful
-
-
ChelseaWu-MSFT 6,316 Reputation points
2020-07-22T02:05:48.173+00:00 - The Limited Access permission is automatically assigned by SharePoint when you provide access to one specific item. You cannot assign Limited Access permissions directly to a user or group yourself, but it is safe to remove this permission from a user or group.
- The value returned by SPWeb.HasUniqueRoleAssignments Property is True/False in SharePoint Server 2013 or higher version, but $True/$False in SharePoint Server 2010.