Set-SCStorageProvider

Modifies a storage provider object in VMM.

Syntax

Set-SCStorageProvider
   [-StorageProvider] <StorageProvider>
   [-Name <String>]
   [-Description <String>]
   [-RunAsAccount <RunAsAccount>]
   [-NetworkDeviceName <String>]
   [-TCPPort <UInt32>]
   [-Certificate <ClientCertificate>]
   [-JobGroup <Guid>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Set-SCStorageProvider cmdlet modifies a storage provider object in Virtual Machine Manager (VMM).

Examples

Example 1: Change the name of a storage provider

PS C:\> $Provider = Get-SCStorageProvider -Name "StorProv01.Contoso.com"
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> Set-SCStorageProvider -StorageProvider $Provider -NetworkDeviceName "http://StorProv01.Contoso.com" -Name "NewStorProvName.Contoso.com" -RunAsAccount $RunAsAcct

The first command gets the storage provider named StorProv01 and stores it in the $Provider variable.

The second command gets RunAs account RunAsAccount01 and stores it in the $RunAsAcct variable.

The last command sets the network device name of the storage provider stored in the $Provider variable to NewStorProvName using the RunAs account stored in $RunAsAcct.

Example 2: Change the TCP/IP port of a storage provider

PS C:\> $Provider = Get-SCStorageProvider -Name "StorProv01.Contoso.com"
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> Set-SCStorageProvider -StorageProvider $Provider -TCPPort 40441 -RunAsAccount $RunAsAcct

The first command gets the storage provider named StorProv01 and stores it in the $Provider variable.

The second command gets the RunAs account named RunAsAccount01 and stores the object in the $RunAsAcct variable.

The third command changes the TCP/IP port of the storage provider stored in $Provider to 40441 using the RunAs account stored in $RunAsAcct.

Parameters

-Certificate

Specifies a security certificate object.

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

-Description

Specifies a description for the storage provider.

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

-JobGroup

Specifies an ID for a series of commands that run as a set just before the final command that includes the same job group ID runs.

Type:Guid
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

-Name

Specifies the name of a VMM object.

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

-NetworkDeviceName

Specifies the name of a network device.

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

-RunAsAccount

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

Type:RunAsAccount
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

-StorageProvider

Specifies a storage provider object.

Type:StorageProvider
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TCPPort

Specifies a numeric value that represents a TCP port.

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

Outputs

StorageProvider

This cmdlet returns a StorageProvider object.