Microsoft
Software
Hardware
Network
Question : VBS Count Down Date Script that will Lock User AD Account
I need to add the code that will count down the date from one or two weeks in the MsgBox then lock the user AD account when the date expires.
Dim objSysInfo ,objUser ,strwWWHomePage,strUserDN,
ppt, strMbox
Set objSysInfo = CreateObject("ADSystemInfo
")
strUserDN = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUserDN)
' Enable error handling
On Error Resume Next
' First command resets the value of the variable to ""
' Second attempts to set it with the value form AD
' If the second fails the variable will still be set to ""
strwWWHomePage = "" : strwWWHomePage = objUser.Get("wWWHomePage")
' Disable error handling
On Error Goto 0
' Test the value in the variable
If strwWWHomePage = "" Then
Set ppt = CreateObject("PowerPoint.A
pplication
")
strMbox = MsgBox("You have X days to complete this mandatory training or your account will be locked. Click OK to start PowerPoint presentation")
ppt.Visible = True
ppt.Presentations.Open "\\serverxx\tracking\ppt.p
psx"
Else
wscript.quit
End If
Answer : VBS Count Down Date Script that will Lock User AD Account
Someone has changed the ownership of the file so that it doesn't belong to you anymore. You need one of the admins with 'root' privileges to change it back.
Random Solutions
Is there a tool to check to see who has enabled auto-forward in outlook
In Perl, how do I check if a value already exist in the database
Cisco VPN client for Windows, use both RSA SecurID soft token and hard token
Datareader.Read() does not pull the required rows
SPContext.Current is returning null in the "SPItemEventReceiver" event handler.
How do I write data to separate excel worksheets in coldfusion?
Ex2010 - Move Mailbox Failed - Corrupt Messages
setup Xsan with couple of Apple macs final cut pro
Coldfusion - SQL syntax
How to block Remote Desktop to other domain admins on a particular server