In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Use Get-ChildItem to list all of the environment variables:"
A block of code is set as follows:
function Get-IPConfig { [System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() | ForEach-Object { $ipProperties = $_.GetIPProperties() $addresses = $ipProperties.UnicastAddresses | Where-Object { $_.Address.AddressFamily -eq 'InterNetwork' } | ForEach-Object { "$($_.Address) $($_.IPv4Mask)" } $gateway = $ipProperties.GatewayAddresses.Address | Where-Object { $_.AddressFamily -eq 'InterNetwork' -and $_ -ne '0.0.0.0' } [PSCustomObject]@{ Name = $_.Name Id = $_.Id Addresses = $addresses Gateway = $gateway } } | Where-Object { $_.Addresses } } Get-IPConfig
Any command-line input or output is written as follows:
PS> Update-Help -Module DnsClient -Verbose
VERBOSE: Help was not updated for the module DnsClient, because the Update-Help command was run on this computer within the last 24 hours.
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Press the Initialize git repository button, as shown in the following screenshot:"
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.