#author("2021-11-26T08:52:48+09:00","","")
[[ソフトウェア開発>SoftwareEngineering]] / [[VBScript>VBScript]] / [[Active Directory>ActiveDirectory]] / [[CreateGroup>./]]
#author("2021-11-26T08:53:25+09:00","","")
[[ソフトウェア開発>SoftwareEngineering]] / [[VBScript>VBScript]] / Active Directory / [[CreateGroup>./]]

 '
 ' グループを作成する
 '
 ' 定数定義
 Const ADS_GROUP_TYPE_GLOBAL_GROUP = &H2                 ' グローバル グループ
 Const ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = &H4           ' ドメイン ローカル グループ
 Const ADS_GROUP_TYPE_UNIVERSAL_GROUP = &H8              ' ユニバーサル グループ
 Const ADS_GROUP_TYPE_SECURITY_ENABLED = &H80000000      ' セキュリティ グループ
 
 
 
 Set container = GetObject("LDAP://DC01.codereign.org/CN=Users,DC=codereign,DC=org")
 
 
 
 Set group = container.Create("Group", "cn=group0001")
 group.Put "sAMAccountName", "group0001"
 group.Put "groupType", (ADS_GROUP_TYPE_GLOBAL_GROUP + ADS_GROUP_TYPE_SECURITY_ENABLED)  ' グループの種類/スコープ
 group.SetInfo
 
 
 
 '------------------------------------------------------------------------------
 ' 全般/General
 '------------------------------------------------------------------------------
 group.Put "description", "説明"                         ' 説明
 group.Put "mail", "group0001@codereign.org"             ' 電子メール
 group.Put "info", "メモ"                                ' メモ
 
 group.SetInfo

トップ   差分 履歴 リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS