Last active
September 15, 2022 15:40
-
-
Save john-clark/5360694 to your computer and use it in GitHub Desktop.
windows deployment server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WDSServer\Providers\WDSTFTP] | |
"ReadFilter"=hex(7):2a,00,00,00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WDSServer\Providers\WDSTFTP] | |
"ReadFilter"=hex(7):5c,00,62,00,6f,00,6f,00,74,00,5c,00,2a,00,00,00,5c,00,74,\ | |
00,6d,00,70,00,5c,00,2a,00,00,00,62,00,6f,00,6f,00,74,00,5c,00,2a,00,00,00,\ | |
74,00,6d,00,70,00,5c,00,2a,00,00,00,00,00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
ECHO Before using this make sure all file types are allowed | |
ECHO Use clear-tftfpfilter.reg @ https://gist.github.com/john-clark/5360694/ | |
:: Command line error check: | |
IF "%1"=="" GOTO Syntax | |
:: Check default | |
IF "%1"=="default" GOTO ResetWDS | |
:: PROBABLY should put error checking here | |
:: to see if the file exists... oh well | |
:: The actual program: | |
ECHO. | |
wdsutil /set-server /bootprogram:%1 /architecture:x86 | |
wdsutil /set-server /N12bootprogram:%1 /architecture:x86 | |
wdsutil /set-server /bootprogram:%1 /architecture:x64 | |
wdsutil /set-server /N12bootprogram:%1 /architecture:x64 | |
GOTO End | |
:: Reset default settins | |
:ResetWDS | |
wdsutil /set-server /bootprogram:boot\x86\pxeboot.com /architecture:x86 | |
wdsutil /set-server /N12bootprogram:boot\x86\pxeboot.n12 /architecture:x86 | |
wdsutil /set-server /bootprogram:boot\x64\pxeboot.com /architecture:x64 | |
wdsutil /set-server /N12bootprogram:boot\x64\pxeboot.n12 /architecture:x64 | |
GOTO End | |
:: Restart WDS just incase | |
wdsutil /stop-server | |
wdsutil /start-server | |
:: Help screen: | |
:Syntax | |
ECHO. | |
ECHO SET-WDS-PXE.CMD 1.00 | |
ECHO Sets the file advertised by the Windows Deployment PXE Server that will be tftp'd | |
ECHO Written by John Clark (johnrclark3@gmail.com) | |
ECHO. | |
ECHO Usage: SET-WDS-PXE.CMD filename_name | |
ECHO. | |
ECHO You must specify filename_name with or without extension, | |
ECHO without a drive or path. Spaces or wildcards aren't allowed. | |
ECHO. | |
ECHO The default WDS folder will be used. IE: C:\WDS\ | |
ECHO. | |
ECHO Examples: SET-WDS-PXE.CMD default (restores WDS OEM defaults) | |
ECHO SET-WDS-PXE.CMD undionly.kpxe | |
ECHO SET-WDS-PXE.CMD sys\linux\pxelinux.0 | |
:End | |
ECHO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wdsutil /get-server /show:all /detailed |more | |
@pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the wrong way to do this...
pxe -> wds dhcp relay server file wdsnbp.com -> ipxe
the better way is to turn off the wds relay and use real dhcp setting to use wdsnbp.com if we want.