Showing archive results for 2005

Jan 5, 2005
Post comments count0
Post likes count0

How Can I Prompt a User to Delete (or Not Delete) a Computer Account?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I delete a computer account from Active Directory, but provide a Yes/No prompt to the user before the account is actually deleted?-- NM Hey, NM. Let’s start by showing you how to delete a computer account from Active Directory. But don’t worry; that won’t take long. In fact, it only takes two lines of code:Set objComp...

Scripting Guy!VBScriptActive Directory
Jan 4, 2005
Post comments count0
Post likes count0

How Can I Return Only the Last Record Written to an Event Log?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I read only the last record written to an event log? In other words, what is the WMI equivalent to the SQL statement Select Top 1?-- KM Hey, KM. Well, as it turns out WMI doesn’t have an equivalent to the Select Top command; for better or worse, the WMI Query Language (WQL) has only a small subset of the commands foun...

Scripting Guy!VBScriptLogs and monitoring
Jan 3, 2005
Post comments count0
Post likes count0

How Can I Determine the Account a Process is Running Under?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’ve got a script that returns information about all the processes running on a computer, except I can’t seem to figure out how to get the name of the user account that these processes are running under. Can you help?-- DL Hey, DL. Yes, we can help. It’s actually fairly easy to determine which account a process is running und...

Scripting Guy!VBScriptoperating system