Add-SCNetworkService

Adds a network service to VMM.

Syntax

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

Type:UInt64
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Certificate

Specifies an array of security certificate objects.

Type:ClientCertificate[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:ConfigurationProvider
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ConnectionString

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

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the network service.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalNetworkDedicatedIP

Specifies an array of logical network objects.

Type:LogicalNetwork[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalNetworkVIP

Specifies an array of logical network objects.

Type:LogicalNetwork[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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 (')

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Model

Specifies the model of a physical device.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a network object.

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

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProvisionSelfSignedCertificatesForNetworkService
Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

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

Type:RunAsAccount
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMHostGroup

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

Type:HostGroup[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Version

Specifies a version.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False