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 (294k 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 (290 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 (160 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 (680 points)
0 votes
1 answer

We are using the below snippet to grab the email of a single custom attribute object. Can I get guidance on the best way to modify this to get all the emails of each ... "The user specified in parameter 'MyParameter' has no email address. ", "Information") }

asked 2 days ago by msheppard (660 points)
3,589 questions
3,278 answers
8,303 comments
548,123 users