Set-SCApplicationSetting
設定應用程式設定的值。
Syntax
Set-SCApplicationSetting
[-VMMServer <ServerConnection>]
[-ApplicationSetting] <ApplicationSetting>
[-Value <String>]
[-JobGroup <Guid>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCApplicationSetting
[-VMMServer <ServerConnection>]
[-ApplicationSetting] <ApplicationSetting>
[-SecureValue <SecureString>]
[-JobGroup <Guid>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
Set-SCApplicationSetting Cmdlet 會設定應用程式設定的值。
範例
範例 1:設定應用程式設定的值
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile -Name "SvcWebDeployment01"
PS C:\> $AppSetting = Get-SCApplicationSetting -ApplicationDeployment $AppDeployment -Name "Order_Service"
PS C:\> Set-SCApplicationSetting -ApplicationSetting $AppSetting -Value "http://@servicesComputerName@/OrderService.xamlx"
第一個命令會取得名為 SvcWebAppProfile01 的應用程式佈建檔物件,並將物件儲存在$AppProfile變數中。
第二個命令會針對儲存在 $AppProfile 的應用程式佈建檔取得名為 SvcWebDeployment01 的應用程式部署物件,並將物件儲存在$AppDeployment變數中。
第三個命令會取得應用程式封裝在儲存在 $AppDeployment 的應用程式部署中名為 Order_Service 的設定物件,然後將設定物件儲存在 $AppSetting 變數中。
最後一個命令會設定儲存在 $AppSetting 的應用程式設定值。 在此情況下,SvcWebDeployment01 應用程式部署中已更新Order_Service設定的值。
參數
-ApplicationSetting
指定應用程式設定物件。
Type: | ApplicationSetting |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-JobGroup
指定一系列命令的識別碼,這些命令會在執行包含相同工作群組識別碼的最終命令之前,使用整組的方式來執行。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定追蹤工作進度,並將工作進度存放在這個參數命名的變數中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作之 PRO 提示 (PRO 提示的識別碼) 。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecureValue
指定安全字串的值。
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Value
指定用來屬性物件或屬性的字串。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定 VMM 伺服器物件。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸出
ApplicationSetting
此 Cmdlet 會傳回 ApplicationSetting 物件。