現在オフラインです。再接続するためにインターネットの接続を待っています

Dltpurge.vbs のテキスト版のサポート技術情報記事 Q312403

重要: このサポート技術情報 (以下「KB」) は、翻訳者による翻訳の代わりに、マイクロソフト機械翻訳システムによって翻訳されたものです。マイクロソフトは、お客様に、マイクロソフトが提供している全ての KB を日本語でご利用いただけるように、翻訳者による翻訳 KB に加え機械翻訳 KB も提供しています。しかしながら、機械翻訳の品質は翻訳者による翻訳ほど十分ではありません。誤訳や、文法、言葉使い、その他、たとえば日本語を母国語としない方が日本語を話すときに間違えるようなミスを含んでいる可能性があります。マイクロソフトは、機械翻訳の品質、及び KB の内容の誤訳やお客様が KB を利用されたことによって生じた直接または間接的な問題や損害については、いかなる責任も負わないものとします。マイクロソフトは、機械翻訳システムの改善を継続的に行っています。

英語版 KB:315229
概要
分散リンク トラッキング サービスでの使用します。作成およびリンク先のファイル間での移動を追跡します。NTFS でフォーマットされたボリュームは、サーバー。この資料でには、テキスト版にはが含まれています、Dltpurge.vbs スクリプト、次マイクロソフト サポート技術に記載されています。記事:
312403 Windows 2000 ベースのドメイン コント ローラー上での追跡リンクを配布します。
詳細
このスクリプトを使用するには。
  1. すべての<start copy="" here="">の間のテキストをコピーします。タグとは、<end copy="" here="">この記事では、タグを付けるし、そのテキストを貼り付けるASCII テキスト エディター ファイル (たとえば、メモ帳ファイル) にします</end></start>。
  2. 「Dltpurge.vbs」としてファイルを保存します。
  3. 次のように記載されている手順を完了します。サポート技術情報の記事:
    312403 Windows 2000 ベースのドメイン コント ローラー上での追跡リンクを配布します。
