From 42e45d280b8825e85b9313d6d572df7661c16f5a Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Tue, 25 Mar 2025 17:11:31 -0700 Subject: [PATCH 01/14] Filled in after two copilot prompts. --- .../Add-VMDirectVirtualDisk.md | 62 +++++++++++++++---- .../Get-VMDirectVirtualDisk.md | 57 +++++++++++++---- .../Remove-VMDirectVirtualDisk.md | 52 ++++++++++++---- .../VMDirectStorage/VMDirectStorage.md | 17 +++-- 4 files changed, 146 insertions(+), 42 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 602ee31260..712beda6c0 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -1,20 +1,23 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 02/21/2024 +ms.date: 03/25/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/add-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Add-VMDirectVirtualDisk +ai-usage: ai-generated --- # Add-VMDirectVirtualDisk ## SYNOPSIS -{{ Fill in the Synopsis }} + +Attaches a Storage Spaces Direct virtual disk to a virtual machine. ## SYNTAX ### ByVMName + ``` Add-VMDirectVirtualDisk [-VMName] [-CimSession ] [[-ControllerType] ] [[-ControllerNumber] ] [-ControllerLocation ] [-VirtualDiskUniqueId ] @@ -22,6 +25,7 @@ Add-VMDirectVirtualDisk [-VMName] [-CimSession ] [[-Con ``` ### ByVM + ``` Add-VMDirectVirtualDisk [-VM] [[-ControllerType] ] [[-ControllerNumber] ] [-ControllerLocation ] [-VirtualDiskUniqueId ] @@ -29,27 +33,38 @@ Add-VMDirectVirtualDisk [-VM] [[-ControllerType] [-ControllerLocation ] [-VirtualDiskUniqueId ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} + +The **Add-VMDirectVirtualDisk** cmdlet attaches a Storage Spaces Direct virtual disk to a virtual machine. This enables high-performance storage configurations by directly connecting the virtual disk to the VM. ## EXAMPLES ### Example 1 + ```powershell -PS C:\> {{ Add example code here }} +$parameters = @{ + VMName = "VM1" + ControllerType = "SCSI" + ControllerNumber = 0 + ControllerLocation = 1 + VirtualDiskUniqueId = "12345-67890" +} +Add-VMDirectVirtualDisk @parameters ``` -{{ Add example description here }} +This command attaches the virtual disk with the unique ID "12345-67890" to the virtual machine named "VM1" at controller 0, location 1. ## PARAMETERS ### -CimSession -{{ Fill CimSession Description }} + +Specifies the CIM session to use for the operation. This is useful for managing remote systems. ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] @@ -64,7 +79,8 @@ Accept wildcard characters: False ``` ### -ControllerLocation -{{ Fill ControllerLocation Description }} + +Specifies the location on the controller where the virtual disk will be attached. ```yaml Type: System.Int32 @@ -79,7 +95,8 @@ Accept wildcard characters: False ``` ### -ControllerNumber -{{ Fill ControllerNumber Description }} + +Specifies the number of the controller where the virtual disk will be attached. ```yaml Type: System.Int32 @@ -94,7 +111,8 @@ Accept wildcard characters: False ``` ### -ControllerType -{{ Fill ControllerType Description }} + +Specifies the type of controller. Only SCSI is supported. ```yaml Type: ControllerType @@ -110,7 +128,8 @@ Accept wildcard characters: False ``` ### -VirtualDiskUniqueId -{{ Fill VirtualDiskUniqueId Description }} + +Specifies the unique ID of the virtual disk to attach. ```yaml Type: System.String @@ -125,7 +144,8 @@ Accept wildcard characters: False ``` ### -VM -{{ Fill VM Description }} + +Specifies the virtual machine object to which the virtual disk will be attached. ```yaml Type: Microsoft.HyperV.PowerShell.VirtualMachine[] @@ -140,7 +160,8 @@ Accept wildcard characters: False ``` ### -VMDriveController -{{ Fill VMDriveController Description }} + +Specifies the drive controller object to which the virtual disk will be attached. ```yaml Type: Microsoft.HyperV.PowerShell.VMDriveController @@ -155,7 +176,8 @@ Accept wildcard characters: False ``` ### -VMName -{{ Fill VMName Description }} + +Specifies the name of the virtual machine to which the virtual disk will be attached. ```yaml Type: System.String[] @@ -170,19 +192,33 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ### System.String[] +Specifies the names of virtual machines. + ### Microsoft.HyperV.PowerShell.VirtualMachine[] +Specifies virtual machine objects. + ### Microsoft.HyperV.PowerShell.VMDriveController +Specifies drive controller objects. + ## OUTPUTS ### System.Object + +Returns an object representing the result of the operation. + ## NOTES ## RELATED LINKS + +[Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) + +[Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 118981f4ba..845967e3f2 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -1,53 +1,64 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 02/21/2024 +ms.date: 03/25/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/get-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Get-VMDirectVirtualDisk +ai-usage: ai-generated --- # Get-VMDirectVirtualDisk ## SYNOPSIS -{{ Fill in the Synopsis }} + +Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. ## SYNTAX ### ByVMName + ``` Get-VMDirectVirtualDisk [-VMName] [-CimSession ] [[-ControllerType] ] [[-ControllerNumber] ] [-ControllerLocation ] [] ``` ### ByVM + ``` Get-VMDirectVirtualDisk [-VM] [[-ControllerType] ] [[-ControllerNumber] ] [-ControllerLocation ] [] ``` ### ByVMDriveController + ``` Get-VMDirectVirtualDisk [-VMDriveController] [-ControllerLocation ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} + +The **Get-VMDirectVirtualDisk** cmdlet retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. This includes details such as the disk's unique ID, friendly name, and its location on the controller. ## EXAMPLES ### Example 1 + ```powershell -PS C:\> {{ Add example code here }} +$parameters = @{ + VMName = "VM1" +} +Get-VMDirectVirtualDisk @parameters ``` -{{ Add example description here }} +This command retrieves all virtual disks attached to the virtual machine named "VM1". ## PARAMETERS ### -CimSession -{{ Fill CimSession Description }} + +Specifies the CIM session to use for the operation. This is useful for managing remote systems. ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] @@ -62,7 +73,8 @@ Accept wildcard characters: False ``` ### -ControllerLocation -{{ Fill ControllerLocation Description }} + +Specifies the location of the virtual disk on the controller. ```yaml Type: System.Int32 @@ -77,7 +89,8 @@ Accept wildcard characters: False ``` ### -ControllerNumber -{{ Fill ControllerNumber Description }} + +Specifies the number of the controller where the virtual disk is attached. ```yaml Type: System.Int32 @@ -92,7 +105,8 @@ Accept wildcard characters: False ``` ### -ControllerType -{{ Fill ControllerType Description }} + +Specifies the type of controller. Only SCSI is supported. ```yaml Type: ControllerType @@ -108,7 +122,8 @@ Accept wildcard characters: False ``` ### -VM -{{ Fill VM Description }} + +Specifies the virtual machine object for which to retrieve virtual disk information. ```yaml Type: Microsoft.HyperV.PowerShell.VirtualMachine[] @@ -123,7 +138,8 @@ Accept wildcard characters: False ``` ### -VMDriveController -{{ Fill VMDriveController Description }} + +Specifies the drive controller object for which to retrieve virtual disk information. ```yaml Type: Microsoft.HyperV.PowerShell.VMDriveController[] @@ -138,7 +154,8 @@ Accept wildcard characters: False ``` ### -VMName -{{ Fill VMName Description }} + +Specifies the name of the virtual machine for which to retrieve virtual disk information. ```yaml Type: System.String[] @@ -153,19 +170,33 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ### System.String[] +Specifies the names of virtual machines. + ### Microsoft.HyperV.PowerShell.VirtualMachine[] +Specifies virtual machine objects. + ### Microsoft.HyperV.PowerShell.VMDriveController[] +Specifies drive controller objects. + ## OUTPUTS -### System.Object +### VMDirectVirtualDisk + +Returns objects representing the virtual disks attached to the specified virtual machine. + ## NOTES ## RELATED LINKS + +[Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) + +[Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 2d1b794237..5de3b26197 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -1,46 +1,59 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 02/21/2024 +ms.date: 03/25/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/remove-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Remove-VMDirectVirtualDisk +ai-usage: ai-generated --- # Remove-VMDirectVirtualDisk ## SYNOPSIS -{{ Fill in the Synopsis }} + +Detaches a Storage Spaces Direct virtual disk from a virtual machine. ## SYNTAX ### ByVMName + ``` Remove-VMDirectVirtualDisk [-VMName] [-CimSession ] [-ControllerType] [-ControllerNumber] [-ControllerLocation] [] ``` ### ByVirtualDisk + ``` Remove-VMDirectVirtualDisk [-VirtualDisk] [] ``` ## DESCRIPTION -{{ Fill in the Description }} + +The **Remove-VMDirectVirtualDisk** cmdlet detaches a Storage Spaces Direct virtual disk from a virtual machine. This operation ensures that the virtual disk is no longer accessible by the VM. ## EXAMPLES ### Example 1 + ```powershell -PS C:\> {{ Add example code here }} +$parameters = @{ + VMName = "VM1" + ControllerType = "SCSI" + ControllerNumber = 0 + ControllerLocation = 1 +} +Remove-VMDirectVirtualDisk @parameters ``` -{{ Add example description here }} +This command detaches the virtual disk located at controller 0, location 1, from the virtual machine named "VM1". ## PARAMETERS ### -CimSession -{{ Fill CimSession Description }} + +Specifies the CIM session to use for the operation. This is useful for managing remote systems. ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] @@ -55,7 +68,8 @@ Accept wildcard characters: False ``` ### -ControllerLocation -{{ Fill ControllerLocation Description }} + +Specifies the location of the virtual disk on the controller. ```yaml Type: System.Int32 @@ -70,7 +84,8 @@ Accept wildcard characters: False ``` ### -ControllerNumber -{{ Fill ControllerNumber Description }} + +Specifies the number of the controller where the virtual disk is attached. ```yaml Type: System.Int32 @@ -85,7 +100,8 @@ Accept wildcard characters: False ``` ### -ControllerType -{{ Fill ControllerType Description }} + +Specifies the type of controller. Only SCSI is supported. ```yaml Type: ControllerType @@ -101,7 +117,8 @@ Accept wildcard characters: False ``` ### -VirtualDisk -{{ Fill VirtualDisk Description }} + +Specifies the virtual disk object to detach. ```yaml Type: VMDirectVirtualDisk[] @@ -116,7 +133,8 @@ Accept wildcard characters: False ``` ### -VMName -{{ Fill VMName Description }} + +Specifies the name of the virtual machine from which the virtual disk will be detached. ```yaml Type: System.String @@ -131,17 +149,29 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ### System.String +Specifies the name of the virtual machine. + ### VMDirectVirtualDisk[] +Specifies the virtual disk objects to be detached. + ## OUTPUTS ### System.Object + +Returns an object representing the result of the operation. + ## NOTES ## RELATED LINKS + +[Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) + +[Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 36b3efa9cb..952e549e96 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -4,21 +4,28 @@ Help Version: 5.1.0.2025 Locale: en-US Module Guid: 62a0b63f-2a15-415f-919a-a48e87f830cc Module Name: VMDirectStorage -ms.date: 02/21/2024 +ms.date: 03/25/2025 title: VMDirectStorage module +ai-usage: ai-generated --- # VMDirectStorage Module + ## Description -{{ Fill in the Description }} + +The **VMDirectStorage** module provides cmdlets to manage the direct attachment of Storage Spaces Direct virtual disks to virtual machines (VMs). This allows for high-performance storage configurations by bypassing the host file system. ## VMDirectStorage Cmdlets + ### [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Attaches a Storage Spaces Direct virtual disk to a virtual machine. ### [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. ### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Detaches a Storage Spaces Direct virtual disk from a virtual machine. From 4616f17debd2bf2a89d8c2c46d5c1418d5609705 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:10:28 -0700 Subject: [PATCH 02/14] Daily edits --- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 5 +---- docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 845967e3f2..11786ec7fe 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -46,10 +46,7 @@ The **Get-VMDirectVirtualDisk** cmdlet retrieves information about Storage Space ### Example 1 ```powershell -$parameters = @{ - VMName = "VM1" -} -Get-VMDirectVirtualDisk @parameters +Get-VMDirectVirtualDisk -VMName "VM1" ``` This command retrieves all virtual disks attached to the virtual machine named "VM1". diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 952e549e96..5d2131c4ba 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -13,7 +13,9 @@ ai-usage: ai-generated ## Description -The **VMDirectStorage** module provides cmdlets to manage the direct attachment of Storage Spaces Direct virtual disks to virtual machines (VMs). This allows for high-performance storage configurations by bypassing the host file system. +The **VMDirectStorage** module provides cmdlets to manage the direct attachment of Storage Spaces +Direct virtual disks to virtual machines (VMs). This allows for high-performance storage +configurations by bypassing the host file system. ## VMDirectStorage Cmdlets @@ -28,4 +30,3 @@ Retrieves information about Storage Spaces Direct virtual disks attached to a vi ### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) Detaches a Storage Spaces Direct virtual disk from a virtual machine. - From 0101bc7e0c4a858793f4246e30d7c6f7f68200ac Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 27 Mar 2025 18:25:34 -0700 Subject: [PATCH 03/14] Daily edits --- .../Add-VMDirectVirtualDisk.md | 36 +++++++++++-------- .../Get-VMDirectVirtualDisk.md | 33 +++++++++-------- .../Remove-VMDirectVirtualDisk.md | 35 ++++++++++-------- .../VMDirectStorage/VMDirectStorage.md | 21 +++++------ 4 files changed, 69 insertions(+), 56 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 712beda6c0..41678d92b4 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -1,7 +1,7 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 03/25/2025 +ms.date: 03/28/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/add-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Add-VMDirectVirtualDisk @@ -10,11 +10,11 @@ ai-usage: ai-generated # Add-VMDirectVirtualDisk -## SYNOPSIS +## Synopsis Attaches a Storage Spaces Direct virtual disk to a virtual machine. -## SYNTAX +## Syntax ### ByVMName @@ -39,11 +39,13 @@ Add-VMDirectVirtualDisk [-VMDriveController] [-ControllerLoc [-VirtualDiskUniqueId ] [] ``` -## DESCRIPTION +## Description -The **Add-VMDirectVirtualDisk** cmdlet attaches a Storage Spaces Direct virtual disk to a virtual machine. This enables high-performance storage configurations by directly connecting the virtual disk to the VM. +The **Add-VMDirectVirtualDisk** cmdlet attaches a Storage Spaces Direct virtual disk to a virtual +machine. This enables high-performance storage configurations by directly connecting the virtual +disk to the VM. -## EXAMPLES +## Examples ### Example 1 @@ -58,9 +60,10 @@ $parameters = @{ Add-VMDirectVirtualDisk @parameters ``` -This command attaches the virtual disk with the unique ID "12345-67890" to the virtual machine named "VM1" at controller 0, location 1. +This command attaches the virtual disk with the unique ID "12345-67890" to the virtual machine named +"VM1" at controller 0, location 1. -## PARAMETERS +## Parameters ### -CimSession @@ -193,9 +196,12 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). -## INPUTS +## Inputs ### System.String[] @@ -209,16 +215,16 @@ Specifies virtual machine objects. Specifies drive controller objects. -## OUTPUTS +## Outputs ### System.Object Returns an object representing the result of the operation. -## NOTES +## Notes -## RELATED LINKS +## Related links -[Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) +- [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) -[Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) +- [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 11786ec7fe..91687863f9 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -1,7 +1,7 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 03/25/2025 +ms.date: 03/28/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/get-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Get-VMDirectVirtualDisk @@ -10,11 +10,11 @@ ai-usage: ai-generated # Get-VMDirectVirtualDisk -## SYNOPSIS +## Synopsis Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. -## SYNTAX +## Syntax ### ByVMName @@ -37,11 +37,13 @@ Get-VMDirectVirtualDisk [-VMDriveController] [-ControllerL [] ``` -## DESCRIPTION +## Description -The **Get-VMDirectVirtualDisk** cmdlet retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. This includes details such as the disk's unique ID, friendly name, and its location on the controller. +The **Get-VMDirectVirtualDisk** cmdlet retrieves information about Storage Spaces Direct virtual +disks attached to a virtual machine. This includes details such as the disk's unique ID, friendly +name, and its location on the controller. -## EXAMPLES +## Examples ### Example 1 @@ -51,7 +53,7 @@ Get-VMDirectVirtualDisk -VMName "VM1" This command retrieves all virtual disks attached to the virtual machine named "VM1". -## PARAMETERS +## Parameters ### -CimSession @@ -168,9 +170,12 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). -## INPUTS +## Inputs ### System.String[] @@ -184,16 +189,16 @@ Specifies virtual machine objects. Specifies drive controller objects. -## OUTPUTS +## Outputs ### VMDirectVirtualDisk Returns objects representing the virtual disks attached to the specified virtual machine. -## NOTES +## Notes -## RELATED LINKS +## Related links -[Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) +- [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) -[Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) +- [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 5de3b26197..9022fed451 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -1,7 +1,7 @@ --- external help file: VMDirectStorage-help.xml Module Name: VMDirectStorage -ms.date: 03/25/2025 +ms.date: 03/28/2025 online version: https://learn.microsoft.com/powershell/module/vmdirectstorage/remove-vmdirectvirtualdisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Remove-VMDirectVirtualDisk @@ -10,11 +10,11 @@ ai-usage: ai-generated # Remove-VMDirectVirtualDisk -## SYNOPSIS +## Synopsis Detaches a Storage Spaces Direct virtual disk from a virtual machine. -## SYNTAX +## Syntax ### ByVMName @@ -29,11 +29,12 @@ Remove-VMDirectVirtualDisk [-VMName] [-CimSession ] [-Con Remove-VMDirectVirtualDisk [-VirtualDisk] [] ``` -## DESCRIPTION +## Description -The **Remove-VMDirectVirtualDisk** cmdlet detaches a Storage Spaces Direct virtual disk from a virtual machine. This operation ensures that the virtual disk is no longer accessible by the VM. +The **Remove-VMDirectVirtualDisk** cmdlet detaches a Storage Spaces Direct virtual disk from a +virtual machine. This operation ensures that the virtual disk is no longer accessible by the VM. -## EXAMPLES +## Examples ### Example 1 @@ -47,9 +48,10 @@ $parameters = @{ Remove-VMDirectVirtualDisk @parameters ``` -This command detaches the virtual disk located at controller 0, location 1, from the virtual machine named "VM1". +This command detaches the virtual disk located at controller 0, location 1, from the virtual machine +named "VM1". -## PARAMETERS +## Parameters ### -CimSession @@ -150,9 +152,12 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). -## INPUTS +## Inputs ### System.String @@ -162,16 +167,16 @@ Specifies the name of the virtual machine. Specifies the virtual disk objects to be detached. -## OUTPUTS +## Outputs ### System.Object Returns an object representing the result of the operation. -## NOTES +## Notes -## RELATED LINKS +## Related links -[Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) +- [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) -[Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) +- [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 5d2131c4ba..45583d9e89 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -4,12 +4,12 @@ Help Version: 5.1.0.2025 Locale: en-US Module Guid: 62a0b63f-2a15-415f-919a-a48e87f830cc Module Name: VMDirectStorage -ms.date: 03/25/2025 +ms.date: 03/28/2025 title: VMDirectStorage module ai-usage: ai-generated --- -# VMDirectStorage Module +# VMDirectStorage module ## Description @@ -17,16 +17,13 @@ The **VMDirectStorage** module provides cmdlets to manage the direct attachment Direct virtual disks to virtual machines (VMs). This allows for high-performance storage configurations by bypassing the host file system. -## VMDirectStorage Cmdlets +## VMDirectStorage cmdlets -### [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) +- [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md): Attaches a Storage Spaces Direct virtual + disk to a virtual machine. -Attaches a Storage Spaces Direct virtual disk to a virtual machine. +- [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md): Retrieves information about Storage Spaces + Direct virtual disks attached to a virtual machine. -### [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) - -Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. - -### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) - -Detaches a Storage Spaces Direct virtual disk from a virtual machine. +- [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md): Detaches a Storage Spaces Direct + virtual disk from a virtual machine. From a13046490f5acf0c52af4a3601bfc826c08eb106 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:00:34 -0700 Subject: [PATCH 04/14] Ready for review --- .../Add-VMDirectVirtualDisk.md | 21 ++++++++++++++---- .../Get-VMDirectVirtualDisk.md | 22 +++++++++++++++++-- .../Remove-VMDirectVirtualDisk.md | 15 ++++++++++--- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 41678d92b4..69047ec64a 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -47,7 +47,10 @@ disk to the VM. ## Examples -### Example 1 +### Example 1: Attach a virtual disk by specifying VM name and controller details + +This example attaches the virtual disk with the unique ID "111BBE22FD037E4EB87F366648FBF111" to the +virtual machine named "VM1" at controller 0, location 1. ```powershell $parameters = @{ @@ -55,13 +58,23 @@ $parameters = @{ ControllerType = "SCSI" ControllerNumber = 0 ControllerLocation = 1 - VirtualDiskUniqueId = "12345-67890" + VirtualDiskUniqueId = "111BBE22FD037E4EB87F366648FBF111" } + Add-VMDirectVirtualDisk @parameters ``` -This command attaches the virtual disk with the unique ID "12345-67890" to the virtual machine named -"VM1" at controller 0, location 1. +### Example 2: Attach a virtual disk by using a virtual disk object + +This example gets the Storage Spaces Direct virtual disk object named "Volume01" and the VM object +named "VM1", and then directly attaches the disk to the VM. + +```powershell +$virtualDisk = Get-VirtualDisk -Friendlyname "Volume01" +$vm = Get-VM -Name "VM1" + +Add-VMDirectVirtualDisk -VM $vm -VirtualDiskUniqueId $virtualDisk.UniqueId +``` ## Parameters diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 91687863f9..5c3b69b326 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -45,13 +45,31 @@ name, and its location on the controller. ## Examples -### Example 1 +### Example 1: Retrieve virtual disks by virtual machine name + +This command retrieves all virtual disks attached to the virtual machine named "VM1". ```powershell Get-VMDirectVirtualDisk -VMName "VM1" ``` -This command retrieves all virtual disks attached to the virtual machine named "VM1". +Here's example output: + +```Output +VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId +------ -------------- ---------------- ------------------ ----------------------- ------------------- +VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... +``` + +### Example 2: Retrieve virtual disks by virtual machine object + +This command gets the virtual machine object for "VM1" and then retrieves its directly attached +virtual disks. + +```powershell +$vm = Get-VM -Name "VM1" +Get-VMDirectVirtualDisk -VM $vm +``` ## Parameters diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 9022fed451..1bde370f12 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -36,7 +36,10 @@ virtual machine. This operation ensures that the virtual disk is no longer acces ## Examples -### Example 1 +### Example 1: Detach a virtual disk by specifying VM name and controller details + +This command detaches the virtual disk located at controller 0, location 1, from the virtual machine +named "VM1". ```powershell $parameters = @{ @@ -48,8 +51,14 @@ $parameters = @{ Remove-VMDirectVirtualDisk @parameters ``` -This command detaches the virtual disk located at controller 0, location 1, from the virtual machine -named "VM1". +### Example 2: Detach a virtual disk by using the virtual disk object + +This example gets the virtual disk object attached to "VM1" and then removes it. + +```powershell +$virtualDisk = Get-VMDirectVirtualDisk -VMName "VM1" +Remove-VMDirectVirtualDisk -VirtualDisk $virtualDisk +``` ## Parameters From bfa1a1a8a919315d51daf5e560fea9eb8bf9eefd Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:44:30 -0700 Subject: [PATCH 05/14] Fixed headings --- .../VMDirectStorage/VMDirectStorage.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 45583d9e89..25b24f79a0 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -19,11 +19,14 @@ configurations by bypassing the host file system. ## VMDirectStorage cmdlets -- [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md): Attaches a Storage Spaces Direct virtual - disk to a virtual machine. +### [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) -- [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md): Retrieves information about Storage Spaces - Direct virtual disks attached to a virtual machine. +Attaches a Storage Spaces Direct virtual disk to a virtual machine. -- [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md): Detaches a Storage Spaces Direct - virtual disk from a virtual machine. +### [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) + +Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. + +### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) + +Detaches a Storage Spaces Direct virtual disk from a virtual machine. From 7caf3371b861d8d0787bc09b1438f73049dba79d Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:39:23 -0700 Subject: [PATCH 06/14] Revert to try to resolve build issue. --- .../VMDirectStorage/VMDirectStorage.md | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 25b24f79a0..3cd9914758 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -4,29 +4,20 @@ Help Version: 5.1.0.2025 Locale: en-US Module Guid: 62a0b63f-2a15-415f-919a-a48e87f830cc Module Name: VMDirectStorage -ms.date: 03/28/2025 +ms.date: 02/21/2024 title: VMDirectStorage module -ai-usage: ai-generated --- -# VMDirectStorage module - +# VMDirectStorage Module ## Description +{{ Fill in the Description }} -The **VMDirectStorage** module provides cmdlets to manage the direct attachment of Storage Spaces -Direct virtual disks to virtual machines (VMs). This allows for high-performance storage -configurations by bypassing the host file system. - -## VMDirectStorage cmdlets - +## VMDirectStorage Cmdlets ### [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) - -Attaches a Storage Spaces Direct virtual disk to a virtual machine. +{{ Fill in the Description }} ### [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) - -Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. +{{ Fill in the Description }} ### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) - -Detaches a Storage Spaces Direct virtual disk from a virtual machine. +{{ Fill in the Description }} From 22f9478fe41159e9e01f2c8e839c0024337a734b Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:42:00 -0700 Subject: [PATCH 07/14] Trying to fix build --- .../Get-VMDirectVirtualDisk.md | 8 ------- .../VMDirectStorage/VMDirectStorage.md | 23 +++++++++++++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 5c3b69b326..ba9fad83e2 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -53,14 +53,6 @@ This command retrieves all virtual disks attached to the virtual machine named " Get-VMDirectVirtualDisk -VMName "VM1" ``` -Here's example output: - -```Output -VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId ------- -------------- ---------------- ------------------ ----------------------- ------------------- -VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... -``` - ### Example 2: Retrieve virtual disks by virtual machine object This command gets the virtual machine object for "VM1" and then retrieves its directly attached diff --git a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md index 3cd9914758..25b24f79a0 100644 --- a/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md +++ b/docset/winserver2025-ps/VMDirectStorage/VMDirectStorage.md @@ -4,20 +4,29 @@ Help Version: 5.1.0.2025 Locale: en-US Module Guid: 62a0b63f-2a15-415f-919a-a48e87f830cc Module Name: VMDirectStorage -ms.date: 02/21/2024 +ms.date: 03/28/2025 title: VMDirectStorage module +ai-usage: ai-generated --- -# VMDirectStorage Module +# VMDirectStorage module + ## Description -{{ Fill in the Description }} -## VMDirectStorage Cmdlets +The **VMDirectStorage** module provides cmdlets to manage the direct attachment of Storage Spaces +Direct virtual disks to virtual machines (VMs). This allows for high-performance storage +configurations by bypassing the host file system. + +## VMDirectStorage cmdlets + ### [Add-VMDirectVirtualDisk](Add-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Attaches a Storage Spaces Direct virtual disk to a virtual machine. ### [Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Retrieves information about Storage Spaces Direct virtual disks attached to a virtual machine. ### [Remove-VMDirectVirtualDisk](Remove-VMDirectVirtualDisk.md) -{{ Fill in the Description }} + +Detaches a Storage Spaces Direct virtual disk from a virtual machine. From 274b0e2f82df48b7d1e606d66397bdd03c54534d Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:52:35 -0700 Subject: [PATCH 08/14] Added output back --- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index ba9fad83e2..17c1ef69a5 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -53,6 +53,14 @@ This command retrieves all virtual disks attached to the virtual machine named " Get-VMDirectVirtualDisk -VMName "VM1" ``` +Here's example output: + +``` +VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId +------ -------------- ---------------- ------------------ ----------------------- ------------------- +VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... +``` + ### Example 2: Retrieve virtual disks by virtual machine object This command gets the virtual machine object for "VM1" and then retrieves its directly attached From 69413fb5195152ed0c146b614cce312a787a7e3a Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Tue, 1 Apr 2025 08:35:17 -0700 Subject: [PATCH 09/14] Trying to fix uild issue --- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 17c1ef69a5..7061acc4b9 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -51,11 +51,7 @@ This command retrieves all virtual disks attached to the virtual machine named " ```powershell Get-VMDirectVirtualDisk -VMName "VM1" -``` - -Here's example output: -``` VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId ------ -------------- ---------------- ------------------ ----------------------- ------------------- VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... From 320f66f48177222f5fc199aa7eba5c1ad2ee5d59 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Tue, 1 Apr 2025 12:29:45 -0700 Subject: [PATCH 10/14] More edits --- .../VMDirectStorage/Add-VMDirectVirtualDisk.md | 13 ++++++++----- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 7 ++++++- .../VMDirectStorage/Remove-VMDirectVirtualDisk.md | 5 ++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 69047ec64a..a6c6a1147a 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -49,8 +49,8 @@ disk to the VM. ### Example 1: Attach a virtual disk by specifying VM name and controller details -This example attaches the virtual disk with the unique ID "111BBE22FD037E4EB87F366648FBF111" to the -virtual machine named "VM1" at controller 0, location 1. +This example attaches the virtual disk with the unique ID `111BBE22FD037E4EB87F366648FBF111` to the +virtual machine named `VM1` at controller 0, location 1. ```powershell $parameters = @{ @@ -66,8 +66,8 @@ Add-VMDirectVirtualDisk @parameters ### Example 2: Attach a virtual disk by using a virtual disk object -This example gets the Storage Spaces Direct virtual disk object named "Volume01" and the VM object -named "VM1", and then directly attaches the disk to the VM. +This example gets the Storage Spaces Direct virtual disk object named `Volume01` and the VM object +named `VM1`, and then directly attaches the disk to the VM. ```powershell $virtualDisk = Get-VirtualDisk -Friendlyname "Volume01" @@ -80,7 +80,10 @@ Add-VMDirectVirtualDisk -VM $vm -VirtualDiskUniqueId $virtualDisk.UniqueId ### -CimSession -Specifies the CIM session to use for the operation. This is useful for managing remote systems. +Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or +a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more +information, see +[about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 7061acc4b9..daad21b5f2 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -51,7 +51,9 @@ This command retrieves all virtual disks attached to the virtual machine named " ```powershell Get-VMDirectVirtualDisk -VMName "VM1" +``` +```Output VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId ------ -------------- ---------------- ------------------ ----------------------- ------------------- VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... @@ -71,7 +73,10 @@ Get-VMDirectVirtualDisk -VM $vm ### -CimSession -Specifies the CIM session to use for the operation. This is useful for managing remote systems. +Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or +a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more +information, see +[about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 1bde370f12..69584b8b3a 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -64,7 +64,10 @@ Remove-VMDirectVirtualDisk -VirtualDisk $virtualDisk ### -CimSession -Specifies the CIM session to use for the operation. This is useful for managing remote systems. +Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or +a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more +information, see +[about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml Type: Microsoft.Management.Infrastructure.CimSession[] From 0fbd52108a6824551487b743432e77efc3fc7035 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:57:05 -0700 Subject: [PATCH 11/14] More edits --- .../Add-VMDirectVirtualDisk.md | 70 +++++++++++------ .../Get-VMDirectVirtualDisk.md | 78 +++++++++++++++---- .../Remove-VMDirectVirtualDisk.md | 16 ++-- 3 files changed, 115 insertions(+), 49 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index a6c6a1147a..935ed97e6f 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -12,7 +12,7 @@ ai-usage: ai-generated ## Synopsis -Attaches a Storage Spaces Direct virtual disk to a virtual machine. +Directly attaches a Storage Spaces Direct virtual disk to a virtual machine. ## Syntax @@ -41,13 +41,26 @@ Add-VMDirectVirtualDisk [-VMDriveController] [-ControllerLoc ## Description -The **Add-VMDirectVirtualDisk** cmdlet attaches a Storage Spaces Direct virtual disk to a virtual -machine. This enables high-performance storage configurations by directly connecting the virtual -disk to the VM. +The **Add-VMDirectVirtualDisk** cmdlet directly attaches a Storage Spaces Direct virtual disk to a +virtual machine. This enables high-performance storage configurations by directly connecting the +virtual disk to the VM. ## Examples -### Example 1: Attach a virtual disk by specifying VM name and controller details +### Example 1: Attach a virtual disk by using a virtual disk object + +This example gets the Storage Spaces Direct virtual disk object named `Volume01` and the VM object +named `VM1` on `Cluster01`, and then directly attaches the disk to the VM, using the first available +controller and controller location. + +```powershell +$VirtualDisk = Get-VirtualDisk -FriendlyName "Volume01" -CimSession "Cluster01" +$vm = Get-VM -Name "VM1" -CimSession "Cluster01" + +Add-VMDirectVirtualDisk -VM $vm -VirtualDiskUniqueId $VirtualDisk.UniqueId +``` + +### Example 2: Attach a virtual disk by specifying VM name and controller details This example attaches the virtual disk with the unique ID `111BBE22FD037E4EB87F366648FBF111` to the virtual machine named `VM1` at controller 0, location 1. @@ -64,25 +77,27 @@ $parameters = @{ Add-VMDirectVirtualDisk @parameters ``` -### Example 2: Attach a virtual disk by using a virtual disk object +### Example 3: Attach multiple virtual disks to a VM -This example gets the Storage Spaces Direct virtual disk object named `Volume01` and the VM object -named `VM1`, and then directly attaches the disk to the VM. +This example retrieves all virtual disks with names starting with `Volume0` from the cluster named +`Cluster01` and attaches them to the virtual machine named `VM1`. ```powershell -$virtualDisk = Get-VirtualDisk -Friendlyname "Volume01" -$vm = Get-VM -Name "VM1" +$VirtualDisks = Get-VirtualDisk -FriendlyName "Volume0*" -CimSession "Cluster01" +$vm = Get-VM -Name "VM1" -CimSession "Cluster01" -Add-VMDirectVirtualDisk -VM $vm -VirtualDiskUniqueId $virtualDisk.UniqueId +foreach ($diskID in $virtualdisks) { + Add-VMDirectVirtualDisk -VM $vm -VirtualDiskUniqueId $diskID.UniqueID +} ``` ## Parameters ### -CimSession -Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or -a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more -information, see +Runs the cmdlet in a remote session or on a remote computer. Enter a computer name, cluster name, or +a session object, such as the output of a `New-CimSession` or `Get-CimSession` cmdlet. The default +is the current session on the local computer. For more information, see [about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml @@ -99,7 +114,8 @@ Accept wildcard characters: False ### -ControllerLocation -Specifies the location on the controller where the virtual disk will be attached. +Specifies the location on the controller where the virtual disk will be attached. If you don't +specify a controller location, the cmdlet uses the first available location. ```yaml Type: System.Int32 @@ -115,7 +131,8 @@ Accept wildcard characters: False ### -ControllerNumber -Specifies the number of the controller where the virtual disk will be attached. +Specifies the number of the controller where the virtual disk will be attached. If you don't specify +a controller number, the cmdlet uses the first available controller. ```yaml Type: System.Int32 @@ -131,7 +148,8 @@ Accept wildcard characters: False ### -ControllerType -Specifies the type of controller. Only SCSI is supported. +Specifies the type of controller used by the VM. If you don't specify a controller type, the cmdlet +uses the SCSI controller type, which is the only type supported at this time. ```yaml Type: ControllerType @@ -148,7 +166,8 @@ Accept wildcard characters: False ### -VirtualDiskUniqueId -Specifies the unique ID of the virtual disk to attach. +Specifies the unique ID of the Storage Spaces virtual disk to attach. For example, +`111BBE22-FD03-7E4E-B87F-366648FBF111`. ```yaml Type: System.String @@ -164,7 +183,7 @@ Accept wildcard characters: False ### -VM -Specifies the virtual machine object to which the virtual disk will be attached. +Specifies a virtual machine object to which the virtual disk will be attached. ```yaml Type: Microsoft.HyperV.PowerShell.VirtualMachine[] @@ -221,21 +240,24 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String[] -Specifies the names of virtual machines. +Specifies the name of a virtual machine. ### Microsoft.HyperV.PowerShell.VirtualMachine[] -Specifies virtual machine objects. +Specifies a virtual machine object to which the virtual disk will be attached. You can use the +[Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. ### Microsoft.HyperV.PowerShell.VMDriveController -Specifies drive controller objects. +Specifies a drive controller object to which the virtual disk will be attached. You can use +the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive +controller object. ## Outputs -### System.Object +### None -Returns an object representing the result of the operation. +This cmdlet returns no output of its own. ## Notes diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index daad21b5f2..a18a43c554 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -45,12 +45,13 @@ name, and its location on the controller. ## Examples -### Example 1: Retrieve virtual disks by virtual machine name +### Example 1: Retrieve directly attached virtual disks by VM name -This command retrieves all virtual disks attached to the virtual machine named "VM1". +This command retrieves all virtual disks attached to the virtual machine named `VM1` running on the +cluster named `Cluster01`. ```powershell -Get-VMDirectVirtualDisk -VMName "VM1" +Get-VMDirectVirtualDisk -VMName "VM1" -CimSession "Cluster01" ``` ```Output @@ -59,23 +60,42 @@ VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyNam VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... ``` -### Example 2: Retrieve virtual disks by virtual machine object +### Example 2: Retrieve directly attached virtual disks by VM object -This command gets the virtual machine object for "VM1" and then retrieves its directly attached -virtual disks. +This command gets the virtual machine object for `VM1` running on `Cluster01` and then retrieves its +directly attached virtual disks. ```powershell -$vm = Get-VM -Name "VM1" +$vm = Get-VM -Name "VM1" -CimSession "Cluster01" Get-VMDirectVirtualDisk -VM $vm ``` +### Example 3: Retrieve virtual disks by drive controller object + +This command gets the drive controller object for the virtual machine named `VM1` running on +`Cluster01` and retrieves the directly attached virtual disks. + +```powershell +$vm = Get-VM -Name "VM1" -CimSession "Cluster01" +$controller = Get-VMScsiController -VMName "VM1" -CimSession "Cluster01" + +Get-VMDirectVirtualDisk -VMDriveController $controller +``` + +```Output +VMName ControllerType ControllerNumber ControllerLocation VirtualDiskFriendlyName VirtualDiskUniqueId +------ -------------- ---------------- ------------------ ----------------------- ------------------- +VM1 SCSI 0 1 Volume01 111BBE22FD037E4E... +VM1 SCSI 0 2 Volume02 222BBE22FD037E4E... +``` + ## Parameters ### -CimSession -Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or -a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more -information, see +Runs the cmdlet in a remote session or on a remote computer. Enter a computer name, cluster name, or +a session object, such as the output of a `New-CimSession` or `Get-CimSession` cmdlet. The default +is the current session on the local computer. For more information, see [about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml @@ -92,7 +112,8 @@ Accept wildcard characters: False ### -ControllerLocation -Specifies the location of the virtual disk on the controller. +Specifies the location of the virtual disk on the controller. If you don't specify a controller +location, the cmdlet returns all virtual disks attached to the specified controller. ```yaml Type: System.Int32 @@ -108,7 +129,8 @@ Accept wildcard characters: False ### -ControllerNumber -Specifies the number of the controller where the virtual disk is attached. +Specifies the number of the controller where the virtual disk is attached. If you don't specify a +controller number, the cmdlet returns all virtual disks attached to the specified controller. ```yaml Type: System.Int32 @@ -124,7 +146,8 @@ Accept wildcard characters: False ### -ControllerType -Specifies the type of controller. Only SCSI is supported. +Specifies the type of controller used by the VM. If you don't specify a controller type, the cmdlet +uses the SCSI controller type, which is the only type supported at this time. ```yaml Type: ControllerType @@ -157,7 +180,8 @@ Accept wildcard characters: False ### -VMDriveController -Specifies the drive controller object for which to retrieve virtual disk information. +Specifies the drive controller object for which to retrieve virtual disk information. You can use +the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive controller object. ```yaml Type: Microsoft.HyperV.PowerShell.VMDriveController[] @@ -198,15 +222,35 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String[] -Specifies the names of virtual machines. +Specifies the name of a virtual machine. + +### Microsoft.HyperV.PowerShell.VirtualMachine[] + +Specifies the virtual machine object for which to get directly attached virtual disks. You can use +the [Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. + +### Microsoft.HyperV.PowerShell.VMDriveController[] + +Specifies the drive controller objects for which to get directly attached virtual disks. You can use +the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive +controller object. + +## Inputs + +### System.String[] + +Specifies the name of a virtual machine. ### Microsoft.HyperV.PowerShell.VirtualMachine[] -Specifies virtual machine objects. +Specifies the virtual machine object for which to get directly attached virtual disks. You can use +the [Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. ### Microsoft.HyperV.PowerShell.VMDriveController[] -Specifies drive controller objects. +Specifies the drive controller objects for which to get directly attached virtual disks. You can use +the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive +controller object. ## Outputs diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 69584b8b3a..61a4a921cd 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -39,7 +39,7 @@ virtual machine. This operation ensures that the virtual disk is no longer acces ### Example 1: Detach a virtual disk by specifying VM name and controller details This command detaches the virtual disk located at controller 0, location 1, from the virtual machine -named "VM1". +named `VM1`. ```powershell $parameters = @{ @@ -53,11 +53,11 @@ Remove-VMDirectVirtualDisk @parameters ### Example 2: Detach a virtual disk by using the virtual disk object -This example gets the virtual disk object attached to "VM1" and then removes it. +This example gets the virtual disk object attached to `VM1` on `Cluster01` and then removes it. ```powershell -$virtualDisk = Get-VMDirectVirtualDisk -VMName "VM1" -Remove-VMDirectVirtualDisk -VirtualDisk $virtualDisk +$VmDirectDisk = Get-VMDirectVirtualDisk -VMName "VM1" -CimSession "Cluster01" +Remove-VMDirectVirtualDisk -VirtualDisk $VmDirectDisk ``` ## Parameters @@ -65,8 +65,8 @@ Remove-VMDirectVirtualDisk -VirtualDisk $virtualDisk ### -CimSession Runs the command using the specified CIM session. Enter a variable that contains the CIM session, or -a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For more -information, see +a command that creates or gets the CIM session, such as `New-CimSession` or `Get-CimSession`. For +more information, see [about_CimSession](/powershell/module/microsoft.powershell.core/about/about_cimsession). ```yaml @@ -181,9 +181,9 @@ Specifies the virtual disk objects to be detached. ## Outputs -### System.Object +### None -Returns an object representing the result of the operation. +This cmdlet returns no output of its own. ## Notes From e644964523e0b8afdb5978df3bee9573bcc4cbc6 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:57:53 -0700 Subject: [PATCH 12/14] Fixed an issue --- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index a18a43c554..78c2871f0c 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -235,23 +235,6 @@ Specifies the drive controller objects for which to get directly attached virtua the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive controller object. -## Inputs - -### System.String[] - -Specifies the name of a virtual machine. - -### Microsoft.HyperV.PowerShell.VirtualMachine[] - -Specifies the virtual machine object for which to get directly attached virtual disks. You can use -the [Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. - -### Microsoft.HyperV.PowerShell.VMDriveController[] - -Specifies the drive controller objects for which to get directly attached virtual disks. You can use -the [Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive -controller object. - ## Outputs ### VMDirectVirtualDisk From ecee72e3f37314702387d23bba62e57a7de1cb74 Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 3 Apr 2025 17:34:20 -0700 Subject: [PATCH 13/14] More edits --- .../Add-VMDirectVirtualDisk.md | 2 +- .../Remove-VMDirectVirtualDisk.md | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 935ed97e6f..49feabdbf3 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -215,7 +215,7 @@ Accept wildcard characters: False ### -VMName -Specifies the name of the virtual machine to which the virtual disk will be attached. +Specifies the name of the virtual machine to which the virtual disk will be directly attached. ```yaml Type: System.String[] diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 61a4a921cd..2b3a645443 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -53,7 +53,7 @@ Remove-VMDirectVirtualDisk @parameters ### Example 2: Detach a virtual disk by using the virtual disk object -This example gets the virtual disk object attached to `VM1` on `Cluster01` and then removes it. +This example gets all of the virtual disks directly attached to `VM1` on `Cluster01` and then removes them. ```powershell $VmDirectDisk = Get-VMDirectVirtualDisk -VMName "VM1" -CimSession "Cluster01" @@ -83,7 +83,9 @@ Accept wildcard characters: False ### -ControllerLocation -Specifies the location of the virtual disk on the controller. +Specifies the location on the controller of the virtual disk to remove. If you don't specify a +controller location, the cmdlet removes all directly virtual disks attached to the specified +controller. ```yaml Type: System.Int32 @@ -99,7 +101,8 @@ Accept wildcard characters: False ### -ControllerNumber -Specifies the number of the controller where the virtual disk is attached. +Specifies the number of the controller where the virtual disk is attached. If you don't specify a +controller number, the cmdlet removes all directly virtual disks on the specified controller. ```yaml Type: System.Int32 @@ -115,7 +118,8 @@ Accept wildcard characters: False ### -ControllerType -Specifies the type of controller. Only SCSI is supported. +Specifies the type of controller used by the VM. If you don't specify a controller type, the cmdlet +uses the SCSI controller type, which is the only type supported at this time. ```yaml Type: ControllerType @@ -132,7 +136,7 @@ Accept wildcard characters: False ### -VirtualDisk -Specifies the virtual disk object to detach. +Specifies the virtual disk object to remove. ```yaml Type: VMDirectVirtualDisk[] @@ -148,7 +152,7 @@ Accept wildcard characters: False ### -VMName -Specifies the name of the virtual machine from which the virtual disk will be detached. +Specifies the name of the virtual machine from which the directly attached virtual disk will be removed. ```yaml Type: System.String @@ -177,7 +181,8 @@ Specifies the name of the virtual machine. ### VMDirectVirtualDisk[] -Specifies the virtual disk objects to be detached. +Specifies the virtual disk objects to be removed. You can get the virtual disk object by using the +[Get-VMDirectVirtualDisk](Get-VMDirectVirtualDisk.md) cmdlet. ## Outputs From 15152fea565487863eaac65f42d03b71fc4f134c Mon Sep 17 00:00:00 2001 From: Jason Gerend <7906263+JasonGerend@users.noreply.github.com> Date: Thu, 3 Apr 2025 17:56:24 -0700 Subject: [PATCH 14/14] Minor tweaks --- .../VMDirectStorage/Add-VMDirectVirtualDisk.md | 7 +++++-- .../VMDirectStorage/Get-VMDirectVirtualDisk.md | 7 ++++--- .../VMDirectStorage/Remove-VMDirectVirtualDisk.md | 15 +++++++++------ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md index 49feabdbf3..bcd11ef535 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Add-VMDirectVirtualDisk.md @@ -183,7 +183,8 @@ Accept wildcard characters: False ### -VM -Specifies a virtual machine object to which the virtual disk will be attached. +Specifies a virtual machine object to which the virtual disk will be attached. You can use the +[Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. ```yaml Type: Microsoft.HyperV.PowerShell.VirtualMachine[] @@ -199,7 +200,9 @@ Accept wildcard characters: False ### -VMDriveController -Specifies the drive controller object to which the virtual disk will be attached. +Specifies the drive controller object to which the virtual disk will be attached. You can use the +[Get-VmScsiController](/powershell/module/hyper-v/get-vmscsicontroller) cmdlet to get the drive +controller object. ```yaml Type: Microsoft.HyperV.PowerShell.VMDriveController diff --git a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md index 78c2871f0c..129d03b3bd 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Get-VMDirectVirtualDisk.md @@ -113,7 +113,7 @@ Accept wildcard characters: False ### -ControllerLocation Specifies the location of the virtual disk on the controller. If you don't specify a controller -location, the cmdlet returns all virtual disks attached to the specified controller. +location, the cmdlet returns virtual disks with any controller location. ```yaml Type: System.Int32 @@ -130,7 +130,7 @@ Accept wildcard characters: False ### -ControllerNumber Specifies the number of the controller where the virtual disk is attached. If you don't specify a -controller number, the cmdlet returns all virtual disks attached to the specified controller. +controller number, the cmdlet returns virtual disks with any controller number. ```yaml Type: System.Int32 @@ -164,7 +164,8 @@ Accept wildcard characters: False ### -VM -Specifies the virtual machine object for which to retrieve virtual disk information. +Specifies the virtual machine object for which to retrieve virtual disk information. You can use the +[Get-VM](/powershell/module/hyper-v/get-vm) cmdlet to get the virtual machine object. ```yaml Type: Microsoft.HyperV.PowerShell.VirtualMachine[] diff --git a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md index 2b3a645443..cff236ff1a 100644 --- a/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md +++ b/docset/winserver2025-ps/VMDirectStorage/Remove-VMDirectVirtualDisk.md @@ -32,13 +32,14 @@ Remove-VMDirectVirtualDisk [-VirtualDisk] [