In this section you find technical references for command line setup, 2PXE Console Commands, as well as reference documentation of the 2PXE Config file
Loading...
Loading...
Loading...
All 2PXE Service configuration is done through the 2Pint.2PXE.Service.exe.config file which is located in the 2PXE installation folder. Changes are not reflected until the service is restarted so please remember to start and stop after changes are made.
Note: Copying from word can bring the wrong type of “” quote signs, so don’t copy the quote signs into the config file.
The 2Pint.2PXE.Service.exe.config file has the following for configuration options, not all settings work together, so some basic logic needs to be applied. See the table at the end of this section.
EnablePowerShellExtension
Enables the PowerShell Extension, allow control of the boot process via the PowerShell script specified in the PowerShellExtenstionScript below. This will move over the boot object to PowerShell which will return the correct actions for the machine booting via the PowerShell script.
Value: ”0” to disable and ”1” to enable.
EnableSCCMExtension
Enables the SCCM Extension, can be used in conjunction with the PowerShell Extension. This requires the service to be installed on a SCCM Distribution Point and that you have access to the Site Server via the correct group membership.
Value: ”0” to disable and ”1” to enable.
EnableSCCMSQLConnection
Specifies to use a SQL connection to the Configuration Manager Database and boots the boot.wim images directly from the DP. If you don’t use this option 2PXE will use HTTP to get the boot request just like the Configuration Manager PXE Service Point and can only return one boot image per client. So SQL connection is recommended for Configuration Manager integration. Then you get the full fancy menu
Value: ”0” to disable and ”1” to enable.
ConfigMgrSQLConnectionString
Connection string to the Configuration Manager database. This is used when the SQL Connection is used by setting the EnableSCCMSQLConnection value set to 1. To allow access to the DB, add the machine account of the 2PXE server to the local group ConfigMgr_DViewAccess on the site server. Or define a separate login if you want to.
The format of the string is a typical .Net connection string URI so port and other items can be specified. For more information please refer to: https://msdn.microsoft.com/en-us/library/vstudio/system.data.sqlclient.sqlconnection.connectionstring(v=vs.100).aspx
Value: "Data Source=<ServerName>;database=<DatabaseName>;Integrated Security=True"
EnableSCCMUnknownMachinesSupport
Support unknown machine support in SCCM. On/Off. Simple as that. Imagine if all settings were this easy?
Value: ”0” to disable and ”1” to enable.
EnableSCCMMenuCountdown
Sets the countdown for when only non-mandatory (optional) task sequences are targeting the computer. After countdown the computer exits to next boot device on the computer. A value of ”0” (zero) disables this feature and the menu will prompt until a task sequence is selected. Value in milliseconds but keep the value above ”1000” otherwise it might fail.
Value: ”0” to disable and boot last deployed mandatory TS and above “1000” to enable and wait 1 second, “3000” waits for 30 seconds etc.
EnableSCCMMandatoryCountdown
Sets the countdown when one or multiple mandatory task sequence deployments are targeting the computer. A value of -1 (minus one) disables this feature and the menu will prompt until a task sequence is selected. A value of ”0” (zero) disables this feature and the computer will boot the mandatory task sequence targeted deployment with the highest deployment creation time, just like Configuration Manager does with the PXE Service Point. Value in milliseconds, zero or -1.
Value: “0” to disable and boot last deployed targeting mandatory TS and above 1000 to enable, set to -1 to disable completely and prompt the user for selection.
SCCMReportState
Instructs 2PXE to send state messages to Configuration Manager for mandatory deployments. 1 to send, 0 to not send. Set this to 0 when using a Rubicon step in the task sequence to set the PXE flag.
Value: ”0” to disable and ”1” to enable.
EnableiPXEBootLoaders
Specifies to use iPXE boot loaders instead of any Windows boot loader. When used iPXE boots the boot.wim images directly from the DP, when using SCCM and from HTTP server when using the PowerShell or default request handler. iPXE uses HTTP instead of TFTP from the RemoteInstall Directory.
Value: ”0” to disable and ”1” to enable.
iPXEF12PromptTimeout
How long is the timeout for the F12 notification for iPXE loaders for non-mandatory deployments in milliseconds. E.g. 10000 = 10 seconds
Value: ”nnnnnnn” milliseconds
UseEmbeddedBootSDI
Specifies to use an embedded boot.sdi image inside the boot.wim file under the \sms\boot\boot.sdi folder. This is always present in Configuration Manager images, so then 2PXE always uses embedded boot.sdi file regardless of this setting. For non-Configuration Manager installations, you may use a default WinPE image, and this file is not present unless added. If you cannot add this file to the boot.wim make sure this value is set to "0".
Value: ”0” to disable and ”1” to enable.
wimbootParams
Specifies the command line to wimboot, possible parameters are: gui, pause, pause=quiet, rawbcd, index=x For details see: http://ipxe.org/appnote/wimboot_architecture
Value: ”gui”
EnableiPXEAnywhereWebService
Specifies to use iPXE Anywhere Web Service.
Value: ”0” to disable and ”1” to enable.
iPXEAnywhereWebServiceURI
Specifies the address port to the iPXE Anywhere Web Service. Please see the iPXE Anywhere Web Service information on how to configure this.
Value: ”http:// ipxe.webservice.local:8051”
RemoteInstallPath
Specifies the path to the RemoteInstall folder that contains boot files and images. It will be created if it doesn't already exist. You should always enter a local path, and can use environment variables. Sub-directories Boot, Tmp and Sources must be present immediately below this folder or they will be created by the service, so ensure you specify a path to which the service account has access.
Value: “%PROGRAMDATA%\2Pint Software\2PXE\RemoteInstall”
PowerShellExtensionAllowBootScript
Specifies the path to the PowerShell script that manages reply to the client, if any. Note that this script does not return the boot image itself, and that this script can run multiple times per boot of each client. This will only return true or false and then the initial loader will contact the PXE server again with architecture info etc. It will not be created if it doesn't already exist. You should always enter a local path, or use environment variables for a local path.
Value: “%PROGRAMDATA%\2Pint Software\2PXE\PowerShellExtensionAllowBoot.ps1”
PowerShellExtensionBootImagesScript
Specifies the path to the PowerShell script that manages reply, boot files and images. It will not be created if it doesn't already exist. You should always enter a local path, or use environment variables.
Value: “%PROGRAMDATA%\2Pint Software\2PXE\PowerShellExtensionBootImages.ps1”
EnableDebugLog
Set EnableDebugLog to "1" to enable logging to the file specified in DebugLogPath.
Value: ”0” to disable and ”1” to enable.
DebugLogPath
This log will be fairly verbose, so remember to set it to "0" to switch it off afterwards. Errors and warnings will always be logged to the 2PXE event log. Ensure that the service account has access to the path if no log is appearing.
Value: "%PROGRAMDATA%\2Pint Software\2PXE\2PXE.log"
RunHttpServer
2PXE has a built-in Web Service for iPXE integration. You can switch it off by setting the value to "0" below, for instance if you have your own iPXE Anywhere Web Service server this is not needed. The HTTP WCF service only allow access to files under the RemoteInstall directory, and cannot transfer files outside this location.
Value: ”0” to disable and ”1” to enable.
RunOnHttpPort
Sets the port for the 2PXE http WCF service to a unique value.
Value: "8050" or any other value.
RunOnDhcpPort
By default, 2PXE answers on both the DHCP (67) port and PXE (4011) port. You can control this by setting the values to "0" for off or "1" for on below, for instance if this machine also acts as a DHCP server.
Value: ”0” to disable and ”1” to enable.
RunOnPxePort
By default, 2PXE answers on both the DHCP (67) port and PXE (4011) port. You can control this by setting the values to "0" for off or "1" for on below, for instance if this machine also acts as a DHCP server.
Value: ”0” to disable and ”1” to enable.
RunTftpServer
2PXE has a built-in TFTP server, written by Jean-Paul Mikkers. You can switch it off by setting the RunTftpServer value to "0" below, for instance if you have your own TFTP server.
Value: ”0” to disable and ”1” to enable.
TftpFilter
These are the folders beneath RemoteInstallPath that the TFTP server will serve files from. Specify one or more relative wildcard paths separated by semi-colon.
Value: "boot\*;\tmp\*;\boot\*;tmp\*;\Sources\*;Sources\*"
TftpBlockSize
Tweak the values below to decrease image download times. Note that PXE BIOS, routers and other network equipment may limit these settings further. Set TftpBlockSize to 512, 1024, 1456, 2048, 4096, 8192 or 16384. Default value is 1456.
Value: ”4096” to set the block size to 4096.
TftpWindowSize
Tweak the values below to decrease image download times. Note that PXE BIOS, routers and other network equipment may limit these settings further. Set TftpWindowSize to the number of packets to send without waiting for acknowledgement. Maximum is 32, default is 1.
Value: ”16” to set to the recommended value of 16 which works on most HW.
EnableiPXEAnywhereWebService
Specifies to use iPXE Anywhere Web Service.
Value: 0 to disable, 1 to use reporting functionality only, 2 to move the entire request over to the web service + reporting. 3 is 1+2 and the ability to execute cmdline from iPXE WS in WiNPE
BootRequest = 1,
Syslog = 2, <- Using the resolved IPv4 Addresss of the iPXE Anywhere Web Service unless overridden by adding the <add key="iPXEAnywhereWebServiceIP" value="192.168.xxx.yyy"/> setting in this config.
ReportBootConfiguration = 4,
ReportDLStart = 8,
ReportDLComplete = 16,
ReportDLBoot = 32,
RunCmdLineWinPE = 64
A value of 62 (2+4+8+16+32 = 62) Gives you all but BootRequest and RunCmdLineWinpE.
For iPXE and StifleR Integration requires a minimum of; 2+4+8+16+32 = 62
iPXEAnywhereWebServiceURI
Specifies the address and port to the iPXE Anywhere Web Service. Please see the iPXE Anywhere Web Service information on how to configure this.
Value: "http://"/
Username
Username and domain name to use to access content in form of DOMAIN\Username, password is stored in the Password.config file in the same folder as the config file.
Value: [%USERDOMAIN]\[%USERNAME]"
FWTFTP
Set to 1 to create the Port 69 UDP Firewall exception as service startup
Value: ”0” to disable and ”1” to enable.
FWDHCP
Create the Port 67 UDP Firewall exception as service startup
Value: ”0” to disable and ”1” to enable.
FWPROXYDHCP
Create the Port 4011 UDP Firewall exception as service startup
Value: ”0” to disable and ”1” to enable.
FWHTTP
Create the Port 8050 TCP Firewall exception as service startup
Value: ”0” to disable and ”1” to enable.
BindToIP
When using high performance option, the underlying class does not know the route of the UDP packet, hence it needs an address to send back data from. Specify an IP address local to the machine (NIC) to use to send UDP packets from.
Value: Set to the IP address as required
UseHighPerformanceRestartableThreads
Better thread management for large organizations that do a lot of PXE requests, this requires BindToIP setting to be set.
Value: ”0” to disable and ”1” to enable.
The following list can be used to find supported and unsupported configuration combinations in this release, green indicating the “really” supported scenarios that we would like people to test:
The preceding table shows the different valid options, if you are unsure of your scenario, please contact support@2pintsoftware.com.
x86WinPEShlConfiguration and x64WinPEShlConfiguration
The x86 and x64 WinPEShlConfiguration options can be used to launch additional commands after WinPE has been downloaded, but before we hand over control to the ConfigMgr OSD Client. This is commonly used to launch custom frontends etc. Below is an example on how to launch a command prompt.
Value: Text string, can be broken up in multiple lines for readability.
[LaunchApps] %SYSTEMDRIVE%\sms\bin\x64\TsProgressUI.exe,/register:winpe %windir%\system32\wpeutil.exe,InitializeNetwork %windir%\system32\iPXEWinPEClient.exe,/SkipNetworkInit %windir%\system32\cmd.exe /c start Custom_Pause /wait cmd %SYSTEMDRIVE%\sms\bin\x64\TsBootShell.exe
iPXE includes an interactive command line that can be used for manual booting and for diagnosing problems. Commands can also be used as part of an iPXE script, or to build a custom menu.
The following commands are supported by iPXE.
The following commands are supported by iPXE.
autoboot - Boot system from network interface
ifstat - Display interfaces ifopen - Open interfaces ifclose - Close interfaces ifconf or dhcp - Automatically configure interfaces route - Display routing table nstat - Display neighbor table ipstat - Display IP statistics vcreate - Create VLAN vdestroy - Destroy VLAN
imgstat - Display images chain or imgexec or boot - Download and boot an executable image imgfetch or module or initrd - Download an image kernel or imgselect or imgload - Download and select an executable image imgfree - Discard images imgargs - Set image command-line arguments imgtrust - Set image trust requirement imgverify - Verify an image as trusted
sanhook - Attach SAN device sanboot - Boot from SAN device sanunhook - Detach SAN device fcstat - Display Fibre Channel ports fcels - Issue Fibre Channel ELS request
config - Start interactive configuration tool show - Display configuration setting set - Set configuration setting clear - Delete configuration setting read - Prompt user to enter configuration setting inc - Increment numeric value of configuration setting login - Prompt user to enter user name and password Flow - control commands isset - Test for existence iseq - Test for equality goto - Jump to script label exit - Exit current shell or script
menu - Create menu item - Add menu item choose - Choose menu item
console - Configure console colour - Define colour cpair - Define colour pair Form - parameter commands params - Create form parameter list param - Add form parameter
echo - Print text to console prompt - Prompt user to press key shell - Start new interactive shell help - Display list of available commands sleep - Delay for fixed period of time reboot - Reboot system poweroff - Power off system cpuid - Check x86 CPU feature sync - Wait for background operations to complete nslookup - Resolve host name to network address ping - Check network connectivity pciscan - Scan for PCI devices
lotest - Perform loopback testing pxebs - Perform PXE boot server discovery time - Measure time taken to execute command gdbstub - Start remote debugging profstat - Display profiling statistics
NOTE: Because there are many options to configure via the command line install, we have created a PowerShell Script to use as a ‘wrapper’ for the MSI Install. You find the script at: https://github.com/2pintsoftware/iPXEAnywhere/tree/main/Install
The install can be configured through the following basic commands:
Installation on an X86 machine:
MSIEXEC /i "2Pint Software 2PXE Service (x86).msi" CABSOURCE=”C:\Temp\License.cab” INSTALLTYPE=”2” SERVICE_USERNAME=<domain>\<username> SERVICE_PASSWORD=<password> REMOTEINSTALL_PATH=C:\RemoteInstall /l* C:\Temp\2PXE.installation.log
Installation on an X64 machine:
MSIEXEC /i "2Pint Software 2PXE Service (x64).msi" CABSOURCE=”C:\Temp\License.cab” INSTALLTYPE=”2” SERVICE_USERNAME=<domain>\<username> SERVICE_PASSWORD=<password> REMOTEINSTALL_PATH=C:\RemoteInstall /l* C:\Temp\2PXE.installation.log
The above examples are ‘bare minimum’ examples. You may want to configure more properties during install, and we have included a reference of all the MSI properties below.
Mandatory MSI Properties
CABSOURCE=<Full path to License.cab> Full path to where you have your license.cab file
INSTALLTYPE="N” 1 is PowerShell integration, 2 is with MS Configuration Manager Integration
SERVICE_USERNAME=”LocalSystem” or "domain\username" if you want to use a domain account
SERVICE_PASSWORD=”xxxxxxxx“ Can be skipped if SERVICE_USERNAME is LocalSystem
Optional MSI Properties
CONFIGMGRSQL=”1” 1 to enable a SQL connection to the Configuration Manager DB, 0 to use HTTP via the Management Point (no menu)
If CONFIGMGRSQL is set to 1 the following parameters must be set
RUNTIME_DATABASE_LOGON_TYPE=WinAuthCurrentUser "SqlAuth" if using SQL Accounts. "WinAuthCurrentUser" uses Integrated Security.
ODBC_SERVER=”myserver.domain.local “ FQDN of the Configuration Manager Database Server
RUNTIME_DATABASE_NAME=CONFIGMGR_xxx Configuration Manager Database Name, typically CONFIGMGR_<SITECODE>
REMOTEINSTALL_PATH=”<path to remote install folder>” Media folder for the service where computers will boot from
DEBUGLOG_PATH="C:\MyLogfiles\2PXE.log" Path to the logfile
DEBUGLOG=”1“ 1 to enable and 0 to disable verbose logging
POWERSHELLSCRIPTALLOWBOOT_PATH Path to the PowerShell extension script for boot requests.
POWERSHELLSCRIPTIMAGES_PATH Path to the PowerShell extension for image selection.
RUN_ON_DHCP_PORT Specifies if the service should respond on DHCP port - 1 or 0
RUN_ON_PXE_PORT Specifies if the service should respond on PXE port - 1 or 0
RUN_TFTP_SERVER Specifies if the built-in TFTP Server should be started - 1 or 0
RUN_HTTP_SERVER Specifies if the built-in HTTP WCF Server should be started
EMBEDDEDSDI="1" Use an embedded boot.sdi image. See full documentation for more info
F12TIMEOUT=”10000" F12 prompt timout for iPXE loaders for non mandatory deployments in milliseconds.
IPXELOADERS=”1" # Use iPXE Boot Loaders 1 to enable and 0 to disable. If 0 2PXE will use Windows boot loaders
UNKNOWNSUPPORT=”1" 1 for enable (default) 0 to disable - enables Unknown Machine support in Configuration Manager
PORTNUMBER=”8050" 2PXE Http Service Port - 8050 by default
POWERSHELLSCRIPTALLOWBOOT_PATH=”c:\myscripts" Set only if using custom path location for .ps1 scripts
POWERSHELLSCRIPTIMAGES_PATH="c:\myscripts" Set only if using custom path location for .ps1 scripts
INSTALLFOLDER="C:\MyInstallPath" Default is C:\Program Files\2pint Software
ENABLESCCMMENUCOUNTDOWN="10000" Countdown for menu timeout if nothing is selcted (in Millisecs)
ENABLESCCMMANDATORYCOUNTDOWN="30000" Countdown for Mandatory deployments - the deployment will be executed after this expires (in Millisecs)
SCCMREPORTSTATE="1" Instructs 2PXE to send SCCM state messages for mandatory deployments. 1 to send, 0 to not send.
WIMBOOTPARAMS="gui" command line for wimboot. Possible parameters are: gui, pause, pause=quiet, rawbcd, index=x For details see: http://ipxe.org/appnote/wimboot_architecture
ENABLEIPXEANYWHEREWEBSERVICE="0” Specifies to use iPXE Anywhere Web Service. 0 to disable, 1 to use reporting functionality only, 2 to move the entire request over to the web service + reporting. 3 is 1+2 and the ability to execute cmdline from iPXE WS in WiNPE
BootRequest = 1,
Syslog = 2
Using the resolved IPv4 Addresss of the iPXE Anywhere Web Service unless overridden by adding the <add key="iPXEAnywhereWebServiceIP" value="192.168.xxx.yyy"/> setting in this config.
ReportBootConfiguration = 4,
ReportDLStart = 8,
ReportDLComplete = 16,
ReportDLBoot = 32,
RunCmdLineWinPE = 64
For example:
A value of 62 (2+4+8+16+32=62) gives you all but BootRequest and RunCmdLineWinPE. Therefore
for iPXE and StifleR Integration you would have to set it to a minimum of; 2+4+8+16+32 = 62
IPXEANYWHEREWEBSERVICEURI="http://url:Port" Specifies the address and Port for the iPXE Anywhere Web Service
NETWORKACCESS_USERNAME "[%USERDOMAIN]\[%USERNAME]"
NETWORKACCESS_PASSWORD “A123456!"
FWTFTP Set 1 to allow the installer to create the Port 69 UDP Firewall exception
FWDHCP Set 1 to allow the installer to create the Port 67 UDP Firewall exception
FWPROXYDHCP Set 1 to allow the installer to create the Port 4011 UDP Firewall exception
FWHTTP Set 1 to allow the installer to create the Port 8050 TCP Firewall exception
BINDTOIP Enter the server NIC IP address to which to bind the service
USEHYPERTHREAD" Value="1"