<start copy="" here=""><b00></b00></start>
'=============================================================================='=============================================================================='' Copyright (C) 2001 by Microsoft Corporation.  All rights reserved.'' This script deletes all Active Directory objects used by the' Distributed Link Tracking Server service.'' It is assumed that the DLT Server service has been disabled,' and you wish to recover the DIT space these objects occupy.'' Usage:   cscript DltPurge.vbs <options>' Options: -s ServerName'          -d distinguishedname dc=mydomain,dc=mycompany,dc=com'          -b BatchSize  BatchDelayMinutes'          -t (optional test mode)'' The objects are deleted in batches - BatchSize objects are deleted,' then there is a BatchDelayMinutes delay before the next batch.''=============================================================================='==============================================================================Option Explicit'' Globals, also local to main.'Dim oProviderDim oTargetDim sServerDim sDomainDim bTestDim BatchSizeDim BatchDelayMinutes'' Set defaults'BatchSize = 1000BatchDelayMinutes = 15bTest = False'==============================================================================''   ProcessArgs''   Parse the command-line arguments.  Results are set in global variables'   (oProvider, oTarget, sServer, sDomain, BatchSize, and BatchDelayMinutes).''==============================================================================public function ProcessArgs    Dim iCount    Dim oArgs    on error resume next    '    ' Get the command-line arguments    '        Set oArgs = WScript.Arguments    if oArgs.Count > 0 then        '        ' We have command-line arguments.  Loop through them.        '        iCount = 0        ProcessArgs = 0        do while iCount < oArgs.Count            select case oArgs.Item(iCount)                '                ' Server name argument                '                                case "-s"                    if( iCount + 1 >= oArgs.Count ) then                        Syntax                        ProcessArgs = -1                        exit do                    end if                    sServer = oArgs.Item(iCount+1)                    if Len(sServer) > 0 then sServer = sServer & "/"                    iCount = iCount + 2                '                ' Enable testing option                '                                case "-t"                    iCount = iCount + 1                    bTest  = True                '                ' Domain name option                '                                case "-d"                    if( iCount + 1 >= oArgs.Count ) then                        Syntax                        ProcessArgs = -1                        Exit Do                    end if                    sDomain = oArgs.Item(iCount+1)                    iCount = iCount + 2                '                ' Batching option (batch size, batch delay)                '                case "-b"                    if( iCount + 2 >= oArgs.Count ) then                        Syntax                        ProcessArgs = -1                        exit do                    end if                    Err.Clear                                        BatchSize = CInt( oArgs.Item(iCount+1) )                    BatchDelayMinutes = CInt( oArgs.Item(iCount+2) )                                        if( Err.Number <> 0 ) then                         wscript.echo "Invalid value for -b argument" & vbCrLf                        Syntax                        ProcessArgs = -1                        exit do                    end if                                        iCount = iCount + 3                '                ' Help option                '                                case "-?"                    Syntax                    ProcessArgs = -1                    exit do                '                ' Invalid argument                '                                case else                                    ' Display the syntax and return an error                    wscript.echo "Unknown argument: " & oArgs.Item(iCount) & vbCrLf                    Syntax                    ProcessArgs = -1                    Exit Do                                end select      loop    else            '        ' There were no command-line arguments, display the syntax        ' and return an error.        '        Syntax        ProcessArgs = -1    end if    Set oArgs = Nothingend function ' ProcessArgs'==============================================================================''   Syntax''   Show the command-line syntax''==============================================================================public function Syntax    wscript.echo    vbCrLf & _                    "Purpose:   Delete Active Directory objects from Distributed Link Tracking" & vbCrLf & _                    "           Server service (Assumes that DLT Server has been disabled" & vbCrLf & _                    "           on all DCs)" & vbCrLf & _                    vbCrLf & _                    "Usage:     " & wscript.scriptname & " <arguments>" & vbCrLf & _                    vbCrLf & _                    "Arguments: -s Server" & vbCrLf & _                    "           -d FullyQualifiedDomain" & vbCrLf & _                    "           -b BatchSize BatchDelayMinutes (default to 1000 and 15)" & vbCrLf & _                    "           -t (optional test mode, nothing is deleted)" & vbCrLf & _                    vbCrLf & _                    "Note:      Objects are deleted in batches, with a delay between each" & vbCrLf & _                    "           batch.  The size of the batch defaults to 1000 objects, and" & vbCrLf & _                    "           the length of the delay defaults to 15 minutes.  But these" & vbCrLf & _                    "           values can be overridden using the -b option." & vbCrLf & _                    vbCrLf & _                    "Example:   " & wscript.scriptname & "  -s  myserver  -d distinguishedname dc=mydomain,dc=mycompany,dc=com "end function    ' Syntax'==============================================================================''   PurgeContainer''   Delete all objects of the specified class in the specified container.'   This subroutine is called once for the volume table and once for'   the object move table.''==============================================================================sub PurgeContainer(ByRef oParent, ByVal strClass)    dim oChild    dim iBatch    dim iTotal    On Error Resume Next    iTotal = 0    iBatch = 0    ' Loop through the children of this container    For Each oChild in oParent        '         ' Is this a DLT object?        '                if oChild.Class = strClass Then            '            ' Yes, this is a DLT object, it may be deleted            '                        iTotal = iTotal + 1            iBatch = iBatch + 1            '            ' Delete the object            '                        if bTest then                wscript.echo "Object that would be deleted: " & oChild.adspath            else                oParent.Delete oChild.Class, oChild.Name            end if            '            ' If this is the end of a batch, delay to let replication            ' catch up.            '                        if iBatch = BatchSize then                            iBatch = 0                                wscript.stdout.writeline "" ' ignored by wscript                wscript.echo "Deleted " & BatchSize & " objects"                wscript.echo "Pausing to allow processing (will restart at " & DateAdd("n", BatchDelayMinutes, Time) & ")"                                wscript.sleep BatchDelayMinutes * 60 * 1000                wscript.echo "Continuing ..."                            end if                    else                    ' oChild.Class didn't match strClass            wscript.echo "Ignoring unexpected class: " & oChild.Class                    end if        oChild = NULL    Next    wscript.echo "Deleted a total of " & iTotal & " objects"end sub ' PurgeContainer'=============================================================================='' Main''==============================================================================if (ProcessArgs=-1) then wscript.quiton error resume next'' Explain what's about to happen'wscript.stdout.writeline "" ' ignored by wscriptwscript.echo "This script will purge all objects from the Active Directory" & vbCrLf & _             "used by the Distributed Link Tracking Server service (trksvr)." & vbCrLf & _             "It is assumed that this service has already been disabled on" & vbCrLf & _             "all DCs in the domain."'' When running in cscript, pause to give an opportunity to break out' (These 3 lines are for cscript and ignored by wscript.)'wscript.stdout.writeline ""wscript.stdout.writeline "Press Enter to continue ..."wscript.stdin.readline'' Get an ADSI object'Set oProvider = GetObject("LDAP:")'' Purge the System/FileLinks/ObjectMoveTable'wscript.stdout.writeline "" ' ignored by wscriptwscript.echo "Purging ObjectMoveTable"Set oTarget = oProvider.OpenDSObject( "LDAP://" & sServer  & "cn=ObjectMoveTable,CN=FileLinks,CN=System," & sDomain ,_                                      vbNullString, vbNullString, _                                      1) ' ADS_SECURE_AUTHENTICATIONcall PurgeContainer( oTarget, "linkTrackOMTEntry" )oTarget = NULL'' Purge the System/FileLinks/VolumeTable'wscript.stdout.writeline "" ' ignored by wscriptwscript.echo "Purging VolumeTable"Set oTarget = oProvider.OpenDSObject("LDAP://" & sServer  & "cn=VolumeTable,CN=FileLinks,CN=System," & sDomain  ,_                                     vbNullString, vbNullString, _                                     1) ' ADS_SECURE_AUTHENTICATIONcall PurgeContainer( oTarget, "linkTrackVolEntry" )oTarget = NULLoProvider = NULL				
<end copy="" here=""><b00></b00></end>

警告: この記事は自動翻訳されています

プロパティ

文書番号:315229 - 最終更新日: 07/25/2011 03:17:00 - リビジョン: 8.0

  • kbinfo kbenv kbmt KB315229 KbMtja
フィードバック
eElement('meta');m.name='ms.dqp0';m.content='true';document.getElementsByTagName('head')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?">