Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created a new "File Screen" under Windows 2008R2 File Screening Management (part of Administrative Tools / File Server Resource Manager )

In the properties of this File Screen, I'd like to use the "Command" tab to invoke a script, and pass the offending screened file spec to the script as a command line argument.

Firstly I can't seem to get it to invoke my .CMD script, and secondly I cannot find any documentation on what, if any, variables I can pass to the command line.

Would anyone who has used the Command tab successfully care to share some hints or tips on how to make effective use of this?

(I can use the Email tab fine, so for now my Screen sends an email, but I'm keen to get the command tab figured out)

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I mostly do it this way:

%windir%\system32\cmd.exe "batch.cmd"

Or Powershell

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe "script.ps1"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.