delete partition wit powershell v2.0

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 2 years, 4 months ago.

  • Author
    Posts
  • #17718
    Profile photo of open qwerty
    open qwerty
    Participant

    I can not delete a partition with powershell 2.0.
    I get the following error with the command:
    remove-partition
    Term 'remove-partition' is not recognized as the name of a cmdlet, function, operable program, or script file.
    Thank you

  • #17720
    Profile photo of Adnan Rashid
    Adnan Rashid
    Participant

    that might be, because it doesn't seem to exist

    you could go gcm *partition* to see what is available matching the word partition.

    a quick google search shows up clear-disk – is that closer to what you are after?

  • #17721
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Remove-Partition is one of the many cmdlets that are only available in Windows 8 and later. It may be possible to do this with WMI (though I'd have to double check that; much of WMI is read-only), but you can definitely leverage the old DISKPART command-line utility, if nothing else. See [url]http://technet.microsoft.com/en-us/library/cc738489(v=ws.10).aspx[/url]

You must be logged in to reply to this topic.