0 votes

Hi All, after the update to v.3.17.23627.0 some script in our enviroment doesn't works. Before the update all works.

below an example for condition true:

$FindNthDay='1'

$WeekDay='Sunday'

[datetime]$Today=[datetime]::NOW
$Today=$Today.AddDays(6)
$todayM=$Today.Month.ToString()
$todayY=$Today.Year.ToString()
[datetime]$StrtMonth=$todayM+'/1/'+$todayY

while ($StrtMonth.DayofWeek -ine $WeekDay ) { $StrtMonth=$StrtMonth.AddDays(1) }

#$StrtMonth.AddDays(7*($FindNthDay-1))
$datetopatch = '%datetime,+6d,00:00%'

$Context.ConditionIsMet = $StrtMonth.AddDays(7*($FindNthDay-1)) -eq $datetopatch

Can you help me?

ago by (500 points)
0

Hello Simone,

As per our check, the script works exactly as it is written. For troubleshooting purposes, please, describe the issue in all the possible details with live examples.

0

This is my schedule task running every Monday, after the update doesen't works. In the activity history there isn't log. If I trying to exclude the script 'Fourth Sunday of the month' the schedule works.

If the Organizational Unit is '(Prod_Critical)' AND script 'Fourth Sunday of the month' returns true

  $FindNthDay='4'

$WeekDay='Sunday'

[datetime]$Today=[datetime]::NOW
$todayM=$Today.Month.ToString()
$todayY=$Today.Year.ToString()
[datetime]$StrtMonth=$todayM+'/1/'+$todayY

while ($StrtMonth.DayofWeek -ine $WeekDay ) { $StrtMonth=$StrtMonth.AddDays(1) }

#$StrtMonth.AddDays(7*($FindNthDay-1))
$datetopatch = '%datetime,+6d,00:00%'

$Context.ConditionIsMet = $StrtMonth.AddDays(7*($FindNthDay-1)) -eq $datetopatch

then Execute custom command 'Windows_Servers_Patches_List (Reports)' for the organizational unit Run PowerShell script 'Server Prod Critical ITDEV' for the organizational unit Run PowerShell script 'Server Prod Critical SIAV\ITDEV' for the organizational unit Run PowerShell script 'ServerBelron All Domain Controllers - WAVE 2' for the organizational unit Run PowerShell script 'Remove File Patch' for the organizational unit

0

Hello Simone,

First of all, this script is different from the one you provided initially ($FindNthDay is set to 4 instead of 1). Also, we are not quite sure what exactly your intension is. Please, specify when exactly the script condition should be met.

Finally, the first condition in the scheduled task is not required. You just need to add only the Prod_Critical Organizational Unit to the Activity Scope.

0

OK, please restore what I wrote. I have a scheduled task that runs every Monday and that does not work after the last Adaxes update. The problem is this script condition, because if I exclude it, the whole process works. This is the condition that must work today, obviously depending on the week in which I have to run the processes the parameter $FindNthDay='X' changes:

 $FindNthDay='4'

$WeekDay='Sunday'

[datetime]$Today=[datetime]::NOW
$todayM=$Today.Month.ToString()
$todayY=$Today.Year.ToString()
[datetime]$StrtMonth=$todayM+'/1/'+$todayY

while ($StrtMonth.DayofWeek -ine $WeekDay ) { $StrtMonth=$StrtMonth.AddDays(1) }

#$StrtMonth.AddDays(7*($FindNthDay-1))
$datetopatch = '%datetime,+6d,00:00%'

$Context.ConditionIsMet = $StrtMonth.AddDays(7*($FindNthDay-1)) -eq $datetopatch
0

Hello Simone,

OK, please restore what I wrote

What exactly do you mean? We did not remove/hide anything you posted.

I have a scheduled task that runs every Monday and that does not work after the last Adaxes update

The only change was that now Adaxes uses PowerShell 7 instead of PowerShell 5. However, there does not seem to be a difference. Do we understand correctly that the script should return try in case the current day is the 4th (specified in variable $FindNthDay) Sunday (specified in variable $WeekDay) of the month?

Please log in or register to answer this question.

Related questions

0 votes
0 answers

Version: 3.3.8906.0 Release Date: December 06, 2012 You need to perform additional steps to preserve Approval Requests after upgrading to this version! For ... Fixed automatic value generation based on Property Pattern templates in Internet Explorer 9.

asked Dec 13, 2012 by Eugene Pavlov (18.0k points)
0 votes
1 answer

OS In-place upgrade with Adaxes software installed

asked Mar 15, 2024 by sra98a (120 points)
0 votes
0 answers

Hello, after upgrading to Adaxes 2023 we lost connection to Web Interface Configurator. Adaxes and Adaxes Web Interface are ok and users are able to login. URL http: ... went ok except I had to start manually Softerrra Adaxes service after restoring settings.

asked Nov 28, 2022 by juhota (230 points)
0 votes
1 answer

Hello all, first of all thanks for the great product. After updating to 3.17.23627.0 we have an issue with the managed domains in our webinterface. All our Admin ... managed domains properly. We would be thankful for an quick reply. Best regards Tim !

asked Apr 23 by Tim_Qvest (40 points)
0 votes
1 answer

We followed the upgrade instructions here: Adaxes Installation Guide We upgraded from 2023.2 to 2025.1 in a Single Server Configuration. -Backed up our configuration using the backup ... 2 on it that we saved before having to revert back that I can provide.

asked Apr 22 by cmosley (20 points)
3,688 questions
3,373 answers
8,531 comments
549,630 users