# How can I configure PSshutdown to log off users in AD?



## justcrash (Sep 24, 2008)

I was thinking maybe: 

psshutdown -o -t 19:00 -v 


but I am not sure if that is even close. If that IS it, how do I assign that to an OU?


----------



## settle (Jul 2, 2008)

Hi,
Here u go to logoff the users remotely. But you should be a member of doman admins then only it will work.

psshutdown -o -t 60 -f @hosts.txt

To get an brief idea on psshutdown look into the attachment...

Best of Luck


----------



## justcrash (Sep 24, 2008)

settle said:


> Hi,
> Here u go to logoff the users remotely. But you should be a member of doman admins then only it will work.
> 
> psshutdown -o -t 60 -f @hosts.txt
> ...


Thank you! So do I make that a .bat file? How do I schedule the log off for an OU in AD?


----------



## settle (Jul 2, 2008)

I don't think , we can use this for OU. 
You can specify the computer names what all computers you want to logoff from sessions by adding a perameter @computernames.txt.
For this you just have all the computernames in one text file and specify the file in the psshutdown command. As i given

psshutdown -o -t 60 -f @hosts.txt

Consider that hosts.txt is having the computernames.

Thanks,


----------



## settle (Jul 2, 2008)

yes, you can make a bat file. Put that whole command in bat file and schedule the batch file from your machine by going Control Panel --> Schedule Tasks. It will work buddy.

Thanks,


----------

