Assigning a group to a sharepoint role via stsadm (moss2007)
Hi
On our Sharepoint 2007 server, in a particular site collection, I have a bunch of users added to a group called 'staff'. How can I assign this group to Sharepoints internal 'designers'
role using Powershell.
I thought that something like:
stsadm -o userrole -url
http://site -userlogin domain\user -role design
might do the trick, but this only returns user not found, even though if I try to add the role to the user with the UI the account is there and can be added without any problems.
Any thoughts anyone?
Regards
Gary
November 19th, 2010 9:12am
did you read this?
http://technet.microsoft.com/en-us/library/cc287679(office.12).aspx
SergeSerge
Free Windows Admin Tool Kit Click here and download it now
November 21st, 2010 10:07pm
Hi Gary,
I have a test with an AD security group called “Group1” on my MOSS 2007 SP2, what I found is that I was unable to add a group directly to a site permission
level via stsadm –o userrole command line unless it has previously been given permissions on that site. I added “Group1” to a permission level on a site for the first time using stsadm -o userrole, but I got the error message “User
cannot be found”, trying to add the role through the UI came out with success though. Then, I use
stsadm –o adduser, operation complete successfully and Group1 has been added to the permission
level I specified in the command. After that, I can modify the permission level to Group1 using stsadm -o userrole.
Seems that stsadm –o userrole can only be used to modify the permissions of a user or group that already is assigned permissions on a site. To directly add
a user or a group to sites permissions you might need to use stsdam -o adduser.
Hope it helps.
Thanks & Regards.
Lily Wu
TechNet Subscriber Support in
forum
If you have any feedback on our support, please contact
tngfb@microsoft.comLily Wu
November 22nd, 2010 1:06am