Tried all the following. Some work some don't as far as the logoff operation
is concerned.
But no matter what, ALL will produce the prompt confirmation message,
If you reset this session, all users using this protocol will be logged
off, Continue (n=no)?
either halting execution of the script or at the end of the script, which
leaves a cmd open waiting for a user to confirm.
@echo on
rem cmd /q /c start logoff /server:cdvcxp01 3 <echo y
rem cmd /q /c start logoff /server:cdvcxp01 2 <echo y
rem cmd /q /c start logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
rem start /i /b logoff 3 /server:cdvcxp01 >nul
rem start /i /b logoff 2 /server:cdvcxp01 >nul
rem start /i /b logoff 1 /server:cdvcxp01 >nul
rem start /i logoff 3 /server:cdvcxp01 >nul
rem start /i logoff 2 /server:cdvcxp01 >nul
rem start /i logoff 1 /server:cdvcxp01 >nul
rem start /i /b logoff 4 /server:cdvcxp01
rem start /i /b logoff 3 /server:cdvcxp01
rem start /i /b logoff 2 /server:cdvcxp01
rem start /i /b logoff 1 /server:cdvcxp01
start /i logoff 4 /server:cdvcxp01
start /i logoff 3 /server:cdvcxp01
start /i logoff 2 /server:cdvcxp01
start /i logoff 1 /server:cdvcxp01
"Pegasus [MVP]" <> wrote in message
news:...
>
> "fan" <> wrote in message
> news:...
>> Does anyone know how to suppress confirmation prompts for commands in
>> Server 2008?
>>
>> I have used logoff with the session ID in a script/batch since NT4 and MS
>> seems to have changes Server 2008 to require confirmation. more of that
>> don't run with scissors safety stuff in Vista 
>>
>> The message displayed is:
>>
>> If you reset this session, all users using this protocol will be logged
>> off, Continue (n=no)?
>>
>> I've tried all the tricks from the past and they seem to be masked.
>>
>> One that works from the command line directly is the tried and true >nul,
>> however it doesn't work from within a .cmd
>>
>> logoff 1 /server:MYFILESERVER /v >nul
>>
>> Any clues?
>
> Let's have a look at the your batch file!
>