Set-SCApplicationDeployment
修改应用程序部署。
语法
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>]
说明
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 提示) 的性能和资源优化提示的 ID。 此参数允许审核 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
指示作业异步运行,以便控件立即返回到命令 shell。
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 对象。