Can anyone help me getting this script "sidmap.wsf" its part of the resource kit of OCS.

Hi,

Can anyone help me getting this script "sidmap.wsf" its part of the resource kit of OCS.
I am not able to extract it because of the processor mismatch.

OCS resource kit file

REgards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BusbarSolutions ArchitectCommented:
if you want only the wsf file then below its content, if you want the hall bunch of script send to me your email so i can send it to you:
---------------
<?xml version="1.0" ?>
<package>
    <job id="Main" prompt="no">
    <?job debug="true" error="true" ?>
        <runtime>
            <description>
This script copies the SID value from the AD attribute, msExchMasterAccountSid,
to the attribute, msRTCSIP-OriginatorSid, for every disabled user in the forest
that is SIP enabled.
            </description>
            <named
                name="OU"
                helpstring="The Active Directory DN of the organizational unit to search under"
                many="false"
                type="string"
                required="false"
            />
            <named
                name="query"
                helpstring="Generates a list of disabled users that are mailbox and SIP enabled and associated with an external account"
                type="simple"
                required="false"
            />
            <named
                name="logfile"
                helpstring="Text file used to log the output."
                type="string"
                required="false"
            />
        </runtime>
<script id="VBScript_Block" language="VBScript">
    <![CDATA[
' Initialize variables
const ForWriting = 2
intCount = 0
bQuery = False

On Error Resume Next 'Force continuation on errors when initializing globals

' Retrieve command-line arguments

' Check whether an OU is provided.
if WScript.Arguments.Named.Exists("OU") then
        strNamingContext = "LDAP://" & WScript.Arguments.Named("OU")
      else
          Set objRootDSE = GetObject("LDAP://rootDSE")
            strNamingContext = "LDAP://" & objRootDSE.Get("defaultNamingContext")
end if

' Check whether the user only wants to query the AD.
if WScript.Arguments.Named.Exists("query") then
    ' Query only all disabled users that are mailbox and SIP enabled.
    ' set.
    bQuery = True
end if

' Check whether logging to a file is required.
if WScript.Arguments.Named.Exists("logfile") then
    strLogFile = WScript.Arguments.Named("logfile")
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objLogFile = fso.OpenTextFile(strLogFile, ForWriting, True)
    objLogFile.WriteLine("List of disabled users associated with an external account and SIP enabled:")
end if

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open
 
' Create connection to AD.
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

' Define AD query.
' Search for disabled user accounts that are SIP enabled and mailbox enabled.
objCommand.CommandText = _
    "<" & strNamingContext & ">;" & _
        "(&(objectCategory=person)(objectClass=user)(msRTCSIP-UserEnabled=TRUE)(msExchMasterAccountSid=*)(userAccountControl:1.2.840.113556.1.4.803:=2));" & _
            "ADsPath,cn,msRTCSIP-PrimaryUserAddress,msExchMasterAccountSid,msRTCSIP-OriginatorSid;subtree"

' Disable caching to reduce memory consumption for very large result sets.
objCommand.Properties("Cache Results") = FALSE
' Define the maximum page size.
objCommand.Properties("Page Size") = 1000
 
' Execute query.
Set objRecordSet = objCommand.Execute
If Err.Number <> 0 Then
    WScript.Echo("Failed to query Active Directory " & strNamingContext)
    WScript.Quit(Err.Number)
end if
 
While Not objRecordset.EOF
    intCount = intCount + 1
    if IsObject(objLogFile) then
       objLogFile.WriteLine(objRecordset.Fields("cn").Value)
    else
        WScript.Echo(objRecordset.Fields("cn").Value)
    end if
   
    if bQuery = False then
        ' Set the msRTCSIP-OriginatorSid attribute.
        Set objContact = GetObject(objRecordset.Fields("ADsPath"))
        strExchSid = objRecordset.Fields("msExchMasterAccountSid").Value

        objContact.Put "msRTCSIP-OriginatorSid", strExchSid
        objContact.SetInfo

        If Err.Number <> 0 Then
            if IsObject(objLogFile) then
               objLogFile.WriteLine("Failed to set msRTCSIP-OriginatorSid attribute " & _
                    Err.Number)
            else
                WScript.Echo("Failed to set msRTCSIP-OriginatorSid attribute " & _
                    Err.Number)
            end if
        end if
    end if

    WScript.Echo()
    objRecordSet.MoveNext
Wend
 
WScript.Echo intCount & " disabled users."

if IsObject(objLogFile) then
    objLogFile.WriteLine(vbNewLine & intCount & " disabled users.")
    objLogFile.Close
end if
objConnection.Close
    ]]>
</script>
    </job>
</package>
--------------------
copy it to a file and rename it to sidmap.wsf
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bsharathAuthor Commented:
Thanks
Any idea what i need to change in the script
0
BusbarSolutions ArchitectCommented:
0
bsharathAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.