调用 GetObject(“WinNT://JohnDoe,User”) 时出现 VBScript 错误
我有一年多没有碰过的代码,但 DC 从 2008 升级到 2008 R2。 AD 人员声称这不是 DC 升级,但问题在升级后立即开始。
Microsoft VBScript 运行时错误“800a0046”
权限被拒绝:“GetObject”
在“设置组”行上失败。
Set Group = GetObject("WinNT://" & Logon_name & ",User")
For each Member in Group.Groups
If Member.Class = "Group" then
If Member.Name = "TEST_AD_GROUP" Or Member.Name = "TEST_AD_GROUP2" then
x = "true"
Exit For
End If
End If
Next
谢谢。
I have code that hasn't been touched in over a year, but the DCs were upgraded from 2008 to 2008 R2. The AD folks claim it’s not the DC upgrade but the issue started promptly after that went in.
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
It's failing on the Set Group line.
Set Group = GetObject("WinNT://" & Logon_name & ",User")
For each Member in Group.Groups
If Member.Class = "Group" then
If Member.Name = "TEST_AD_GROUP" Or Member.Name = "TEST_AD_GROUP2" then
x = "true"
Exit For
End If
End If
Next
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须更改代码以传递用户 ID 和密码。
i had to change the code to pass in the userid and pwd.