none
MDT netsh command RRS feed

  • Question

  • <settings pass="specialize">

    <component name="Microsoft-Windows-Deployment"....>

    I'm having problem with this section...it's not working at all MDT found error

    <RunSynchronousCommand wcm:action="add">
                        <Description>EnnFirew</Description>
                        <Order>8</Order>
                        <Path>cmd /c netsh advfirewall firewall set rule group="Bureau à distance" new enable=Yes</Path>
                    </RunSynchronousCommand>

    What could be the problem? wrong settings pass? wrong command? If i type that in a cmd it works... 

    netsh advfirewall firewall set rule group="Bureau à distance" new enable=Yes

    Thanks



    • Edited by JFMichaud Thursday, December 12, 2013 2:35 AM off word is not in the real xml...
    Wednesday, December 11, 2013 7:34 PM

Answers

  • How do you know it didn't work? Was there an error? What did the error say? Did it occur during Windows Setup? Did you check the Panther Logs? Why are there four instances of the word "off" in your XML example above, they don't appear to be legal XML. Is the problem because of something within the Unattend.xml file, or because of some error within netsh.exe

    I typically do not recommend modifying the unattend.xml file in MDT. Instead you can add the command to the MDT task sequence during the State Restore phase.

    ALso, I recommend adding some "logging" to your commands, this may help determine where the error occurred.

    cmd.exe /c netsh advfirewall set rule group="Remote Desktop" new enable > %temp%\netsh_rd.log 2>&1


    Keith Garner - keithga.wordpress.com

    Thursday, December 12, 2013 1:33 AM
    Moderator

All replies

  • How do you know it didn't work? Was there an error? What did the error say? Did it occur during Windows Setup? Did you check the Panther Logs? Why are there four instances of the word "off" in your XML example above, they don't appear to be legal XML. Is the problem because of something within the Unattend.xml file, or because of some error within netsh.exe

    I typically do not recommend modifying the unattend.xml file in MDT. Instead you can add the command to the MDT task sequence during the State Restore phase.

    ALso, I recommend adding some "logging" to your commands, this may help determine where the error occurred.

    cmd.exe /c netsh advfirewall set rule group="Remote Desktop" new enable > %temp%\netsh_rd.log 2>&1


    Keith Garner - keithga.wordpress.com

    Thursday, December 12, 2013 1:33 AM
    Moderator
  • It didn't work cause i see it not enabled..it's not a error but the command don't work 

    so no where i see error just that the command seems not to execute

    i've corrected the "off" in the prod xml there is no off word...it was juste for me to know that command don't work and is not executed

    i'll try that... thanks

    cmd.exe /c netsh advfirewall set rule group="Remote Desktop" new enable > %temp%\netsh_rd.log 2>&1
    Thursday, December 12, 2013 2:42 AM