![]() |
| |||||||
| Notices |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| hello, I have a script that runs when a user logs in that checks to see whether they are logged in already somewhere else by keeping track of the workstation name in a custom attribute I created in AD. Based on the logic I use if the user is being detected as having logged in somewhere already they are immediately logged off using WMI's opsys.win32shutdown class. I just simply use the EWX_LOGOFF flag and it works great. Unfortunately with strict government requirements that I have to follow I also have to restrict administrators to this same situation which in and of itself isn't difficult to do until this script attempts to log them off of a domain controller if a DC happens to be their 2nd logon attempt. I get an error on the opsys.win32shutdown line when the script runs on a domain controller and it won't log the user off then. I tried using the FORCE flag but that didn't help. From what I've read it is possible to reboot *any* machine this way but is it not possible to log someone off a domain controller this way? The error code I get back is 80041001 which is one of the generic errors that is of no help whatsoever. thanks | Guest
Posts: n/a
|
|
| | #2 (permalink) | |
| Brandon McCombs wrote: Quote:
See if adding some additional privileges helps: sComputer = "." Set oWMI = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,(Shutdown,RemoteS hutdown,Debug)}!\\" _ & sComputer & "\root\cimv2") -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scr...r/default.mspx | Guest
Posts: n/a
| |
|
| | #3 (permalink) | ||
| "Torgeir Bakken (MVP)" wrote: Quote:
be the same for the workstaitons as the server I don't see why I would need to do any impersonation to log a user off of a domain controller. I should have been getting different errors as well if it was a permission issue, instead I was getting a general error that was of no help. Any other ideas? Is it even possible to run win32shutdown with EWX_LOGOFF to log someone off of a domain controller? | Guest
Posts: n/a
| ||
|
| | #4 (permalink) | ||
| "Torgeir Bakken (MVP)" wrote: Quote:
and it seems that rebooting and shutting down a domain controller works just fine but the damn logoff does not work on a DC which is of course the functionality I need. WHy wouldn't a logoff with the same script work on a workstation but not on a DC and is there a workaround to log someone off of a domain controller automatically that can not be cancelled? thanks | Guest
Posts: n/a
| ||
|
![]() |
| Tags |
| None |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Games-USB( xBox - PS2) controllers | Jeff | Windows Vista Games | 1 | 01-29-2007 05:17 PM |
| HP LaserJet 1010 don't work in Vista since Beta2 - Advanced 1384 Printing Support drivers for XP don't work | Alexey | Windows Vista Printers & Scanners | 2 | 10-19-2006 12:05 AM |
| sis storport ahci controllers | tomhyde2 | Windows Vista Hardware & Devices | 0 | 06-09-2006 07:45 PM |
| MS Sidewiner Game Controllers | Adahn | Windows Vista Hardware & Devices | 4 | 03-09-2006 06:38 PM |
| Support for AHCI/RAID SATA 2 HDD controllers? | Andre Da Costa [Extended64] | Windows Vista Hardware & Devices | 1 | 03-04-2006 03:47 PM |