Using the PE docs
Review these tips to get the most out of the PE docs.
Using example commands
These guidelines can help you understand and customize the example commands you'll find in the Puppet Enterprise (PE) docs.
Ports, paths, and other input
puppetcommands to populate variables and curl arguments. This can take the guesswork out of providing those values. In the following example, the
puppet config print servercommand supplies the DNS name for a curl command:
url="http://$(puppet config print server):4433" curl "$url"
puppetcommands generate cert paths:
--cert $(puppet config print --section main hostcert) \ --key $(puppet config print --section main hostprivkey) \ --cacert $(puppet config print --section main localcacert) \
puppet commands can return different values depending
on various conditions. Make sure you run the entire example (including commands
setting environment variables and the
as the root, administrator, or with equivalent elevated privileges.
To run such commands on a machine without elevated privileges, you must replace the
puppet commands with hard-coded values. If
you’re unsure about the correct values, run the
puppet commands to get reasonable default values.
Authentication tokens in curl commands
curlcommand requires token-based authentication, the example might contain this line:
If you have an actual authentication token available, you can use that in the command instead, such as:
auth_header="X-Authentication: $(puppet-access show)"
For instructions on generating, configuring, revoking, and deleting authentication tokens in PE, go to Token-based authentication.
Modifications for Windows
\) as line-continuation characters. In Windows, the equivalent characters are carets (
^) and, for PowerShell specifically, backticks (
Additionally, *nix commands use forward slashes (
directory separator characters. You might use either backslashes or forward
slashes as directory separator characters in your Windows commands; however some modules and
commands require you to use one or the other. For modules, check the
module's Forge page for information about Windows modifications or
Furthermore, Windows commands might require wrapping strings or arguments in double quotes rather than single quotes.
curlcommands directly in Windows, such as:
- Installing the curl executable for Windows.
- Using built-in curl functionality included with Git for Windows.
- Using the GNU Bash shell.
curlcommands for use in Windows:
Invoke-WebRequestand the arguments it accepts in the Microsoft PowerShelldocumentation. You can also learn about running Puppet language commands on Windows in the Puppet documentation.
Commands with elevated privileges
Some commands in PE require elevated privileges.
Depending on the operating system, youc an use either
runas, or a root or admin user.
- root (or administrator)
- In *nix systems, the root user has virtually unlimited access to read, write, or change files and system configurations; install,uninstall, and upgrade software; or perform any operation as any user. The equivalent in Windows is the administrator.
sudocommand, which means super user do, allows a user to execute a command from a personal user account with temporarily elevated privileges. With
sudo, you can do most of the things the root user can do without actually logging in as the root user.
- Run as administrator or runas
- Using the
runascommand or running a program as an administrator (for example, by right-clicking the program and selecting Run as administrator) is the Windows equivalent of
sudo– It allows you to temporarily perform administrator functions without actually logging in as the administrator.
sudoto run almost all commands in Puppet with the exception of
puppet infrastructurecommands, which require you to be logged in as the root user (or administrator). You can run
puppet infrastructure help <ACTION>to get information about
In Windows systems, use
runas or open the command prompt as an administrator (recommended for PowerShell commands) instead of using
Archived PE docs
PE docs for recent end-of-life (EOL) or superseded product versions are archived in place, meaning that we continue to host them at their original URLs, but we limit their visibility on the main docs site and no longer update them. You can access archived-in-place docs using their original URLs, or from the links here.
PE docs for EOL versions earlier than those listed here are archived in our PE docs GitHub archive.