Creating PowerShell Command Cheat Sheets (Part 2)

by May 14, 2018

In the previous tip, we created cheat sheets for PowerShell commands, and as a reminder, this line would create a sheet for network commands (provided you have access to the NetAdapter module that was browsed in this example):

 PS> Get-Command -Module NetAdapter | Get-Help | Select-Object -Property Name, Synopsis Name Synopsis ---- -------- Disable-NetAdapter Disables a network adapter. Disable-NetAdapterBinding Disables a binding to a netw... Disable-NetAdapterChecksumOffload Disables the selected checks... Disable-NetAdapterEncapsulatedPacketTaskOffload Disables encapsulated packet... Disable-NetAdapterIPsecOffload Disables IPsec offload on th... Disable-NetAdapterLso Disables all LSO properties,... Disable-NetAdapterPacketDirect ... Disable-NetAdapterPowerManagement Disables specific power mana... Disable-NetAdapterQos Disables QoS on a network ad... Disable-NetAdapterRdma Disables RDMA on a network a... Disable-NetAdapterRsc Disables RSC on a network ad... Disable-NetAdapterRss Disables RSS on a network ad... Disable-NetAdapterSriov Disables SR-IOV on a network... Disable-NetAdapterVmq Disables the VMQ feature on ... Enable-NetAdapter Enables a network adapter. Enable-NetAdapterBinding Enables binding of a protoco... Enable-NetAdapterChecksumOffload Enables checksum offloads on... Enable-NetAdapterEncapsulatedPacketTaskOffload Enables encapsulated packet ... Enable-NetAdapterIPsecOffload Enables IPsec offload on the... Enable-NetAdapterLso Enables LSO properties, such... Enable-NetAdapterPacketDirect ... Enable-NetAdapterPowerManagement Enables specific power manag... Enable-NetAdapterQos Enables QoS on the network a... Enable-NetAdapterRdma Enables RDMA on a network ad... Enable-NetAdapterRsc Enables RSC on a network ada... Enable-NetAdapterRss Enables RSS on a network ada... Enable-NetAdapterSriov Enables SR-IOV on a network ... Enable-NetAdapterVmq Enables VMQ on a network ada... Get-NetAdapter Gets the basic network adapt... Get-NetAdapterAdvancedProperty Gets the advanced properties... Get-NetAdapterBinding Gets a list of bindings for ... Get-NetAdapterChecksumOffload Gets the various checksum of... Get-NetAdapterEncapsulatedPacketTaskOffload Gets the network adapters th... ... 

To make this list worthwhile, let’s now convert it to a HTML table so you can open it in a browser, and print it:

$ModuleName = "NetAdapter" $OutFile = "$env:temp\commands.html" Get-Command -Module $moduleName | Get-Help | Select-Object -Property Name, Synopsis | ConvertTo-Html | Set-Content -Path $OutFile Invoke-Item -Path $OutFile 

When you run this, after a few seconds your default web browser opens a page with the cheat sheet information. You can now use the browser command to print it. The page isn’t particularly beautiful but serves its purpose.

Twitter This Tip! ReTweet this Tip!