none
Code Formating Tests RRS feed

  • Question

  • Code pasted using Insert HTML and with gray border specfied:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----

    The same code, but without the gray border specified:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Thursday, April 26, 2012 3:02 PM

All replies

  • Test single line with Insert Code Block:

    CMDLine1 = "%comspec% /c xcacls """ & Subfolder & """ /T /E /C /Y /G MyDomain\staff:r /G ""MyDomain\Domain admins"":f /G MyDomain\" & userName & ":c"

    ---------

    Now the same with Insert HTML and gray border specified:

    CMDLine1 = "%comspec% /c xcacls """ & Subfolder & """ /T /E /C /Y /G MyDomain\staff:r /G ""MyDomain\Domain admins"":f /G MyDomain\" & userName & ":c"

    -----

    -------

    Now the same with Insert HTML and no border specified:

    CMDLine1 = "%comspec% /c xcacls """ & Subfolder & """ /T /E /C /Y /G MyDomain\staff:r /G ""MyDomain\Domain admins"":f /G MyDomain\" & userName & ":c"

    -----



    Richard Mueller - MVP Directory Services

    Thursday, April 26, 2012 9:16 PM
  • Code using Insert HTML and specifying a gray border:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Saturday, April 28, 2012 11:25 PM
  • Exact same code, using the exact same HTML as used in the previous reply:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Monday, April 30, 2012 4:08 PM
  • Same code, same HTML:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Thursday, May 3, 2012 2:32 PM
  • Same code, same HTML:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Wednesday, May 9, 2012 2:30 PM
  • Same code, but using Insert Code Block feature and selecting VB.NET:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")
    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")
    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next


    Richard Mueller - MVP Directory Services

    Wednesday, May 9, 2012 7:40 PM
  • A single line of code, using the Insert Code Block feature:

    dsquery * -filter "(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))" -attr sAMAccountName displayName


    Richard Mueller - MVP Directory Services

    Wednesday, May 9, 2012 9:33 PM
  • Same code, using Insert HTML and specifying a border and fixed-width font in a style:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----

    The above looks fine in the forum editor before I click "Submit".

    However, my style got stripped out after I clicked "Submit". Now the font is proportional, indenting has been reduced, and there is no border. The fix is to not specify a border in the style, but specify an <hr> tag instead to separate the code from the text.

    Richard Mueller - MVP Directory Services


    Friday, May 11, 2012 5:06 PM
  • PowerShell script, using Insert HTML with no border:


    #####################################################################
    # Test-Me.ps1
    # Version 0.63
    #
    # This script just tests something
    #
    #####################################################################
    #requires -Version 2.0

    function Test-Me {
    [CmdletBinding()]
        param (
            [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
            [string]$Argument
        )
        Write-Host "You have passed the following argument to me:"
        Write-Host $Argument
    }

    -----



    Richard Mueller - MVP Directory Services

    Saturday, May 12, 2012 2:21 PM
  • Improved HTML, no border:


    #####################################################################
    # Test-Me.ps1
    # Version 0.63
    #
    # This script just tests something
    #
    #####################################################################
    #requires -Version 2.0

    function Test-Me {
    [CmdletBinding()]
        param (
            [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
            [string]$Argument
        )
        Write-Host "You have passed the following argument to me:"
        Write-Host $Argument
    }

    -----



    Richard Mueller - MVP Directory Services

    Sunday, May 13, 2012 9:21 PM
  • Insert HTML with border specified:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Monday, May 14, 2012 5:47 PM
  • Insert HTML with border:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Saturday, May 19, 2012 9:30 PM
  • Insert HTML with border:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Friday, May 25, 2012 2:28 PM
  • Insert HTML with border:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Tuesday, May 29, 2012 2:04 AM
  • Insert HTML with border:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Thursday, June 21, 2012 8:24 PM
  • Using "Insert Code Block" and selecting VB.Net:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")
    
    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")
    
    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next


    Richard Mueller - MVP Directory Services

    Wednesday, July 18, 2012 4:17 PM
  • Using "Insert Code Block" and selecting PowerShell:

    $Users = Get-ADUser -Filter * -Properties memberOf | Select sAMAccountName, memberOf
    ForEach ($User In $Users)
    {
        # Process each user.
        $Line = $($User.sAMAccountName)
        ForEach ($GroupDN In $User.memberOf)
        {
            # Process each group.
            $Group = $(Get-ADGroup $GroupDN | Select sAMAccountName).sAMAccountName
            $Line = "$Line,$Group"
        }
        # Output for user.
        $Line
    }


    Richard Mueller - MVP Directory Services

    Wednesday, July 18, 2012 4:22 PM
  • Same PowerShell code, but using "Insert HTML" with a border:

    $Users = Get-ADUser -Filter * -Properties memberOf | Select sAMAccountName, memberOf
    ForEach ($User In $Users)
    {
        # Process each user.
        $Line = $($User.sAMAccountName)
        ForEach ($GroupDN In $User.memberOf)
        {
            # Process each group.
            $Group = $(Get-ADGroup $GroupDN | Select sAMAccountName).sAMAccountName
            $Line = "$Line,$Group"
        }
        # Output for user.
        $Line
    }

    -----



    Richard Mueller - MVP Directory Services

    Wednesday, July 18, 2012 4:23 PM
  • PowerShell code inserted using "Insert Code Block" button:

    $Users = Get-ADUser -Filter * -Properties memberOf | Select sAMAccountName, memberOf
    ForEach ($User In $Users)
    {
        # Process each user.
        $Line = $($User.sAMAccountName)
        ForEach ($GroupDN In $User.memberOf)
        {
            # Process each group.
            $Group = $(Get-ADGroup $GroupDN | Select sAMAccountName).sAMAccountName
            $Line = "$Line,$Group"
        }
        # Output for user.
        $Line
    }


    Richard Mueller - MVP Directory Services

    Wednesday, September 12, 2012 7:41 PM
  • Same PowerShell code inserted using "Insert Code Block", but with a multi-line comment at the beginning.

    <#
    This is a test, this is only a test.
    This fools the colorizer.
    #>
    $Users = Get-ADUser -Filter * -Properties memberOf | Select sAMAccountName, memberOf
    ForEach ($User In $Users)
    {
        # Process each user.
        $Line = $($User.sAMAccountName)
        ForEach ($GroupDN In $User.memberOf)
        {
            # Process each group.
            $Group = $(Get-ADGroup $GroupDN | Select sAMAccountName).sAMAccountName
            $Line = "$Line,$Group"
        }
        # Output for user.
        $Line
    }


    Richard Mueller - MVP Directory Services

    Thursday, September 13, 2012 2:10 AM
  • Repeat test with one one comment at the beginning:

    <# This is a test, this is only a test. #>
    $Users = Get-ADUser -Filter * -Properties memberOf | Select sAMAccountName, memberOf
    ForEach ($User In $Users)
    {
        # Process each user.
        $Line = $($User.sAMAccountName)
        ForEach ($GroupDN In $User.memberOf)
        {
            # Process each group.
            $Group = $(Get-ADGroup $GroupDN | Select sAMAccountName).sAMAccountName
            $Line = "$Line,$Group"
        }
        # Output for user.
        $Line
    }


    Richard Mueller - MVP Directory Services

    Saturday, September 15, 2012 5:52 PM
  • Similar VBScript example:

    strFolderA = "y:\SourceFolder\" ' note trailing \
    strFolderB = "x:\SomeFolder\*" ' not file mask
    strFolderC = "z:\TargetFolder"
    ' Try to remove all files that match FolderB.
    Set objFSO = CreateObject("Scripting.FileSystemObject")


    Richard Mueller - MVP Directory Services

    Saturday, September 15, 2012 5:57 PM
  • PowerShell test:

    $folderA="y:\sourcefolder\" # note trailing \
    $folderB="x:\somefolder\*"  # note filemask
    $folderC="z:\targetfolder"
    # try and move all files that match folderB
    dir $folderB | %{move "$folderA$($_.Name)" $folderC -force -whatif}


    Richard Mueller - MVP Directory Services

    Saturday, September 15, 2012 5:59 PM
  • Similar test, but without \", which might be interpreted as escaping the quote:

    $folderA="y:\sourcefolder" # note trailing \
    $folderB="x:\somefolder\*"  # note filemask
    $folderC="z:\targetfolder"
    # try and move all files that match folderB
    dir $folderB | %{move "$folderA$($_.Name)" $folderC -force -whatif}


    Richard Mueller - MVP Directory Services

    Saturday, September 15, 2012 6:00 PM
  • Same PowerShell code (with the trailing backslash in the first quoted string), but using Insert HTML and my PsToHTML.vbs program:

    $folderA="y:\sourcefolder\" # note trailing \
    $folderB="x:\somefolder\*"  # note filemask
    $folderC="z:\targetfolder"
    # try and move all files that match folderB
    dir $folderB | %{move "$folderA$($_.Name)" $folderC -force -whatif}

    -----



    Richard Mueller - MVP Directory Services

    Saturday, September 15, 2012 6:15 PM
  • VBScript code from TechNet Wiki, to compare colorization applied by VbsToHtml.vbs with that used in the Wiki:


    ' Eflaw.vbs
    ' VBScript program to calculate the McAlpine EFLAW(TM) Readability Score.
    ' McAlpine EFLAW(TM) Readability Score - Copyright (c) 2006 Rachel McAlpine
    ' Based on "From Plain English to Global English", by Rachel McAlpine
    ' http://www.webpagecontent.com/arc_archive/139/5/
    ' Script Author: Richard L. Mueller
    ' Version 1.0 - October 3, 2012

    Option Explicit

    Dim strFile, objFSO, objFile, strText, intWords, intMini, objRE
    Dim objWords, objWord, intSentences, objTerm, dblEflaw, strScore

    Const ForReading = 1

    ' Check for file or prompt.
    If (Wscript.Arguments.Count = 0) Then
        strFile = InputBox("Enter file name")
        ' Check if user canceled.
        If (strFile = "") Then
            Wscript.Quit
        End If
    Else
        strFile = Wscript.Arguments(0)
    End If

    Wscript.Echo "McAlpine EFLAW(TM) Readability Score - Copyright (c) 2006 Rachel McAlpine"
    Wscript.Echo "Script by Richard L. Mueller, Copyright (c) 2012, Version 1.0"
    Wscript.Echo "----------"
    Wscript.Echo "File: " & strFile

    ' Open the file.
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    On Error Resume Next
    Set objFile = objFSO.OpenTextFile(strFile, ForReading)
    If (Err.Number <> 0) Then
        Wscript.Echo "Unable to open file: " & strFile
        Wscript.Echo "Error Number: " & Err.Number
        Wscript.Echo "Description: " & Err.Description
        Wscript.Quit
    End If
    On Error GoTo 0

    ' Read the file.
    strText = objFile.ReadAll
    objFile.Close

    ' Add terminating space, to make sure last sentence recognized.
    strText = strText & " "

    ' Ignore characters, so they don't add to word lengths.
    strText = Replace(strText, "'", "")
    strText = Replace(strText, """", "")
    strText = Replace(strText, "(", "")
    strText = Replace(strText, ")", "")
    strText = Replace(strText, ";", "")

    ' Replace dash and colon with space, so they delimit words.
    strText = Replace(strText, ":", " ")
    strText = Replace(strText, "-", " ")

    Set objRE = New RegExp
    objRE.Global = True

    ' Parse into words (no leading digits).
    objRE.Pattern = "[a-zA-Z]\w*"
    Set objWords = objRE.Execute(strText)
    intWords = objWords.Count

    ' Count number of mini-words (three characters or less).
    intMini =  0
    For Each objWord In objWords
        If (objWord.Length < 4) Then
            intMini = intMini + 1
        End If
    Next

    ' Count sentences (terminated by ".", "?", or "!"). This assumes there
    ' is no space before the ".", "?", or "!" that terminates a sentence.
    objRE.Pattern = "\w*[\.|\?|\!][^0-9]"
    Set objTerm = objRE.Execute(strText)
    intSentences = objTerm.Count

    ' Calculate the McAlpine EFLAW(TM) Readability Score.
    dblEflaw = (intWords + intMini)/intSentences
    If (dblEflaw <= 20.49) Then
        strScore = "very easy to understand"
    ElseIf (dblEflaw <= 25.49) Then
        strScore = "quite easy to understand"
    ElseIf (dblEflaw <= 29.49) Then
        strScore = "a little difficult"
    Else
        strScore = "very confusing"
    End If

    Wscript.Echo "Number of words: " & CStr(intWords)
    Wscript.Echo "Number of mini-words: " & CStr(intMini)
    Wscript.Echo "Number of sentences: " & CStr(intSentences)
    Wscript.Echo "Words per sentence: " & FormatNumber((intWords/intSentences), 1)
    Wscript.Echo "McAlpine EFLAW(TM) Readability Score: " & FormatNumber(dblEflaw, 1) _
        & " (" & strScore & ")"

    -----



    Richard Mueller - MVP Directory Services


    • Edited by Richard MuellerMVP Thursday, October 4, 2012 3:20 PM fix style stripped from HTML
    Thursday, October 4, 2012 3:19 PM
  • PowerShell code from Wiki to compare colorization:


    # Hash table of security principals and their security group memberships.
    $GroupList = @{}
     
    Function IsMember ($ADObject, $GroupName)
    {
        # Function to check if $ADObject is a member of security group $GroupName.
     
        # Check if security group memberships for this principal have been determined.
        If ($GroupList.ContainsKey($ADObject.sAMAccountName.ToString() + "\") -eq $False)
        {
            # Memberships need to be determined for this principal. Add "pre-Windows 2000"
            # name to the hash table.
            $GroupList.Add($ADObject.sAMAccountName.ToString() + "\", $True)
            # Retrieve tokenGroups attribute of principal, which is operational.
            $ADObject.psbase.RefreshCache("tokenGroups")
            $SIDs = $ADObject.psbase.Properties.Item("tokenGroups")
            # Populate hash table with security group memberships.
            ForEach ($Value In $SIDs)
            {
                $SID = New-Object System.Security.Principal.SecurityIdentifier $Value, 0
                # Translate into "pre-Windows 2000" name.
                $Group = $SID.Translate([System.Security.Principal.NTAccount])
                $GroupList.Add($ADObject.sAMAccountName.ToString() `
                    + "\" + $Group.Value.Split("\")[1], $True)
            }
        }
        # Check if $ADObject is a member of $GroupName.
        If ($GroupList.ContainsKey($ADObject.sAMAccountName.ToString() + "\" + $GroupName))
        {
            Return $True
        }
        Else
        {
            Return $False
        }
    }
     
    # Bind to the user object in Active Directory.
    $User = [ADSI]"LDAP://cn=TestUser,ou=Sales,dc=MyDomain,dc=com"
     
    # Bind to the computer object in Active Directory.
    $Computer = [ADSI]"LDAP://cn=TestComputer,ou=Sales,dc=MyDomain,dc=com"
     
    If (IsMember $User "Engineering" -eq $True)
    {
        "User " + $User.sAMAccountName + " is a member of group Engineering"
    }
     
    If (IsMember $User "Domain Users" -eq $True)
    {
        "User " + $User.sAMAccountName + " is a member of group Domain Users"
    }
     
    If (IsMember $Computer "Deploy" -eq $True)
    {
        "Computer " + $Computer.sAMAccountName + " is a member of group Deploy"
    }

    -----



    Richard Mueller - MVP Directory Services

    Thursday, October 4, 2012 3:25 PM
  • Repeat test with VBScript code  using Insert HTML, with Compatibility Mode icon dimmed:

    ' Bind to group in domain A.
    Set objGroupA = GetObject("LDAP://cn=GroupA,ou=West,dc=DomainA,dc=com")

    ' Bind to group in domain B.
    Set objGroupB = GetObject("LDAP://cn=GroupB,ou=East,dc=DomainB,dc=com")

    ' Enumerate members of group in domain A.
    For Each objMember In objGroupA.Members
        ' Check if already a member of group in domain B.
        If (objGroupB.IsMember(objMember.ADsPath) = False) Then
            ' Add member to group in domain B.
            objGroupB.Add(objMember.ADsPath)
        End If
    Next

    -----



    Richard Mueller - MVP Directory Services

    Wednesday, October 10, 2012 5:31 PM
  • This is a test of paragraph spacing.

    The second paragraph is separated from the first by a blank line when I edit this post.

    Same for the third paragraph. Before I click Submit, this post has 5 lines, two of which are blank, before my signature.


    Richard Mueller - MVP Directory Services

    Thursday, October 11, 2012 2:50 PM
  • Similar post, but with Compatibility Mode icon clicked so it is colored (whatever that means).

    This is the second paragraph.

    And this is the third paragraph. Before I click Submit there are spaces between the paragraphs.


    Richard Mueller - MVP Directory Services

    Thursday, October 11, 2012 2:54 PM
  • Paragraph one.

    Paragraph two.

    Paragraph three.


    Richard Mueller - MVP Directory Services

    Thursday, October 11, 2012 8:19 PM
  • This is a paragraph designed to word wrap onto more than one line. It is hoped that after a few sentences, this will take up more than one line. Then we can see how the space between sentences of a paragraph compares to the space between paragraphs.

    This is the first sentence of the second paragraph. Before I click "Submit" there appears to be a blank line between the paragraphs. We will see if this is maintained after I click "Submit".

    This is the thir paragraph.


    Richard Mueller - MVP Directory Services

    Saturday, October 13, 2012 10:27 PM