Jump to content


Tjindarr

Established Members
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Tjindarr

  1. Is there a way to add a computer to a security group with the help of the windows 7 installation task sequence?

     

     

    I found this when i googled abit but im not to familiar with scripts... where do i input our domain and group information?

     

     

     

    Const ADS_PROPERTY_APPEND = 3

     

     

    Set WshShell = WScript.CreateObject("WScript.Shell")

     

    '----Get Computer DN------

    Set objADSysInfo = CreateObject("ADSystemInfo")

    ComputerDN = objADSysInfo.ComputerName

    strcomputerdn = "LDAP://" & computerDN

    Set objADSysInfo = Nothing

     

    '----Connect AD-----

    Set oRoot = GetObject("LDAP://rootDSE")

    strDomainPath = oRoot.Get("defaultNamingContext")

    Set oConnection = CreateObject("ADODB.Connection")

    oConnection.Provider = "ADsDSOObject"

    oConnection.Open "Active Directory Provider"

     

    '-----Read commandline---

    Set args = WScript.Arguments

     

    For i = 0 To Args.Count - 1

    'wscript.echo Args.Item( i )

    addgroup Args.Item( i )

    next

     

     

    Function Addgroup(groupname)

    '----Get Group DN------

     

    Set oRs = oConnection.Execute("SELECT adspath FROM 'LDAP://" & strDomainPath & "'" & "WHERE objectCategory='group' AND " & "Name='" & GroupName & "'")

    If Not oRs.EOF Then

    strAdsPath = oRs("adspath")

    End If

     

    Set objGroup = GetObject (stradspath)

    Set objComputer = GetObject (strComputerDN)

     

    If (objGroup.IsMember(objComputer.AdsPath) = False) Then

    objGroup.PutEx ADS_PROPERTY_APPEND, "member", Array(computerdn)

    objGroup.SetInfo

    End If

     

    End Function

  2. Hi.

     

    We have a SCCM server running server 2008 with SCCM sp2

    But its not running to well. its slow and i constantly have to restart the WDS service when i add a new computer to install. The SCCM mmc crashes and so on.

     

    I was thinking of setting up a new server running Server 2008 R2. i still wanna keep the SQL database but move that to a SQL server 2008 R2.

     

    im just wondering if theres something i need to watch out for when setting up the new server or moving the database...

    ive read that moving the database isnt the simplest thing but the new server should be a problem i just need to move the site settings right?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.