Why won't my ntdsutil command execute successfully from my Posh script?

Hello,
The purpose of the script is to delete snapshot versions using ntdsutil.
The script starts and executes a  '$SnapShotList = ntdsutil snapshot "list all" quit quit' to list current snapshots as indicated below.  I then parse through these and based on age I construct and submit a ntdsutil command as follows,
cmd /c ntdsutil snapshot "Delete$SnapShotNumber" quit quit
but I always get a 'Invalid Snapshot Index 1.' $SnapShotNumber is a string variable with the number of the snapshot I want to delete.  I tried removing the 'cmd /c', but same results.  This command works find from the Command Prompt.  Any
suggestions?
C:\windows\system32\ntdsutil.exe: snapshot
snapshot: list all
1: 2014/01/26:13:25 {6f58b7ee-2fc8-468b-a17d-55e7634c8259}
2: C: {39200929-b206-4055-9333-ef6c7a096250}
3: 2014/01/26:13:50 {d580d82e-ba0f-466b-ac77-fcc4f6ed4532}
4: C: {5ccd0e27-cb4a-4002-8a5b-9b582fc2e694}
5: 2014/01/26:15:06 {350c7788-114d-440c-afab-5a59def997a5}
6: C: {c01fd8d1-d006-4b8e-9fbc-8a65c2abe37b}
7: 2014/01/26:15:11 {7b5f2558-a928-4ada-9c37-239c99ece330}
8: C: {f64fc410-a4e4-4eba-8c99-2d402efc21f1}
9: 2014/01/26:16:19 {b32cd4e9-6d0c-4745-bc23-da20a7696b5e}
10: C: {337e0cb1-6e0d-4dd3-8425-b4797160ed20}
11: 2014/01/26:18:00 {82aa5be6-0cef-4e39-8016-99eb3af9058b}
12: C: {dca91ff4-a045-48b5-95b7-4544b692bbb3}
snapshot: quit
C:\windows\system32\ntdsutil.exe: quit
PS C:\windows\system32>
Thanks for your help! SdeDot

Hi,
I would like to suggest you post the whole code that you used, how did you set the $SnapShotNumber variable?
Regards,
Yan Li
Regards, Yan Li

