0 votes

Similar to Powershell's "whatif"?

I'd like to enable this scheduled task -

image.png

But would like to confirm who will actually be affected before enabling this.

Is there at least a way to add an action that outputs the name (or UPN) of all affected objects in the console log? I could run that before adding the 'modify' actions back.

by (210 points)

1 Answer

+1 vote
by (210 points)

Nevermind. Figured out a good enough solution. Replaced the 'modify' actions with run powershell script which contains just the following --

$Context.LogMessage("%userPrincipalName%", "Information")

Activity log then contains the list of affected users.

Related questions

0 votes
1 answer

The script create two reports of inactive workstation operating systems. The report is too detailed to run from one of the adaxes reports. Basically how can I set the script up to ... sure How I did this but I can't find it now (probably something simple).

asked Nov 30, 2022 by mightycabal (1.0k points)
0 votes
1 answer

Is there a way to have a Scheduled Task with 4 different condition? I want to create a scheduled task start every Monday and the condition see: The next Saturday of the week ... of the week is the fifth of the month then no action Thanks in advance, Simone

asked Jan 18, 2022 by Simone.Vailati (430 points)
0 votes
1 answer

When I enable a scheduled task, instead of running at the scheduled time they all run imeadiately. This is not good behavior as changes are written in a way to reflect the ... is being enabled. I am hoping there is a powershell command to stop this behavoir.

asked Jul 10, 2023 by mightycabal (1.0k points)
0 votes
1 answer

seting up a scheduled task to move users to thier correct OU. For some we can do this based on employee type and direct to a specific OU. For most of our users we will have to script this to move to the manager's OU.

asked Apr 12, 2023 by mightycabal (1.0k points)
0 votes
1 answer

I have a feild called Decommissioned Date and I can not figure out how to run a scheduled task the day after that date. So If an account got decommissioned today I want the task to run tomorrow.

asked Jan 9, 2020 by hgletifer (1.3k points)
3,508 questions
3,199 answers
8,152 comments
547,483 users