Skip to content

Repair SdnVMNetworkAdapterPortProfile

Adam Rudell edited this page Sep 8, 2025 · 1 revision

Repair-SdnVMNetworkAdapterPortProfile

SYNOPSIS

Repairs the port profile applied to the virtual machine network interfaces.

SYNTAX

Repair-SdnVMNetworkAdapterPortProfile [-VMName] <String> [-MacAddress] <String> [-NcUri] <Uri>
 [[-NcRestCredential] <PSCredential>] [[-NcRestCertificate] <X509Certificate>] [-HyperVHost] <String>
 [[-Credential] <PSCredential>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This cmdlet repairs the port profile applied to the virtual machine network interfaces by retrieving the network interface from Network Controller and applying the port profile to the VM network adapter.

EXAMPLES

EXAMPLE 1

Repair-SdnVMNetworkAdapterPortProfile -VMName 'TestVM01' -MacAddress 001DD826100E -NcUri 'https://nc.contoso.com' -HyperVHost 'Contoso-N01'

PARAMETERS

-VMName

Specifies the name of the virtual machine.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MacAddress

Specifies the MAC address of the VM network adapter.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NcUri

Specifies the URI of the Network Controller REST API.

Type: Uri
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NcRestCredential

Specifies a user account that has permission to perform this action against the Network Controller REST API. If omitted, the current user is used.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False

-NcRestCertificate

Specifies the client certificate that is used for a secure web request to Network Controller REST API.

Type: X509Certificate
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HyperVHost

Type the NetBIOS name, an IP address, or a fully qualified domain name of the computer that is hosting the virtual machine.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Specifies a user account that has permission to perform this action on the HyperVHost. The default is the current user. If omitted, the current user is used.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally