0 votes

I need to insert this condition:

# The condition is met if $Context.ConditionIsMet is set to $True.
# $Context.ConditionIsMet = $False

$day = Get-Date -UFormat %V

$Context.ConditionIsMet = (($day -eq 1)-or ($day -eq 5))

The %V form is not accept in adaxes but is correct in powershell. Any suggest? I need to get week number of month in gregorian calendar. Thanks in advance, Simone

by (430 points)

1 Answer

0 votes
by (270k points)
selected by
Best answer

Hello Simone,

The thing is that in Adaxes scripts the percent (%) character is considered to be the beginning or the end of a value reference. To achieve the desired, you need to double the character in your script. Finally, it should be as follows:

$day = Get-Date -UFormat %%V

$Context.ConditionIsMet = (($day -eq 1) -or ($day -eq 5))

Related questions

0 votes
1 answer

Let's say I have a Business Rule that is fired prior to adding members to a group. Is it possible to get the number of objects being added to that group as ... that tells me that 6 objects will be added or is each added user treated completely independently?

asked Apr 20, 2022 by ngb (220 points)
0 votes
1 answer

Hello, i have a custom command which sets the oof-message for the selected user. in this custom command i have a parameter "param-vertretung" (ad-object picker). Now i want to ... and email of the stand-in in the oof-message. Can you help me with that? Thanks

asked Nov 13, 2020 by lohnag (140 points)
0 votes
1 answer

I'm attempting to build a custom PS command that will return the number of mailboxes per database in our Exchange 2010 environment. This is the script I'm using which works ... -Database $_.Name).Count} How can I make this work through Adaxes Custom Command?

asked Dec 7, 2012 by mdeflice (350 points)
+1 vote
1 answer

Hello I have two questions about date field in the the web GUI. Is it possible to determine the first day of the week? In my case Monday should be the first day of ... allow change time". I have not found this in the web configurator. thx & regards pudong

asked Jul 8, 2022 by pudong (670 points)
0 votes
0 answers

Over the last day or so we have been seeing this pop up under the exchange header in adaxes portal. cmdlet Get-CASMailbox is not present in the role definition of the current user

asked Jul 3, 2023 by Jeff.Briand (60 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users