Hi,
current situation
lastworking day from a given user is thursday and the account will be disabled on friday. with these 2 lines of code I can correctly build up the description field mentioning account disabled on $date and last working day is $lastworkday
[pre]
$date= Get-Date -Format “yyyy-MMM-dd”
$lastworkdate = (get-date).AddDays(-1).ToString(“yyyy-MMM-dd”)
[/pre]
However I’ve got to take into consideration that
- that user has a last working day on friday and when I run my script on my next working day which is monday my counter should say account disabled on Monday last working day on Friday
- in addition accounts may be disabled by someone in Israel (where their weekend is Friday saterday) so when this person does disable the account on Sunday the last workingday should be Friday as well
any Idea’s on how to incorporate this.