Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

i install sharepoint 2010 on a server which name is BPMS-SERVER

my domain and active directery is on another server named PA-SERVER

PA-server -> active directory refresh and renewed but in same domain name and same user names

but share point tell all user access denied

i can't access sharepoint administrator center , i can't access share point sites ,

any thing return me and my users access denied ,

i run following script in power shell

/////////////////////

####SET ACCOUNT NAMES (Replace Domain and UserName)

#SUPER USER ACCOUNT - Use your own Account (NB: NOT A SHAREPOINT ADMIN)
$sOrigUser= "blue\SP_SuperUser"
$sUserName = "SP_SuperUser"

#SUPER READER ACCOUNT - Use your own Account (NB: NOT A SHAREPOINT ADMIN)
$sOrigRead = "blue\SP_SuperRead"
$sReadName = "SP_SuperRead"


$apps = get-spwebapplication
foreach ($app in $apps) {
#DISPLAY THE URL IT IS BUSY WITH
$app.Url
if ($app.UseClaimsAuthentication -eq $true)
{
# IF CLAIMS THEN SET THE IDENTIFIER
$sUser = "i:0#.w|" + $sOrigUser
$sRead = "i:0#.w|" + $sOrigRead
}
else
{
# CLASSIC AUTH USED
$sUser = $sOrigUser
$sRead = $sOrigRead
}

# ADD THE SUPER USER ACC - FULL CONTROL (Required for writing the Cache)
$policy = $app.Policies.Add($sUser, $sUserName)
$policyRole = $app.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl)
$policy.PolicyRoleBindings.Add($policyRole)

$app.Properties["portalsuperuseraccount"] = $sUser
$app.Update()

# ADD THE SUPER READER ACC - READ ONLY
$policy = $app.Policies.Add($sRead, $sReadName)
$policyRole = $app.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead)
$policy.PolicyRoleBindings.Add($policyRole)

$app.Properties["portalsuperreaderaccount"] = $sRead
$app.Update()

}

.////

i get access of site with this script for one user that i entered in the script , but i can't access administrator center ,

i can't set permission for other user ( i set permission but i can't get any effect , still all user get access denied )

please help me to return my sharepoint site
Posted

1 solution

some one tell some thing :( :( i'll lost my job
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900