New-AsBuiltReport
Description
New-AsBuiltReport creates as-built configuration reports for one or more target systems and exports the report in to one or more supported document formats, such as DOCX, HTML and Text.
New-AsBuiltReport provides additional parameters, allowing users to generate and customise a report to their requirements.
Parameters
Report
Specifies the type of report that will be generated.
This is a mandatory parameter.
Target
Specifies the IP/FQDN of the system to connect.
Multiple targets may be specified, separated by a comma.
New-AsBuiltReport -Target system1,system2
Note
When specifying multiple targets, all systems must use the same credentials.
This parameter has the following aliases ; Server, Cluster, IP
This is a mandatory parameter.
Credential
Specifies the stored credential of the target system.
This is a mandatory parameter.
Username
Specifies the username of the target system.
This is a mandatory parameter.
Password
Specifies the password of the target system.
This is a mandatory parameter.
Token
Specifies an API token to authenticate to the target system.
This is an optional parameter.
UseInteractiveAuth
Use interactive authentication (via 3rd party identity provider) to authenticate to the target system.
This parameter has an alias MFA for backwards compatibility.
This is an optional parameter.
Format
Specifies the output format of the report.
The supported output formats are Word, HTML & Text.
Multiple output formats may be specified, separated by a comma.
New-AsBuiltReport -Format HTML,Word,Text
This is an optional parameter.
If the parameter is not specified, the document format will default to Word.
ReportLanguage
Specifies the language for report content generated by the report module.
Available languages are dynamically determined based on language folders in the selected report module.
Using the ReportLanguage parameter overrides the language configuration specified in the report JSON configuration file.
This is an optional parameter.
If the parameter is not specified, the report language is set to 'en-US' (English - United States).
Orientation
Sets the page orientation of the report to Portrait or Landscape.
This is an optional parameter.
If the parameter is not specified, page orientation will be set to Portrait.
StyleFilePath
Specifies the file path to a custom style .ps1 script for the report to use.
This is an optional parameter and does not have a default value.
If the parameter is not specified, the default style will be used.
OutputFolderPath
Specifies the folder path to save the report.
This is a mandatory parameter.
AsBuiltConfigFilePath
Specifies the file path to the AsBuiltReport configuration JSON file.
This is an optional parameter.
If this parameter is not specified, the user will be prompted for this configuration information on first run, with the option to save the configuration to a file.
ReportConfigFilePath
Specifies the file path to a report JSON configuration file.
This is an optional parameter.
If this parameter is not specified, a default report configuration JSON is copied to the specified user folder.
If this parameter is specified and the path to a JSON file is invalid, the script will terminate.
Timestamp
Specifies whether to append a timestamp string to the report filename.
This is an optional parameter.
By default, the timestamp string is not added to the report filename.
EnableHealthcheck
Highlights certain issues within the system report.
Some reports may not provide this functionality.
This is an optional parameter.
If the parameter is not specified, health checks are not enabled.
SendEmail
Sends report to specified recipients as email attachments.
This is an optional parameter.
Examples
-
Creates an as-built report for a VMware vSphere environment. The report is generated in Word and Text formats and saved to the
C:\Reportsfolder. Health checks will be enabled for the report.Example 1New-AsBuiltReport -Report 'VMware.vSphere' -Target 'vcenter.domain.local' ` -Username '[email protected]' -Password 'VMware1!' ` -Format 'Word','Text' -OutputFolderPath 'C:\Reports' -EnableHealthCheck -
Creates an as-built report for two Pure Storage FlashArrays. The report is generated in HTML format, saved to the
C:\Reportsfolder and sent via email. -
Creates an as-built report for two VMware ESXi hosts. Authentication to VMware ESXi hosts uses stored credentials. The report is generated in Word (DOCX) format (by default). A customized stylesheet is specified to style the report in the company’s brand colours and fonts. The report is saved to the user’s documents folder with a timestamp appended to the filename to identify when the report was generated. The
4. Creates a Microsoft Azure As Built Report in HTML format with Spanish language content. Authentication to Microsoft Azure uses an external identity provider.AsBuiltConfigFilePathparameter is specified to bypass the menu driven questionnaire.