Get-PhysicalDisk -ObjectID

Welcome Forums General PowerShell Q&A Get-PhysicalDisk -ObjectID

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 9 months ago.

  • Author
  • #71743

    Points: 1
    Rank: Member

    Hi everyone,
    I am a PowerShell novice so I'll get right too it.

    Why does the command below not work?

    Get-PhysicalDisk -ObjectId {1}\\COMPUTERNAME\root/Microsoft/Windows/Storage/Providers_v2\SPACES_PhysicalDisk.ObjectId="{2ab8a2cc-2146-11e7-8363-806e6f6e6963}:PD:{058a823b-0c1e-38ae-7321-c3edf5ed1a2b}"

    If I put it in double or single quotes it does not work.

    Thank you for your time!

  • #71759

    Points: 1
    Rank: Member

    It's because -ObjectId is expecting a string or an array of strings as input, and you are not supplying a string value.


    Get-PhysicalDisk -ObjectId '{1}\\COMPUTERNAME\root/Microsoft/Windows/Storage/Providers_v2\SPACES_PhysicalDisk.ObjectId="{2ab8a2cc-2146-11e7-8363-806e6f6e6963}:PD:{058a823b-0c1e-38ae-7321-c3edf5ed1a2b}"'

The topic ‘Get-PhysicalDisk -ObjectID’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort