我需要一个脚本来检测,如果一台计算机是在Active Directory用户组 [英] I need a script to detect if a computer is in an active directory user group
问题描述
我在网上找到了一个VBscript的一台计算机连接到一个组中的OU的用户直接访问工作。它完全在我们的OSD使用SCCM 2012的任务序列,但我们已经到了一个路障,我们只是想加入的笔记本电脑而不是所有的计算机。
I found online a VBscript that joins a computer to a group in the Users OU for Direct Access to work. It works perfectly in the task sequence for our OSD using SCCM 2012 but we've come to a road block where we only want laptops to be added rather then all computers.
如果有人会这么好心,我需要一个脚本(PowerShell中,VB,JScript中),将检测到的计算机添加到组中的广告。
If someone would be so kind, I need a script (Powershell, VB, JScript) that will detect that the computer was added to the group in AD.
推荐答案
设置任务序列步骤根据条件来运行。
Set the task sequence step to run based on a condition.
以上条件检测,如果计算机是一台笔记本电脑。当你有MDT整合,第二个使用一个简单的WMI查询来检测系统类型的第一个只会工作。
The above conditions detects if the computer is a laptop. The first one will only work when you have MDT integrated and the second uses a simple WMI query to detect the system type.
WMI查询可能不可靠,所以我会建议你MDT集成到您的环境。
The WMI query might not be as reliable, so I would advice you integrate MDT into your environment.
这篇关于我需要一个脚本来检测,如果一台计算机是在Active Directory用户组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!