Similar Messages

  • Why won't my TV programmes I purchased from my IPod sync onto my computer ?

    Why won't my TV programmes I purchased from my IPod sync onto my computer ?

    Are yu doing this:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    In iTunes 11 use Control+B to show the Menu bar then go to iTunes>File>Devices>Transfer Purchases

  • Why won't files open in Camera Raw from Bridge?

    I am trying to open files in Camera raw from Bridge but get the following message.
    "Bridge's parent application is not active."
    Both Bridge and CS5 are open and I have opened camera raw previously.
    Any suggestions.
    Cheers

    Ah this is just because I haven't fully updated my bridge yet, but the solution still works fine
    Date: Mon, 10 Oct 2011 13:25:37 -0600
    From: [email protected]
    To: [email protected]
    Subject: Why won't files open in Camera Raw from Bridge?
        Re: Why won't files open in Camera Raw from Bridge?
        created by Noel Carboni in Adobe Camera Raw - View the full discussion
    The video shows replacing a current DLL file with one from last year - the key issue being that the files found in the Bridge and Photoshop folders are DIFFERENT. Why would this be?  I checked a PS CS5.1 installation myself and the files are already the same. Is there an illegitimate copy of Photoshop being used or something, causing these files to differ? -Noel
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3963527#3963527
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3963527#3963527. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Camera Raw by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • What is error 150:30, and why won't CS4 work after moving it from old mac to new?

    What is error 150:30, and why won't CS4 work after moving it from old mac to new?

    Reinstall the software properly
    Mylenium

  • Why won't the audio book I purchased from itunes sync to my itouch?

    Why won't the audio book I purchases from itunes sync to my itouch?

    When I finish the sync and check the itouch, I can't find the books in the book section, though it appears in my library on the itunes website

  • Why won't elements 12 download raw files from Nikon D810?

    Why won't elements 12 download raw files from Nikon D810?  I got a message saying that the camera model is not supported by installed version of camera raw.  How do I fix it?

    mydogmaksim
    Photoshop Elements questions should be posted in the Adobe Photoshop Elements Forum. Somehow your thread got posted in the Adobe Premiere Elements Forum (video editing).
    You can re-post your thread in the Adobe Photoshop Elements Forum or wait for a moderator here to see your thread here and move it from here to there.
    My opinion on this....from the Photoshop Elements perspective...
    Nikon D810 is supported by Camera Raw 8.6 and higher (latest version of Camera Raw is 8.7)
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    At the same time, the Camera Raw version needs to be supported by the Photoshop Elements version.
    Photoshop Elements 12 appears to support Camera Raw up to 8.5 which does not support the Nikon D810.
    Camera Raw-compatible Adobe applications
    Solution...
    a. switch to Photoshop Elements 13 (comes with Camera Raw 8.6 and can be updated to 8.7).
    b. use the DNG Converter in Photoshop Elements 12
    ATR

  • Why won't they accept my serial number from the photoshop Elements box I just bought from Costco?

    Why won't they accept my serial number from the Photoshop Elements box I just bought from Costco?

    It may be a redemption code Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • Why won't some of my numbers spreadsheets from my iPad open with iCloud on my Mac (Yosemite)?

    Why won't some of my numbers spreadsheets from my iPad open with iCloud on my Mac (Yosemite)? When I look at the files in FiNader there's a grey bar next to the files that won't open.

    I am having the same problem. Created new spreadsheet on iPad with fresh iOS and Numbers installs (3/2015) and am unable to open this spreadsheet in iCloud in Safari on MacBook Air (all current). I get the following message:
    "Sorry, something went wrong.
    This spreadsheet can't be opened right now. Please try again later."
    Tried reopening on Mac from iCloud and resaving; still cannot open.
    Quick fix: Copying the spreadsheet content from the iPad spreadsheet to one created on the desktop recovers the ability to open it in iCloud in Safari.
    Thanks.

  • HT2417 Iphone model MC608LL.  Why won't it switch back to ringer from vibrate?

    Have 3G Iphone model MC608LL.  Why won't it switch back to ringer from vibrate?  Local repair shop said it was a software issue.  AT&T store said to back it up and update OS version.  Did all that.  The switch still won't take it off vibrate.

    - How did you delete it?  If you used Settings>General>Reset>Erase all Content and Settings without the iPod being charged you could have completely drained the battery.
    - After charging for at least half an hour try resetting the iPod:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Next, after the charging above, place the iPod in recovery mode and try to restore it via iTunes.  For recovery mode see:
    iPhone and iPod touch: Unable to update or restore

  • TS4062 Why won't my outlook calendar show data from my iPhone calendar after synching.

    Why won't my outlook calendar show data from my iPhone calendar after synching?

    I have the same problem - between the issue I had with restoring after the upgrade (Error -48), the duplicate entries I now get between my Outlook appointments and iCloud, and the inability to have Events added from the iPhone sync to Outlook, I'm surprised there hasn't been more outcry about 5.0x! Not to mention the battery problem, which I HOPE they ironed out.

  • Why won't songs add to my library from my flash drive?

    why won't songs add to my library from my flash drive?

    Make sure you have Sync Podcasts selected under the Podcasts menu then click the Sync button bottom right side of the window.
    Where it says: Automatically include:   all unplayed / all new / all recent and to the right select all podcasts or selected.
    Then tap iPod in the Dock > More > Podcasts

  • How to trap Duplicate command executed successfully.

    Hi,
    I have attaced observer to document for listening protocol IID_ICOMMANDMGR for trapping command kDuplicateCmdBoss. When I perform duplicate from "Option + Drag" the kDuplicateCmdBoss command gets executed before duplicating the item.
    The documentation for kDuplicateCmdBoss says that "The page items in the command's item list are duplicated if the command is prepared successfully." But How to find the command is executed successfully.
    Please help me.
    Thanks,
    Praveen

    For tracing drag action on layout, I have used following
    Class
            kBscDNDLayoutSourceHelperBoss,
            kInvalidClass,
                IID_IK2SERVICEPROVIDER,        kLayoutDDSrcHelperProviderImpl,
                IID_IDRAGDROPSOURCECONTENTHELPER,    kBscDNDLayoutDragSourceImpl,
    and the implementation class BscDNDLayoutDragSource id derived from CDragDropSource, In which currently I am overriding only WillDrag method as below.
    bool16 BscDNDLayoutDragSource::WillDrag(IEvent* e) const
        CAlert::InformationAlert("drag started");
        return kFalse;
    The alert is displayed but after that InDesign got crashed. Thus I checked it by returning false still InDesign get crash.
    Any hint might solve my problem .
    Please help.
    Regards,
    Praveen

  • Why won't my new Macbook Pro boot from old cloned macbook 10.6

    Just got my new Macbook Pro 10.8 up and running and used Migration Assistant to bring over all my files from an old Macbook 10.6 which has a faltering GPU. One of the audio apps I brought over needs a new authorization / unlock, and so, while I wait for that I thought I'd start the new MBP from a cloned copy of the the Macbook which had the audio app that I need (I'm in the middle of editing and have a deadline). To my surprise the MBP won't boot from the cloned Macbook.
    Any ideas as to why this is?
    Thanks all.

    The 10.6 clone doesn't have hardware drivers for the newer Mac model.
    You can also use Migration Assistant against the clone.
    Most commonly used backup methods
    Combine two+ Users Accounts on the same machine
    It is possible to run Snow Leopard Server in a virtual machine program called Parallels and thus be able to run your previous software including PPC programs.
    Snow Leopard partition on 10.7+ Mac

  • Why won't calendar invitations send via email from iCloud?

    i have tried multiple times to send out meeting invitations using my iPad, iPhone 4 and iCloud.com.  No success.  Is there a bug?  When do they expect this functionality to be up and running?  Or am i doing something wrong?  Also, when i accept an invitation via my mobile devices, it won't send a notification to the meeting organizer.  HELP!!! 

    You might want to go to My Apple ID to manage the ID, then check to be sure the email address is spelled correctly.  (I had this problem my self once and discovered that I had misspelled it.)

  • Why won't some photos copy to iPod from iPhoto?

    I created a folder of favorite pictures in my iPhoto specifically to be set to music in slideshow on my iPod. But of the 65 photos in the original iPhoto folder, only 52 appear on my iPod. (I've tried syncing the entire folder several times--with the same result.) What could be the reason that iPod won't accept so many of the iPhoto pictures?

    For photos try deleting the photo cache from your computer and then re-try the photo sync and see if they then copy over - the location of the cache, and how to delete it, is on this page http://support.apple.com/kb/TS1314
    Not all video formats that work in iTunes are compatible with the iPad - the supported formats are (from http://www.apple.com/ipad/specs/) :
    Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    Have you tried Advanced > Create iPad Version and then sync those versions to the iPad
    The iPad's supported audio formats are :
    HE-AAC (V1 and V2), AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV

Maybe you are looking for