Set-SCApplicationDeployment
修改應用程式部署。
Syntax
Set-SCApplicationDeployment
[-SQLInstanceName <String>]
[-SQLDeploymentRunAsAccount <VMMCredential>]
[-Executable <String>]
[-CommandParameters <String>]
[-Scriptblock <String>]
[-ScriptCommandSetting <SCScriptCommandSetting>]
[-TimeoutSeconds <Int32>]
[-StandardInput <String>]
[-LibraryResource <CustomResource>]
[-EnvironmentVariables <Hashtable>]
[-RunAsAccount <VMMCredential>]
[-VMMServer <ServerConnection>]
[-ApplicationDeployment] <ApplicationDeployment>
[-ApplicationPackage <ApplicationPackage>]
[-Name <String>]
[-DACInstanceName <String>]
[-SQLAuthenticationType <String>]
[-SkipPolicyValidation <Boolean>]
[-BlockOnChanges <Boolean>]
[-IgnoreDataLoss <Boolean>]
[-RollbackOnFailure <Boolean>]
[-UninstallMode <String>]
[-FailDeploymentIfDBExists <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
Set-SCApplicationDeployment Cmdlet 會修改應用程式部署。
範例
範例 1:更新 Web 應用程式部署的應用程式套件
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -Name "SvcWebDeployment01" -ApplicationProfile $AppProfile
PS C:\> $AppPackage = Get-SCApplicationPackage -Name "WebApp02.zip"
PS C:\> Set-SCApplicationDeployment -ApplicationDeployment $AppDeployment -ApplicationPackage $AppPackage
第一個命令會取得名為 SvcWebAppProfile01 的應用程式佈建檔物件,並將物件儲存在$AppProfile變數中。
第二個命令會針對儲存在 $AppProfile 的應用程式佈建檔取得名為 SvcWebDeployment01 的應用程式部署物件,然後將物件儲存在$AppDeployment變數中。
第三個命令會從 VMM 程式庫取得名為 WebApp02.zip 的應用程式封裝物件,並將物件儲存在$AppPackage變數中。
最後一個命令會藉由將先前的應用程式套件取代為儲存在 $AppPackage 中的應用程式套件,以更新儲存在 $AppDeployment 中的應用程式部署。
參數
-ApplicationDeployment
指定應用程式部署物件。
Type: | ApplicationDeployment |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApplicationPackage
指定應用程式封裝物件。
Type: | ApplicationPackage |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BlockOnChanges
指出如果資料庫架構與上一個 DAC 中所定義的架構不同,是否封鎖 SQL DAC 更新。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CommandParameters
指定腳本或可執行程式的參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DACInstanceName
指定 DAC) 實例 (資料層應用程式的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnvironmentVariables
指定雜湊表,其中包含應用程式的環境變數。
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Executable
指定可執行程式的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FailDeploymentIfDBExists
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IgnoreDataLoss
指出是否忽略更新SQL Server資料庫時可能發生的資料遺失。
Type: | Boolean |
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 |
-LibraryResource
指定儲存在 Virtual Machine Manager (VMM) 程式庫中的資源。
Type: | CustomResource |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 物件的名稱。
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 |
-RollbackOnFailure
回復SQL Server資料庫更新失敗時所做的任何變更。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsAccount
指定執行身分帳戶,其中包含具有執行此動作許可權的認證。
Type: | VMMCredential |
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 |
-Scriptblock
將腳本區塊指定為腳本應用程式的字串。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScriptCommandSetting
指定指令碼命令設定物件。
Type: | SCScriptCommandSetting |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkipPolicyValidation
指出是否應該針對SQL Server資料庫進行原則驗證。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SQLAuthenticationType
指定SQL Server驗證類型。 此參數可接受的值為:
- SQLServerAuthentication
- WindowsAuthentication
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SQLDeploymentRunAsAccount
指定要用來與SQL Server部署通訊的執行身分帳戶。
Type: | VMMCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SQLInstanceName
指定SQL Server實例的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StandardInput
指定檔案的路徑,其中包含要搭配指令碼命令使用的標準輸入資訊。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSeconds
指定進程在逾時前等候的時間量,以秒為單位。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UninstallMode
指定卸載模式。 此參數可接受的值為:
- MakeUnmanaged
- DetachDatabase
- DropDatabase
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 |
輸出
ApplicationDeployment
此 Cmdlet 會傳回 ApplicationDeployment 物件。