这篇 KB 是非常有用的,一些正在对 Windows Server 2008 进行技术评估和测试的用户,如果60天的评估期限并不能满足您,那么微软现在提供了扩展评估期限的办法。
在安装 Windows Server 2008 时不要键入授权号,直接选择版本进行安装,安装完毕后进入系统我们可以使用“slmgr.vbs -dli”来检查剩余的评估期限。
如果评估期限即将结束,我们可以使用“slmgr.vbs –rearm”来扩展评估期限。
那么我们该如何使用任务计划来帮助我们自动进行评估期限的扩展呢?微软也已 经提供了完整的解决办法。
首先将如下代码保存为一个 xml 文件:
在安装 Windows Server 2008 时不要键入授权号,直接选择版本进行安装,安装完毕后进入系统我们可以使用“slmgr.vbs -dli”来检查剩余的评估期限。
如果评估期限即将结束,我们可以使用“slmgr.vbs –rearm”来扩展评估期限。
那么我们该如何使用任务计划来帮助我们自动进行评估期限的扩展呢?微软也已 经提供了完整的解决办法。
首先将如下代码保存为一个 xml 文件:
<?
xml
version
="1.0"
encoding
="UTF-16"
?>
< Task version ="1.2" xmlns ="http://schemas.microsoft.com/windows/2004/02/mit/task" >
< RegistrationInfo >
< Date >2007-09-17T14:26:04.433 </ Date >
< Author >Microsoft Corporation </ Author >
</ RegistrationInfo >
< Triggers >
< TimeTrigger id ="18c4a453-d7aa-4647-916b-af0c3ea16a6b" >
< Repetition >
< Interval >P59D </ Interval >
< StopAtDurationEnd >false </ StopAtDurationEnd >
</ Repetition >
< StartBoundary >2007-10-05T02:23:24 </ StartBoundary >
< EndBoundary >2008-09-17T14:23:24.777 </ EndBoundary >
< Enabled >true </ Enabled >
</ TimeTrigger >
</ Triggers >
< Principals >
< Principal id ="Author" >
< UserId >domain\alias </ UserId >
< LogonType >Password </ LogonType >
< RunLevel >HighestAvailable </ RunLevel >
</ Principal >
</ Principals >
< Settings >
< IdleSettings >
< Duration >PT10M </ Duration >
< WaitTimeout >PT1H </ WaitTimeout >
< StopOnIdleEnd >true </ StopOnIdleEnd >
< RestartOnIdle >false </ RestartOnIdle >
</ IdleSettings >
< MultipleInstancesPolicy >IgnoreNew </ MultipleInstancesPolicy >
< DisallowStartIfOnBatteries >true </ DisallowStartIfOnBatteries >
< StopIfGoingOnBatteries >true </ StopIfGoingOnBatteries >
< AllowHardTerminate >true </ AllowHardTerminate >
< StartWhenAvailable >false </ StartWhenAvailable >
< RunOnlyIfNetworkAvailable >false </ RunOnlyIfNetworkAvailable >
< AllowStartOnDemand >true </ AllowStartOnDemand >
< Enabled >true </ Enabled >
< Hidden >false </ Hidden >
< RunOnlyIfIdle >false </ RunOnlyIfIdle >
< WakeToRun >true </ WakeToRun >
< ExecutionTimeLimit >P3D </ ExecutionTimeLimit >
< DeleteExpiredTaskAfter >PT0S </ DeleteExpiredTaskAfter >
< Priority >7 </ Priority >
< RestartOnFailure >
< Interval >PT1M </ Interval >
< Count >3 </ Count >
</ RestartOnFailure >
</ Settings >
< Actions Context ="Author" >
< Exec >
< Command >C:\Windows\System32\slmgr.vbs </ Command >
< Arguments >-rearm </ Arguments >
</ Exec >
< Exec >
< Command >C:\Windows\System32\shutdown.exe </ Command >
< Arguments >/r </ Arguments >
</ Exec >
</ Actions >
</ Task >
< Task version ="1.2" xmlns ="http://schemas.microsoft.com/windows/2004/02/mit/task" >
< RegistrationInfo >
< Date >2007-09-17T14:26:04.433 </ Date >
< Author >Microsoft Corporation </ Author >
</ RegistrationInfo >
< Triggers >
< TimeTrigger id ="18c4a453-d7aa-4647-916b-af0c3ea16a6b" >
< Repetition >
< Interval >P59D </ Interval >
< StopAtDurationEnd >false </ StopAtDurationEnd >
</ Repetition >
< StartBoundary >2007-10-05T02:23:24 </ StartBoundary >
< EndBoundary >2008-09-17T14:23:24.777 </ EndBoundary >
< Enabled >true </ Enabled >
</ TimeTrigger >
</ Triggers >
< Principals >
< Principal id ="Author" >
< UserId >domain\alias </ UserId >
< LogonType >Password </ LogonType >
< RunLevel >HighestAvailable </ RunLevel >
</ Principal >
</ Principals >
< Settings >
< IdleSettings >
< Duration >PT10M </ Duration >
< WaitTimeout >PT1H </ WaitTimeout >
< StopOnIdleEnd >true </ StopOnIdleEnd >
< RestartOnIdle >false </ RestartOnIdle >
</ IdleSettings >
< MultipleInstancesPolicy >IgnoreNew </ MultipleInstancesPolicy >
< DisallowStartIfOnBatteries >true </ DisallowStartIfOnBatteries >
< StopIfGoingOnBatteries >true </ StopIfGoingOnBatteries >
< AllowHardTerminate >true </ AllowHardTerminate >
< StartWhenAvailable >false </ StartWhenAvailable >
< RunOnlyIfNetworkAvailable >false </ RunOnlyIfNetworkAvailable >
< AllowStartOnDemand >true </ AllowStartOnDemand >
< Enabled >true </ Enabled >
< Hidden >false </ Hidden >
< RunOnlyIfIdle >false </ RunOnlyIfIdle >
< WakeToRun >true </ WakeToRun >
< ExecutionTimeLimit >P3D </ ExecutionTimeLimit >
< DeleteExpiredTaskAfter >PT0S </ DeleteExpiredTaskAfter >
< Priority >7 </ Priority >
< RestartOnFailure >
< Interval >PT1M </ Interval >
< Count >3 </ Count >
</ RestartOnFailure >
</ Settings >
< Actions Context ="Author" >
< Exec >
< Command >C:\Windows\System32\slmgr.vbs </ Command >
< Arguments >-rearm </ Arguments >
</ Exec >
< Exec >
< Command >C:\Windows\System32\shutdown.exe </ Command >
< Arguments >/r </ Arguments >
</ Exec >
</ Actions >
</ Task >
本文转自 苏繁 51CTO博客,原文链接:http://blog.51cto.com/goxia/221562,如需转载请自行联系原作者