Have you always wanted to write a book with 100 or even 1000 or more pages? With Windows PowerShell and PowerShell Book Generator, it takes only a few seconds. The PowerShell Book Generator was created by the way on the last PSConf.eu and afterwards (I try to fill the time optimally and I hope to see you there again @psconf.eu in June 2020). Basically it is about implementing the internal PowerShell help for a topic completely in book form as PDF with table of contents.The idea came to me when I saw that there are more and more books where more and more content is simply copied from the internal help into the document. Of course the generator can also be used to document your own PowerShell modules. How does the internal PowerShell help work?

With Get-Commmand -Module <ModuleName>

the functions and CmdLets of a module can be retrieved.

PS C:\Windows\system32> get-command -Module AppvClient
CommandType Name Version Source
----------- ---- ------- ------
Function Get-AppvVirtualProcess 1.0.0.0 AppvClient
Function Start-AppvVirtualProcess 1.0.0.0 AppvClient
Cmdlet Add-AppvClientConnectionGroup 1.0.0.0 AppvClient
Cmdlet Add-AppvClientPackage 1.0.0.0 AppvClient
Cmdlet Add-AppvPublishingServer 1.0.0.0 AppvClient
Cmdlet Disable-Appv 1.0.0.0 AppvClient
Cmdlet Disable-AppvClientConnectionGroup 1.0.0.0 AppvClient
Cmdlet Enable Appv 1.0.0.0 AppvClient
#....

For each commandlet the complete help can now be called up again. As return value we get an object with help information.

PS C:\Windows\system32> get-Help Get-AppvVirtualProcess
NAME
    Get-AppvVirtualProcess
OVERVIEW
    Displays the virtual processes running on a computer.
SYNTAX
    Get-AppvVirtualProcess [[-Name] <String[]>] [-ComputerName <String[]>] [-FileVersionInfo] [-Modules] [<CommonParameters>]
    Get-AppvVirtualProcess [-ComputerName <String[]>]  [-FileVersionInfo] [-Modules] -Id <Int32[]> [<CommonParameters>] 
    Get-AppvVirtualProcess [-ComputerName <String[]>]  [-FileVersionInfo] [-Modules] [<CommonParameters>] 

This information is retrieved completely (with the paranmeters -Full -Examples). Partly with explanations and examples (depending on the developer) and then processed by the PowerShell Book Generator. You can easily see that this also works for your own modules if they are well documented. Before use First of all the internal PowerShell help should be up to date 

The PowerShell command for this is:  Update-Help

So if there is not much to see in the calls above or in the generated books, an update help should be called first.First the module has to be

imported:Import modules <PathTo>\PowerShellBooks 

Afterwards the book can be generated with New-PowerShellBook <OutputPath> -Module <Modulename>.

Example:

Import modules $PSScriptRoot\PowerShellBooks 
$Module = 'UEV'.
$OutFile = '{0}\desktop\Powershell_With_{1}.pdf' -f $env:userprofile, $Module
New-PowerShellBook -OutputPdfDocument $OutFile -Module $Module

To make life a little easier for the colleagues who don't like to use the PowerShell, I have included a minimal Gui. This is started with the link PowerShellBooksGui. Then select the module and the storage location.To make life a little easier for the colleagues who don't like to use the PowerShell, I have included a minimal Gui. This is started with the link PowerShellBooksGui. Then select the module and the storage location.

PowerShellBookGeneratorGui

Below to download the scripts with the generator. Furthermore some example books.

The generator

Downloads:

zipPowerShellBooksGenerator HOT

Update 1.2

=======

* Generate TOC with internal Links

* Executable (EXE) for the GUI (generate PDF Documents from PowerShell Modules Help). Better use the PowerShell and

...
Information
Created 02.02.2020 20:34:53
Changed 08.02.2020 08:58:48
Version 1.2
Size 4.97 MB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 214
License Nick Informationstechnik Tool LicenceTooltip
Price

Some Examples

pdfPowershell_With_AppVClient HOT

Created with the PowerShell Book Generator

Update 1.1: TOC with internal Links

Information
Created 02.02.2020 20:26:09
Changed 08.02.2020 09:02:18
Version 1.1
Size 262.2 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 3,007
License
Price

pdfPowershell_With_AppVSequencer HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:26:59
Changed 02.02.2020 20:29:41
Version
Size 23.51 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 2,959
License
Price

pdfPowershell_With_AppVServer HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:27:34
Changed 02.02.2020 20:29:36
Version
Size 127.64 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 1,364
License
Price

pdfPowershell_With_AppX HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:27:53
Changed 02.02.2020 20:29:16
Version
Size 106.02 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 1,850
License
Price

pdfPowerShell_With_BranchCache HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:28:18
Changed 02.02.2020 20:29:10
Version
Size 234.25 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 1,936
License
Price

pdfPowershell_With_Dism HOT

Created with the PowerShell Book Generator

Very good!

Information
Created 02.02.2020 20:28:56
Changed 02.02.2020 20:29:30
Version
Size 544.99 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 1,789
License
Price

pdfPowershell_With_ActiveDirectory HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:19:17
Changed 02.02.2020 20:29:50
Version
Size 2.29 MB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 1,724
License
Price

pdfPowershell_With_DnsServer HOT

Powershell_With_DnsServer

Information
Created 02.02.2020 20:30:19
Changed 02.02.2020 20:30:19
Version
Size 1.71 MB
Created by Andreas Nick
Changed by
Downloads 5,243
License
Price

pdfPowershell_With_PrintManagement HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:31:02
Changed 02.02.2020 20:31:02
Version
Size 256.72 KB
Created by Andreas Nick
Changed by
Downloads 1,769
License
Price

pdfPowershell_With_Storage HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:31:24
Changed 02.02.2020 20:31:24
Version
Size 1.69 MB
Created by Andreas Nick
Changed by
Downloads 2,219
License
Price

pdfPowershell_With_UEV HOT

Created with the PowerShell Book Generator

Information
Created 02.02.2020 20:32:19
Changed 02.02.2020 20:32:19
Version
Size 201.99 KB
Created by Andreas Nick
Changed by
Downloads 3,175
License
Price