Delen via


Add-SCNetworkService

Adds a network service to VMM.

Syntax

ByModel (Default)

Add-SCNetworkService
    [-ConnectionString] <String>
    -Manufacturer <String>
    -Model <String>
    -RunAsAccount <RunAsAccount>
    -VMHostGroup <HostGroup[]>
    -Name <String>
    [-ProvisionSelfSignedCertificatesForNetworkService <Boolean>]
    [-VMMServer <ServerConnection>]
    [-Version <String>]
    [-Description <String>]
    [-BandwidthCapacityKBps <UInt64>]
    [-Certificate <ClientCertificate[]>]
    [-LogicalNetworkVIP <LogicalNetwork[]>]
    [-LogicalNetworkDedicatedIP <LogicalNetwork[]>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

ByProvider

Add-SCNetworkService
    [-ConnectionString] <String>
    -RunAsAccount <RunAsAccount>
    -VMHostGroup <HostGroup[]>
    -Name <String>
    -ConfigurationProvider <ConfigurationProvider>
    [-ProvisionSelfSignedCertificatesForNetworkService <Boolean>]
    [-VMMServer <ServerConnection>]
    [-Version <String>]
    [-Description <String>]
    [-BandwidthCapacityKBps <UInt64>]
    [-Certificate <ClientCertificate[]>]
    [-LogicalNetworkVIP <LogicalNetwork[]>]
    [-LogicalNetworkDedicatedIP <LogicalNetwork[]>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Add-SCNetworkService cmdlet adds a network service to Virtual Machine Manager (VMM).

Examples

Example 1: Add a network service for a network controller to VMM

PS C:\> $RunAsAccount = Get-SCRunAsAccount -ID "dc90a558-c402-4a70-9f6b-e50bc2fad540"
PS C:\> $ConfigurationProvider = Get-SCConfigurationProvider -Name "Microsoft Network Controller"
PS C:\> $VmHostGroup = @()
PS C:\> $VmHostGroup += Get-SCVMHostGroup -Name "All Hosts"
PS C:\> $Certificates = @()
PS C:\> $Certificates += Get-SCCertificate -ComputerName "networkcontroller.contoso.com" -TCPPort 443
PS C:\> Add-SCNetworkService -Name "NetworkController" -RunAsAccount $runAsAccount -ConfigurationProvider $ConfigurationProvider -VMHostGroup $vmHostGroup -ConnectionString "serverUrl=https://networkcontroller.contoso.com;serviceName=NC_Service" -Certificate $Certificates -ProvisionSelfSignedCertificatesForNetworkService $True

The first command gets the run as account that is used by VMM to communicate with network service. The command stores it in the $RunAsAccount variable.

The second command gets the configuration provider for network controller.

The third command creates an array variable named $VmHostGroup. The fourth command adds a host group to which the network service is accessible to $VmHostGroup.

The fifth command creates an array variable named $Certificates. The sixth command adds the certificated available for the network controller to $Certificates.

The final command adds network service for a network controller to VMM. The command specifies the values created in previous commands. Because this example uses self-signed certificates for the network controller, the ProvisionSelfSignedCertificatesForNetworkService has a value of $True.

Parameters

-BandwidthCapacityKBps

Specifies the bandwidth capacity, in kilobytes per second (KBps), of a network service.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Certificate

Specifies an array of security certificate objects.

Parameter properties

Type:

ClientCertificate[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConfigurationProvider

Specifies a configuration provider object.

A configuration provider is a plug-in to VMM that translates VMM PowerShell commands to API calls that are specific to a type of load balancer. If no configuration provider is specified, VMM uses the Manufacturer and Model information to choose an available configuration provider. If no configuration provider is found, the load balancer is not added.

Parameter properties

Type:ConfigurationProvider
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByProvider
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectionString

Specifies the information required to connect to the virtual switch extension manager.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specifies a description for the network service.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogicalNetworkDedicatedIP

Specifies an array of logical network objects.

Parameter properties

Type:

LogicalNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogicalNetworkVIP

Specifies an array of logical network objects.

Parameter properties

Type:

LogicalNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Manufacturer

Specifies the name of the company that manufactured a physical device. The acceptable values for this parameter are:

  • Letters (a-z)
  • Numbers (0-9)
  • Underscore (_)
  • Hyphen (-)
  • Dot (.)
  • Single quote (')

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByModel
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Model

Specifies the model of a physical device.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByModel
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a network object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProvisionSelfSignedCertificatesForNetworkService

The Add-SCNetworkService cmdlet adds a network service to Virtual Machine Manager (VMM).

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsAccount

Specifies a Run As account that contains credentials with permission to perform this action.

Parameter properties

Type:RunAsAccount
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

Specifies a version.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHostGroup

Specifies a virtual machine host group object or an array of host group objects.

Parameter properties

Type:

HostGroup[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.