Get-SCVMMServer

Get-SCVMMServer

Connects to a VMM management server if a connection does not already exist, or connects to a different VMM management server.

構文

Parameter Set: Default
Get-SCVMMServer [-ComputerName] <String> [-AllowJobGC] [-ConnectAs <Profile]> ] [-Credential <PSCredential> ] [-ForOnBehalfOf] [-RetainDeletedObjects] [-RetainObjectCache] [-SetAsDefault] [-TCPPort <Int32> ] [-UserRoleName <String> ] [ <CommonParameters>]

詳細説明

The Get-SCVMMServer cmdlet connects to a Virtual Machine Manager (VMM) management server if a connection does not already exist and retrieves the server object from the VMM database. The default port used to connect to a VMM server is TCP port 8100.

If you have created a connection to a VMM management server using the user interface (UI), when you open a VMM command shell, that command shell automatically connects to the same VMM management server. If you have not previously connected to the VMM management server using the UI, you need to use Get-SCVMMServer to establish a connection. Note that if you connect to a VMM management server only using the VMM command shell, you will need to use the SetAsDefault parameter to retain the connection from session to session, or re-connect to the VMM server each time you open a new VMM command shell session.

You can also use Get-VMMServer to connect to a different VMM management server.

After a connection to the VMM management server is established, all future commands run at the VMM command shell command line that require the VMM server object will automatically use the existing connection until you close that VMM command shell window.

The VMM service running on the VMM management server supports the VMM database. This database is stored in Microsoft SQL Server either on the VMM management server itself or on a separate server running SQL Server.

The VMM service enables you to manage your virtual environment, including host servers (which host virtual machines), library servers (which store VMM library resources), and virtual machines deployed on a host or stored in the library.

For more information about connecting to the VMM management server, type Get-Help about_VMM_2012_Connecting_to_the_VMM_Server.

パラメーター

-AllowJobGC

Indicates that garbage collection is allowed for jobs.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ComputerName<String>

Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:

-- FQDN
-- IPv4 or IPv6 address
-- NetBIOS name

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ConnectAs<Profile]>

Specifies the VMM user role to use, if the user is a member of more than one role, when connecting to the VMM management server from the VMM command shell. Valid values are:

-- Administrator
-- DelegatedAdmin
-- ReadOnlyAdmin
-- SelfServiceUser

VMM Administrators can manage all VMM objects. Delegated Administrators and Self-Service users can access and change only the objects that are within the scope of their user roles. Read-Only Administrators can only view the properties of existing objects; they cannot create new objects or change the properties of existing objects.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Credential<PSCredential>

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.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ForOnBehalfOf

Indicates that an administrator is able to use OnBehalfOf parameters, when available, for VMM cmdlets. This parameter is primarily used for Service Provider Foundation connections to VMM.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RetainDeletedObjects

Indicates that objects in the cache that are marked for deletion will be preserved. You might need this parameter only if you create a user interface on top of the VMM command shell.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RetainObjectCache

Indicates that the objects in the cache will remain in memory and will not be reclaimed by garbage collection. You might need this parameter if you create a user interface on top of the VMM command shell.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SetAsDefault

Indicates, when set to $True, that the VMM command shell connects to the specified VMM management server for this session and retains that connection for future sessions.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-TCPPort<Int32>

Specifies a numeric value that represents a TCP port.

エイリアス

Port

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UserRoleName<String>

Specifies the name of a user role. Types of user roles that are named include Delegated Administrator, Read-Only Administrator and Self-Service User.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Connect to a VMM server

This command connects to the VMM server named VMMServer01 located in the Contoso domain and gets the server object from the VMM database.

PS C:\> Get-SCVMMServer -ComputerName "VMMServer01.Contoso.com"

Example 2: Connect to a VMM server through a specific port

This command connects over TCP port 8100 to the VMM server named VMMServer01 located in the Contoso domain.

PS C:\> Get-SCVMMServer -ComputerName "VMMServer01.Contoso.com" -TCPPort 8100

Example Example 3: Connect to a VMM server and get its .NET object type, methods, and properties.

The first command gets the VMM server object named VMMServer01, and then stores the object in the $VMMServer variable.

The second command passes the VMM server object stored in $VMMServer to the Get-Member cmdlet, which retrieves and displays the following:

-- TypeName. The name of the .NET type of the VMM server object: Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection.

-- MemberType. A list containing the name and definition for each event, method, and property associated with this object type.

The third command retrieves and displays the same information as the second command, except that it passes the output to the Format-List cmdlet by using the pipeline operator so that the complete definition for each method and each property for the VMM server object is displayed.

PS C:\> $VMMServer = Get-SCVMMServer -ComputerName "VMMServer01.Contoso.com"
PS C:\> $VMMServer | Get-Member
PS C:\> $VMMServer | Get-Member | Format-List

Example 4: Connect to a different VMM server with a different user role

This command connects to the VMM server named VMMServer02 located in the Contoso domain using the DelegatedAdmin user role.

PS C:\> Get-SCVMMServer -ComputerName "VMMServer02.Contoso.com" -ConnectAs "DelegatedAdmin"

関連トピック

Restart-SCJob

Set-SCVMMServer