kennysarmy Posted March 22, 2007 Posted March 22, 2007 I have found and adapted a script.... Wondered if those with more scripting knowledge than me can cast their eye over it and see if there is any reason why this should nt work.... @echo off setlocal for /f "Tokens=1" %%c in ('net view^|Find "\\"') do ( for /f "Tokens=1,2*" %%i in ('psloggedon -L %%c^|find "/"') do ( if /i "%%c" EQ "\\%ComputerName%" PsShutdown -s -c -t 60 -f %%c ) ) endlocal Thanks.
ChrisH Posted March 22, 2007 Posted March 22, 2007 Please do not cross post. I have deleted your other post.
kennysarmy Posted March 23, 2007 Author Posted March 23, 2007 Sorry posted then spotted this scripting forum.....very confusing with so many forums....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now