Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory"
The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath).
If I run the same script trying to add a local user, it passes OK.
Where can be a problem?
Thank you.
Fyodor.

Adding a user through vbscript
What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
-- Zack Whittaker » ZackNET Enterprises: www.zacknet.co.uk » MSBlog on ResDev: www.msblog.org » Vista Knowledge Base: www.vistabase.co.uk » This mailing is provided "as is" with no warranties, and confers no rights. All opinions expressed are those of myself unless stated so, and not of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared that up!
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message
Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory"
The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath).
If I run the same script trying to add a local user, it passes OK.
Where can be a problem?
Thank you.
Fyodor.
Hello Zack, I am running Vista build 5308. From your post I understand that to add a domain user to local group I need to be a Domain Admin. Is it true? Does behavior differ from XP where I can add a domain user to local group?
thank you.
What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory" The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath). If I run the same script trying to add a local user, it passes OK.
Where can be a problem?
Thank you.
Fyodor.
It should be exactly the same as XP - try making sure that UAP/UAC is disabled though as this can cause problems sometimes. http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap
-- Zack Whittaker » ZackNET Enterprises: www.zacknet.co.uk » MSBlog on ResDev: www.msblog.org » Vista Knowledge Base: www.vistabase.co.uk » This mailing is provided "as is" with no warranties, and confers no rights. All opinions expressed are those of myself unless stated so, and not of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared that up!
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message
Hello Zack, I am running Vista build 5308. From your post I understand that to add a domain user to local group I need to be a Domain Admin. Is it true? Does behavior differ from XP where I can add a domain user to local group?
thank you.
What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory" The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath). If I run the same script trying to add a local user, it passes OK.
Where can be a problem?
Thank you.
Fyodor.
Hello Zack, Thanks, it worked! One more question: is there any possibility to avoid switching UAP\UAC off? We cannot make a user to switch it on/off every time. Where can I find an information about this feature? Is this feature introduced in Vista for the first time?
Thank you, Fyodor.
It should be exactly the same as XP - try making sure that UAP/UAC is disabled though as this can cause problems sometimes. http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hello Zack, I am running Vista build 5308. From your post I understand that to add a domain user to local group I need to be a Domain Admin. Is it true? Does behavior differ from XP where I can add a domain user to local group? thank you.
What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory" The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath). If I run the same script trying to add a local user, it passes OK. Where can be a problem?
Thank you.
Fyodor.
It's a computer setting rather than a per-user settings I believe. I've written some articles on it, they've got some links at the bottom if they help. http://www.vistabase.co.uk/welcome.php?subcats/security/whatisuap http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap http://www.microsoft.com/technet/windowsvista/evaluate/feat/uaprot.mspx
-- Zack Whittaker » ZackNET Enterprises: www.zacknet.co.uk » MSBlog on ResDev: www.msblog.org » Vista Knowledge Base: www.vistabase.co.uk » This mailing is provided "as is" with no warranties, and confers no rights. All opinions expressed are those of myself unless stated so, and not of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared that up!
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message
Hello Zack, Thanks, it worked! One more question: is there any possibility to avoid switching UAP\UAC off? We cannot make a user to switch it on/off every time. Where can I find an information about this feature? Is this feature introduced in Vista for the first time?
Thank you, Fyodor.
It should be exactly the same as XP - try making sure that UAP/UAC is disabled though as this can cause problems sometimes. http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hello Zack, I am running Vista build 5308. From your post I understand that to add a domain user to local group I need to be a Domain Admin. Is it true? Does behavior differ from XP where I can add a domain user to local group? thank you.
What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory" The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath). If I run the same script trying to add a local user, it passes OK. Where can be a problem?
Thank you.
Fyodor.
Hello Zack, Thaks a lot!
Fyodor
It's a computer setting rather than a per-user settings I believe. I've written some articles on it, they've got some links at the bottom if they help. http://www.vistabase.co.uk/welcome.php?subcats/security/whatisuap http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap http://www.microsoft.com/technet/windowsvista/evaluate/feat/uaprot.msp x --: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hello Zack, Thanks, it worked! One more question: is there any possibility to avoid switching UAP\UAC off? We cannot make a user to switch it on/off every time. Where can I find an information about this feature? Is this feature introduced in Vista for the first time? Thank you, Fyodor. It should be exactly the same as XP - try making sure that UAP/UAC is disabled though as this can cause problems sometimes. http://www.vistabase.co.uk/welcome.php?subcats/security/disableuap
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hello Zack, I am running Vista build 5308. From your post I understand that to add a domain user to local group I need to be a Domain Admin. Is it true? Does behavior differ from XP where I can add a domain user to local group? thank you. What OS are you running... and if you're running Longhorn Server or Vista, make sure you're logged in as a Domain Admin and not the local Administrator.
--: Original message follows :-- "Fyodor Koryazhkin" wrote in message Hi, I am trying to add a domain memeber to a local group but my script fails with the following error: "General access denied error Code: 80070005 Source: Active Directory" The script I am running is: computername = computer ServerName = domain User_Name = user set IIS_WPG = GetObject("WinNT://" & computername & "/IIS_WPG,group") set MyUser = GetObject("WinNT://" & ServerName & "/" & User_Name & ",user") if not IIS_WPG.IsMember(MyUser.AdsPath) then IIS_WPG.Add(MyUser.AdsPath) End if The script fails on the line IIS_WPG.Add(MyUser.AdsPath). If I run the same script trying to add a local user, it passes OK. Where can be a problem? Thank you.
Fyodor.
Windows Vista
User login
Related topics
- CROSSFIRE!
- URGE downloaded music and the Media Center Extender
- BFME2 - Lord of the Rings Battle for Middle Earth II
- Vista AV?
- Can't see folders on network drive
- Unable to login to my profile
- Radeon x1600 pro and Aero?
- Can no longer find restore drive
- My Vista install experience.
- Taskswitch
- Vista Beta as main OS?
- All of you guys Violated your NDA!
- When moving a window around.
- how do i do a install and be able to keep my existing partit
- New to Vista - Can't set network configuration
- Windows Vista Review by GCN
- Use Partition Magic to Dualboot Vista &XP
- how can i install my programs & files from windows.old to Vi
- UAC (User Account Control)
- Why was no Automatic Restore to XP included?
- HP Slimline s7520n
- Readyboost only works on one usb slot
- Sidebar Weather Gadgets
- Photo Gallery rotate changes EXIF 'acquisition date'
- Uninstall Vista Beta 2 off of Toshiba Laptop
- Aero glass theme does not work....
- ****** Antivirus
- validation
- Event Log Summary
- my taskbar doesnt work. i cant click anything
- Expand icon in folder tree too small
- Help finding driver for MICROSOFT Intellimouse Explorer 3
- pls help???
- Windows Explorer Crashing
- Flip 3d, aero not working
- Network Places is broken.
- Cannot Create Mail Rules
- setup
- windows vista drivers update and boot process
- DVD Burning