Set-SCStorageProvider
Set-SCStorageProvider
Modifies a storage provider object in VMM.
Syntax
Parameter Set: Default
Set-SCStorageProvider [-StorageProvider] <StorageProvider> [-Certificate <ClientCertificate> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-NetworkDeviceName <String> ] [-PROTipID <Guid]> ] [-RunAsAccount <RunAsAccount> ] [-RunAsynchronously] [-TCPPort <UInt32]> ] [ <CommonParameters>]
Detailed Description
The Set-SCStorageProvider cmdlet modifies a storage provider object in Virtual Machine Manager (VMM).
Parameters
-Certificate<ClientCertificate>
Specifies a security certificate object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Description<String>
Specifies a description for the storage provider.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NetworkDeviceName<String>
Specifies the name of a network device.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsAccount<RunAsAccount>
Specifies a Run As account that contains credentials with permission to perform this action.
Aliases |
none |
Required? |
false |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageProvider<StorageProvider>
Specifies a storage provider object.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-TCPPort<UInt32]>
Specifies a numeric value that represents a TCP port.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- StorageProvider
Examples
Example 1: Change the name of a storage provider
The first command gets the storage provider named StorProv01, and then stores it in the $Provider variable.
The second command gets Run As account RunAsAccount01, and then 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 Run As account stored in $RunAsAcct.
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
Example 2: Change the TCP/IP port of a storage provider
The first command gets the storage provider named StorProv01, and then stores it in the $Provider variable.
The second command gets the Run As account named RunAsAccount01, and then 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 Run As account stored in $RunAsAcct.
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