Poweshell: deploy App-v package: deadline is wrong

Hi,

I have this powershell-line to deploy an App-v package. Only thing is that the deployment time appears wrong. I just wanted to set the deployment deadline date to 2015/04/21 10:00 but it appears as 12:00 when used this Powershell line:

Start-CMApplicationDeployment -CollectionName $DeviceCollectionNameAppV -Name $FullAppVName -DeployPurpose $DeployPurpose -DeployAction Install -UserNotification DisplayAll -DeadlineDate $DeadlineDate -DeadlineTime $DeadlineTime -AvaliableDate $AvailableDate -AvaliableTime $AvailableTime


$Date = Get-Date -format "yyyy/MM/dd"
$Time = Get-Date -Format "h:mm"
$AvailableDate = "2015/04/20" #$Date
$AvailableTime = "21:00" #$Time
$DeadlineDate = "2015/04/21"
$DeadlineTime = "10:00"

Please advise.
J.

 

April 21st, 2015 10:32am

GMT / UTC issue?
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2015 11:38am

Yes indeed, but how can I make it work in Powershell? Iow, how can I set it correctly?
April 22nd, 2015 3:45am

Hello,

There should be a -TimeBaseOn switch, which can be set to "LocalTime" or "UTC". Could this be your solution?

  • Marked as answer by janhoedt 18 hours 14 minutes ago
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 4:01am

Thanks, it could be, but where/how would you implement it then?
April 22nd, 2015 5:20am

Is a parameter of your Start-CMApplicationDeployment cmdlet:

https://technet.microsoft.com/en-us/library/jj821911%28v=sc.20%29.aspx

  • Marked as answer by janhoedt 18 hours 15 minutes ago
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 8:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics