Add-SCVMMManagedComputer

Adds a managed computer to VMM.

Syntax

Add-SCVMMManagedComputer
   [-Description <String>]
   [-ComputerName] <String>
   -Credential <VMMCredential>
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Add-SCVMMManagedComputer cmdlet adds a managed computer to Virtual Machine Manager (VMM).

Examples

Example 1: Add a new SPF server into VMM as a managed computer

PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAcct01"
PS C:\> Add-SCVMMManagedComputer -ComputerName "SPF.Contoso.com" -Description "SPF" -Credential $RunAsAccount

The first command gets the Run As account object named RunAsAcct01 and stores the object in the $RunAsAccount variable.

The second command adds the SPF server named SPF.Contoso.com to VMM as a managed computer.

Parameters

-ComputerName

Specifies the name of a computer that VMM can uniquely identify on your network. The acceptable values for this parameter are:

  • FQDN
  • IPv4 or IPv6 address
  • NetBIOS name
Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.

For more information about the PSCredential object, type Get-Help Get-Credential.

For more information about Run As accounts, type Get-Help New-SCRunAsAccount.

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

-Description

Specifies a description for the managed computer.

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

Outputs

VMMManagedComputer

This cmdlet returns a VMMManagedComputer object.