Page 1 of 1 1
Topic Options
#194529 - 2009-07-01 04:34 PM A simple question about @MaxPWage
DarrenH Offline
Fresh Scripter

Registered: 2009-06-26
Posts: 5
Loc: Tennessee
You have all been very helpful in the past. I hope this isn't too stupid, but does @Maxpwage and @pwage only work for the current user? I mean the one running the script. I have a script that notifies a manager when his employees passwords are going to expire. They are all show the same pwage. That may be the case, but I want to make sure. I don't want to be using my password age for every user!
Top
#194530 - 2009-07-01 04:48 PM Re: A simple question about @MaxPWage [Re: DarrenH]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Depends on how you wrote the script. But if you are using the builtin macros, then it would be of the current user running the script. If you are wantint to generate a report, you will have to connect to AD and read each of the users information and go from there.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#194532 - 2009-07-01 04:59 PM Re: A simple question about @MaxPWage [Re: Gargoyle]
DarrenH Offline
Fresh Scripter

Registered: 2009-06-26
Posts: 5
Loc: Tennessee
In the script I can show PasswordLastChanged, but I'm not sure how to do the math on mm/dd/yyyy hh:mm:ss to find what I need.
Top
#194535 - 2009-07-02 12:02 AM Re: A simple question about @MaxPWage [Re: DarrenH]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Have a look at the TimeDif() UDF. Easy in use and does exactly what you want/need.

TimeDiff() - calculate time difference between 2 timestamps

You can let it calculate the number of days between PasswordLastChanged from AD and today. If the outcome is more then X days send a notification the user's manager.

BTW: @ Glenn, there is a typo in title of the UDF. It says betweeen (three e’s).


Edited by Mart (2009-07-02 12:07 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#194536 - 2009-07-02 01:19 AM Re: A simple question about @MaxPWage [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
No there isn't (any more) ;\)

Thanks!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#194547 - 2009-07-02 12:58 PM Re: A simple question about @MaxPWage [Re: Glenn Barnas]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
Maybe he saw a mouse jump out of his rocket while he was typing it in?
\:\)

Top
#194592 - 2009-07-06 04:42 PM Re: A simple question about @MaxPWage [Re: BradV]
DarrenH Offline
Fresh Scripter

Registered: 2009-06-26
Posts: 5
Loc: Tennessee
Thanks. I think that will do it.
Top
#194593 - 2009-07-06 06:09 PM Re: A simple question about @MaxPWage [Re: DarrenH]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
@BradV, LOL!
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 515 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.06 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org