Adds a virtual Fibre Channel host bus adapter to a virtual machine.
Windows Server · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft Hyper-V reference: Adds a virtual Fibre Channel host bus adapter to a virtual machine. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Add-VMFibreChannelHba. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / Hyper-V · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer 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.
-ComputerName
Specifies one or more Hyper-V hosts on which a virtual Fibre Channel host bus adapter is to be added. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.
-Confirm
Prompts you for confirmation before running the cmdlet.
-Credential
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
-GenerateWwn
Specifies that the world wide names for the Fibre Channel host bus adapter are to be generated automatically. When specified, the WorldWideNodeNameSetA, WorldWideNodeNameSetB, WorldWidePortNameSetA, and WorldWidePortNameSetB parameters cannot be used.
-Passthru
Specifies that an object representing the virtual machine to which the virtual Fibre Channel host bus adapter being added is to be passed through to the pipeline.
-SanName (required)
Specifies the virtual storage area network (SAN) name to associate with this virtual Fibre Channel host bus adapter. Use the Get-VMSan cmdlet to get a list of all virtual SANs on the host.
-VM (required)
Specifies the virtual machine to which the virtual Fibre Channel host bus adapter is to be added.
-VMName (required)
Specifies the name of the virtual machine to which the virtual Fibre Channel host bus adapter is to be added.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
-WorldWideNodeNameSetA (required)
Specifies the world wide node name of address A associated with the Fibre Channel host bus adapter to be added.
-WorldWideNodeNameSetB (required)
Specifies the world wide node name of address B associated with the Fibre Channel host bus adapter to be added.
-WorldWidePortNameSetA (required)
Specifies the world wide port name of address A associated with the Fibre Channel host bus adapter to be added.
-WorldWidePortNameSetB (required)
Specifies the world wide port name of address B associated with the Fibre Channel host bus adapter to be added.
Prerequisites
Windows with the Hyper-V module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1
Add-VMFibreChannelHba -VMName MyVM -SanName Production
This example adds the virtual Fibre Channel host bus adapter associated with virtual storage area network Production to a virtual machine named MyVM. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.