共用方式為


Set-OBMachineSetting

Sets a OBMachineSetting object for the server.

語法

UNNAMED_PARAMETER_SET_1

Set-OBMachineSetting
    [-EncryptionPassphrase] <SecureString>
    [[-SecurityPin] <String>]
    [[-PassphraseSaveLocation] <String>]
    [[-KeyVaultUri] <String>]
    [-Confirm]
    [-WhatIf]

UNNAMED_PARAMETER_SET_2

Set-OBMachineSetting
    [-WorkDay] <DayOfWeek[]>
    [-StartWorkHour] <TimeSpan>
    [-EndWorkHour] <TimeSpan>
    [-WorkHourBandwidth] <UInt32>
    [-NonWorkHourBandwidth] <UInt32>
    [-Confirm]
    [-WhatIf]

UNNAMED_PARAMETER_SET_3

Set-OBMachineSetting
    [-NoProxy]
    [-Confirm]
    [-WhatIf]

UNNAMED_PARAMETER_SET_4

Set-OBMachineSetting
    [-NoThrottle]
    [-Confirm]
    [-WhatIf]

UNNAMED_PARAMETER_SET_5

Set-OBMachineSetting
    [-ProxyServer] <String>
    [-ProxyPort] <Int32>
    [[-ProxyUsername] <String>]
    [[-ProxyPassword] <SecureString>]
    [-Confirm]
    [-WhatIf]

Description

The Set-OBMachineSetting cmdlet sets a OBMachineSetting object for the server that includes proxy server settings for accessing the internet, network bandwidth throttling settings, and the encryption passphrase that is required to decrypt the files during recovery to another server.

This cmdlet supports WhatIf and Confirm parameters with a medium impact. The medium impact signifies that the cmdlet will not prompt the user for confirmation by default. The WhatIf parameter gives a verbose description of what the cmdlet does without performing any operation. The Confirm parameter specifies whether the cmdlet should prompt the user. Using -Confirm:$FALSE will override the prompt.

To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.

範例

EXAMPLE 1

$spwd = ConvertTo-SecureString -String Notag00pa55word -AsPlainText -Force
Set-OBMachineSetting -EncryptionPassphrase $spwd -PassphraseSaveLocation C:\

This example sets encryption passphrase for a computer.

EXAMPLE 2

$spwd = ConvertTo-SecureString -String Notag00pa55word -AsPlainText -Force
$setOBMachineSettingSplat = @{
    ProxyServer   = 'http://proxycontoso.com'
    ProxyPort     = '<your proxy port>'
    ProxyUsername = 'contoso\johnj99'
    ProxyPassword = $spwd
}
Set-OBMachineSetting @setOBMachineSettingSplat

This example sets proxy settings for a server.

EXAMPLE 3

$setOBMachineSettingSplat = @{
    WorkDay              = [System.DayOfWeek]::Monday, [System.DayOfWeek]::Tuesday
    StartWorkHour        = '9:00:00'
    EndWorkHour          = '18:00:00'
    WorkHourBandwidth    = (512*1024)
    NonWorkHourBandwidth = (2048*1024)
}
Set-OBMachineSetting @setOBMachineSettingSplat

This example sets throttling settings.

EXAMPLE 4

Set-OBMachineSetting -NoThrottle

This example specifies that network bandwidth throttling will not be used by this server.

EXAMPLE 5

Set-OBMachineSetting -NoProxy

This example specifies that this server does not use a unique proxy server configuration.

EXAMPLE 6

$spwd = ConvertTo-SecureString -String abcdefgh123456000345 -AsPlainText -Force
$setOBMachineSettingSplat = @{
    EncryptionPassphrase = $spwd
    SecurityPIN = 123456
    PassphraseSaveLocation = 'C:\Users\myuser\MyFolder \Desktop\passphrases\'
}
Set-OBMachineSetting @setOBMachineSettingSplat

This example registers a server with the given passphrase and saves it in the location provided.

EXAMPLE 7

$spwd = ConvertTo-SecureString -String abcdefgh123456000345 -AsPlainText -Force
$setOBMachineSettingSplat = @{
    EncryptionPassphrase  = $spwd
    SecurityPIN           = 123456
    KeyVaultUri           = 'https://mykeyvault.vault.azure.net/'
}
Set-OBMachineSetting @setOBMachineSettingSplat

This example registers a server with the given passphrase and saves it in Azure Key Vault.

參數

-Confirm

Prompts you for confirmation before running the cmdlet.

參數屬性

類型:SwitchParameter
預設值:False
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EncryptionPassphrase

Sets the encryption passphrase to be used to encrypt the backed up data.

參數屬性

類型:SecureString
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_1
Position:2
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EndWorkHour

Specifies the hour that ends the work hours range.

參數屬性

類型:TimeSpan
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_2
Position:4
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-KeyVaultUri

Enter a Key Vault URI to save the passphrase securely. A new secret is created in the key vault specified to save the passphrase. One of PassphraseSaveLocation or KeyVaultUri (recommended) needs to be specified.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:3
必要:True
來自管線的值:True
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-NonWorkHourBandwidth

Specifies the bandwidth throttling setting to be used to limit the network bandwidth consumed by data transfers during non-work hours.

參數屬性

類型:UInt32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_2
Position:6
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-NoProxy

Specifies that unique proxy server settings are not to be used for online backups.

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_3
Position:2
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-NoThrottle

Specifies that network throttling is not used with online backups. Data transfers of backed up items from the local server to the Microsoft Azure Backup server will use bandwidth as needed.

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_4
Position:2
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-PassphraseSaveLocation

Enter a network location or folder where the passphrase can be saved. Saving the passphrase in the machine being protected is not recommended. Microsoft cannot recover backup data if the passphrase is lost. One of PassphraseSaveLocation or KeyVaultUri (recommended) needs to be specified.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:2
必要:True
來自管線的值:True
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ProxyPassword

Specifies authentication password to be used for proxy setting.

參數屬性

類型:SecureString
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_5
Position:5
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ProxyPort

Specifies the port number to be used on the proxy server.

參數屬性

類型:Int32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_5
Position:3
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ProxyServer

Specifies the proxy server to be used when connecting to the Microsoft Azure Backup server.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_5
Position:2
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ProxyUsername

Specifies the username to be used for proxy server authentication.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_5
Position:4
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-SecurityPin

Security pin is necessary if you are changing passphrase and the hybrid security setting is turned on for the Recovery Services Vault. You must generate a security pin by selecting Generate under Settings > Properties > Security PINin the Recovery Services Vault section of the Azure portal.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:3
必要:True
來自管線的值:True
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-StartWorkHour

Specifies the hour that starts the range of work hours.

參數屬性

類型:TimeSpan
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_2
Position:3
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

參數屬性

類型:SwitchParameter
預設值:False
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WorkDay

Specifies the array of work days using the using [DayOfWeek] system variables.

參數屬性

類型:

DayOfWeek[]

預設值:None
接受的值:Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_2
Position:2
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WorkHourBandwidth

Specifies the bandwidth throttling setting to be used to limit the network bandwidth consumed by data transfers during work hours.

參數屬性

類型:UInt32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

UNNAMED_PARAMETER_SET_2
Position:5
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

輸入

Microsoft.Internal.CloudBackup.Commands.OBMachineSetting

輸出

Microsoft.Internal.CloudBackup.Commands.OBMachineSetting