Update-ServiceTemplate

更新服务实例
1: Update a service by using conventional servicing.
PS C:\> $Service = Get-SCService -Name "Service01"
PS C:\> $SvcTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $PendingTemplate = New-SCServiceTemplate -ServiceTemplate $SvcTemplate -Name "ServiceTemplate01" -Release "RTM"
PS C:\> Set-SCService -Service $Service -PendingServiceTemplate $PendingTemplate
PS C:\> Update-SCService -Service $Service
The first command gets the service object named Service01, which is a deployed service, and stores the object in the $Service variable.

The second command gets the service template object named ServiceTemplate01 and stores the object in the $SvcTemplate variable.

The third command creates an RTM release of the service template stored in $SvcTemplate.

The fifth command sets the pending template on the service instance to the updated service template stored in $PendingTemplate.

The last command updates Service01.
2: Update a service by using image-based servicing.
PS C:\> $Service = Get-SCService -Name "Service02"
PS C:\> $SvcTemplate = Get-SCServiceTemplate -Name "ServiceTemplate02"
PS C:\> $PendingTemplate = New-SCServiceTemplate -ServiceTemplate $SvcTemplate -Name "ServiceTemplate02" -Release "RTM"
PS C:\> $WebTier = Get-SCComputerTierTemplate -ServiceTemplate $PendingTemplate -Name "Web Tier"
PS C:\> $WebTemplate = Get-SCVMTemplate -ComputerTierTemplate $WebTier | Set-SCVMTemplate -MemoryMB 2048
PS C:\> $BaseDisk2 = Get-SCVirtualHardDisk -Name "Win2k8R2BaseDisk_Patched.vhd"
PS C:\> $VHD = Get-SCVirtualDiskDrive -VMTemplate $WebTemplate 
PS C:\> Remove-SCVirtualDiskDrive -VirtualDiskDrive $VHD
PS C:\> New-SCVirtualDiskDrive -VirtualHardDisk $BaseDisk2 -VMTemplate $WebTemplate -BootVolume -SystemVolume -Bus 0 -LUN 0 -ide -VolumeType BootAndSystem
PS C:\> Set-SCService -Service $Service -PendingServiceTemplate $PendingTemplate 
PS C:\> Update-SCService -Service $Service
The first command gets the service object named Service02 and stores the object in the $Service variable.

The second command gets the service template object named ServiceTemplate02 and stores the object in the $SvcTemplate variable.

The third command creates a new release of the service template stored in $SvcTemplate, names it ServiceTemplate02, gives it a release of RTM and stores the template in $PendingTemplate.

The fourth command gets the computer tier object named Web Tier for the service template stored in $PendingTemplate and stores the object in the $WebTier variable.

The fifth command adds memory to the virtual machine template for the computer tier stored in $WebTier.

The sixth command gets the virtual hard disk object named Win2k8R2BaseDisk_Patched.vhd and stores the object in the $BaseDisk2 variable. This virtual hard disk contains an updated version of the operating system.

The seventh command gets the virtual disk drive object on the virtual machine template stored in $WebTemplate and stores the object in the $VHD variable.

The eighth command removes the virtual disk drive object stored in $VHD.

The ninth command adds the virtual hard disk object stored in $BaseDisk2 to the virtual machine template object stored in $WebTemplate.

The tenth command sets the pending template on the service instance to the updated service template stored in $PendingTemplate.

The last command updates Service02.


From:http://systemscenter.ru/vmm2012cmdlets.en/Update-SCService.html
D:\project\vue-admin-template-master>npm run dev > vue-admin-template@4.4.0 dev > vue-cli-service serve Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme INFO Starting development server... 10% building 2/2 modules 0 activeError: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:79:19) at Object.createHash (node:crypto:139:10) at module.exports (D:\project\vue-admin-template-master\node_modules\webpack\lib\util\createHash.js:135:53) at NormalModule._initBuildHash (D:\project\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:417:16) at handleParseError (D:\project\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:471:10) at D:\project\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:503:5 at D:\project\vue-admin-template-master\node_modules\webpack\lib\NormalModule.js:358:12 at D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:373:3 at iterateNormalLoaders (D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:214:10) at iterateNormalLoaders (D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:221:10) at D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:236:3 at runSyncOrAsync (D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:130:11) at iterateNormalLoaders (D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:232:2) at Array.<anonymous> (D:\project\vue-admin-template-master\node_modules\loader-runner\lib\LoaderRunner.js:205:4) at Storage.finished (D:\project\vue-admin-template-master\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16) at D:\project\vue-admin-template-master\node_mo
03-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值