'Disconnect-FGT'
Bug description
Hola alagoutte, primero que todo felicitarte por este desarrollo de generacion de reporte, en esta ocasion
estoy presentando el siguiente problema al ejecutar el script. me arroja el siguiente mensaje "New-AsBuiltReport : El término 'Disconnect-FGT' no se reconoce como nombre de un cmdlet," estoy apuntando a mi fortigate por la IP y puerto correcto sin embargo no termina de conectar, te dejo la salida en Verbose por si me puedes ayudar.
Command-line input
New-AsBuiltReport -Report Fortinet.FortiGate -Target 10.19.1.1 -Username XnXblXXnX -Password 'TXnXblXXnX' -Format Text,Html,Word -OutputFolderPath 'C:\Users\cflor\Documents\Fortinet\Reporte\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate-0.4.1' -ReportConfigFilePath 'C:\Users\cflor\Documents\Fortinet\Reporte\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate.json' -Verbose
Steps to reproduce
< As Built Report Configuration >
Would you like to save the As Built Report configuration file? (y/n): y Enter a name for the As Built Report configuration file [AsBuiltReport]: gg Enter the path to save the As Built Report configuration file [C:\Users\cflor\Documents\Fortinet\Reporte\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate-0.4.1]: DETALLADO: Saving As Built Report configuration file 'gg.json' to path 'C:\Users\cflor\Documents\Fortinet\Reporte\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate-0.4.1'. DETALLADO: Config.Report.Author = fsd DETALLADO: Config.UserFolder.Path = DETALLADO: Config.Company.FullName = DETALLADO: Config.Company.Contact = DETALLADO: Config.Company.Phone = DETALLADO: Config.Company.Email = DETALLADO: Config.Company.ShortName = DETALLADO: Config.Company.Address = DETALLADO: Config.Email.Port = DETALLADO: Config.Email.Credentials = DETALLADO: Config.Email.Server = DETALLADO: Config.Email.To = DETALLADO: Config.Email.From = DETALLADO: Config.Email.UseSSL = DETALLADO: Config.Email.Body = DETALLADO: Rellenar la propiedad RepositorySourceLocation para el módulo AsBuiltReport.Core. DETALLADO: Se está cargando el módulo desde la ruta de acceso 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. DETALLADO: Rellenar la propiedad RepositorySourceLocation para el módulo AsBuiltReport.Core. DETALLADO: Se está cargando el módulo desde la ruta de acceso 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.1.0\AsBuiltReport.Core.psm1'. DETALLADO: Rellenar la propiedad RepositorySourceLocation para el módulo AsBuiltReport.Fortinet.FortiGate. DETALLADO: Se está cargando el módulo desde la ruta de acceso 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Fortinet.FortiGate\0.4.1\AsBuiltReport.Fortinet.FortiGate.psm1'. DETALLADO: Loading AsBuiltReport.Fortinet.FortiGate report configuration file from path 'C:\Users\cflor\Documents\Fortinet\Reporte\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate-0.4.1\AsBuiltReport.Fortinet.FortiGate.json'. DETALLADO: Setting report filename to 'Fortinet FortiGate As Built Report'. DETALLADO: Rellenar la propiedad RepositorySourceLocation para el módulo AsBuiltReport.Core. DETALLADO: Se está cargando el módulo desde la ruta de acceso 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.psm1'. DETALLADO: Rellenar la propiedad RepositorySourceLocation para el módulo AsBuiltReport.Core. DETALLADO: Se está cargando el módulo desde la ruta de acceso 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.1.0\AsBuiltReport.Core.psm1'. ADVERTENCIA: [ 21:50:28:229 ] [ Module ] - AsBuiltReport.Core 1.4.0 is currently installed. DETALLADO: [ 21:50:31:102 ] [ Document ] - Document 'Fortinet FortiGate As Built Report' processing started. DETALLADO: [ 21:50:31:124 ] [ Document ] - Please wait while the Fortinet FortiGate As Built Report is being generated. DETALLADO: [ 21:50:31:129 ] [ Document ] - Executing report style script from path 'C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.4.0\AsBuiltReport.Core.Style.ps1'. DETALLADO: [ 21:50:31:132 ] [ Document ] - Setting global document options. DETALLADO: [ 21:50:31:133 ] [ Document ] - Enabling section/heading numbering. DETALLADO: [ 21:50:31:134 ] [ Document ] - Setting default font(s) to 'Segoe Ui'. DETALLADO: [ 21:50:31:135 ] [ Document ] - Setting page top margin to '25,05'mm. DETALLADO: [ 21:50:31:136 ] [ Document ] - Setting page right margin to '25,05'mm. DETALLADO: [ 21:50:31:137 ] [ Document ] - Setting page bottom margin to '25,05'mm. DETALLADO: [ 21:50:31:137 ] [ Document ] - Setting page left margin to '25,05'mm. DETALLADO: [ 21:50:31:138 ] [ Document ] - Setting page size to 'A4'. DETALLADO: [ 21:50:31:139 ] [ Document ] - Setting page orientation to 'Portrait'. DETALLADO: [ 21:50:31:140 ] [ Document ] - Setting page height to '297'mm. DETALLADO: [ 21:50:31:141 ] [ Document ] - Setting page width to '210'mm. DETALLADO: [ 21:50:31:142 ] [ Document ] - Setting document style 'Title'. DETALLADO: [ 21:50:31:143 ] [ Document ] - Setting document style 'Title2'. DETALLADO: [ 21:50:31:144 ] [ Document ] - Setting document style 'Title3'. DETALLADO: [ 21:50:31:145 ] [ Document ] - Setting document style 'Heading1'. DETALLADO: [ 21:50:31:146 ] [ Document ] - Setting document style 'Heading2'. DETALLADO: [ 21:50:31:147 ] [ Document ] - Setting document style 'Heading3'. DETALLADO: [ 21:50:31:148 ] [ Document ] - Setting document style 'Heading4'. DETALLADO: [ 21:50:31:149 ] [ Document ] - Setting document style 'NOTOCHeading4'. DETALLADO: [ 21:50:31:150 ] [ Document ] - Setting document style 'Heading5'. DETALLADO: [ 21:50:31:151 ] [ Document ] - Setting document style 'NOTOCHeading5'. DETALLADO: [ 21:50:31:153 ] [ Document ] - Setting document style 'Heading6'. DETALLADO: [ 21:50:31:155 ] [ Document ] - Setting document style 'NOTOCHeading6'. DETALLADO: [ 21:50:31:156 ] [ Document ] - Setting document style 'NOTOCHeading7'. DETALLADO: [ 21:50:31:158 ] [ Document ] - Setting document style 'Normal'. DETALLADO: [ 21:50:31:159 ] [ Document ] - Setting document style 'Header'. DETALLADO: [ 21:50:31:161 ] [ Document ] - Setting document style 'Footer'. DETALLADO: [ 21:50:31:162 ] [ Document ] - Setting document style 'TOC'. DETALLADO: [ 21:50:31:166 ] [ Document ] - Setting document style 'TableDefaultHeading'. DETALLADO: [ 21:50:31:168 ] [ Document ] - Setting document style 'TableDefaultRow'. DETALLADO: [ 21:50:31:170 ] [ Document ] - Setting document style 'Critical'. DETALLADO: [ 21:50:31:173 ] [ Document ] - Setting document style 'Warning'. DETALLADO: [ 21:50:31:175 ] [ Document ] - Setting document style 'Info'. DETALLADO: [ 21:50:31:177 ] [ Document ] - Setting document style 'OK'. DETALLADO: [ 21:50:31:181 ] [ Document ] - Setting document style 'Caption'. DETALLADO: [ 21:50:31:182 ] [ Document ] - Setting table style 'TableDefault'. DETALLADO: [ 21:50:31:184 ] [ Document ] - Setting table style 'Borderless'. DETALLADO: [ 21:50:31:186 ] [ Document ] - Processing document header started. DETALLADO: [ 21:50:31:188 ] [ Document ] - Processing paragraph 'Fortinet FortiGate As Built Report -[..]'. DETALLADO: [ 21:50:31:191 ] [ Document ] - Processing document header completed. DETALLADO: [ 21:50:31:192 ] [ Document ] - Processing document footer started. DETALLADO: [ 21:50:31:197 ] [ Document ] - Processing paragraph 'Page <!# PageNumber #!>'. DETALLADO: [ 21:50:31:200 ] [ Document ] - Processing document footer completed. DETALLADO: [ 21:50:31:201 ] [ Document ] - Processing blank line. DETALLADO: [ 21:50:31:203 ] [ Document ] - Processing image 'AsBuiltReport Logo'. DETALLADO: [ 21:50:31:206 ] [ Document ] - Processing blank line. DETALLADO: [ 21:50:31:207 ] [ Document ] - Processing paragraph 'Fortinet FortiGate As Built Report'. DETALLADO: [ 21:50:31:208 ] [ Document ] - Processing blank line. DETALLADO: [ 21:50:31:209 ] [ Document ] - Processing table 'Cover Page'. DETALLADO: [ 21:50:31:213 ] [ Document ] - Processing page break. DETALLADO: [ 21:50:31:215 ] [ Document ] - Processing table of contents 'Table of Contents'. DETALLADO: [ 21:50:31:216 ] [ Document ] - Processing page break. ADVERTENCIA: [ 21:50:31:229 ] [ Document ] - El término 'Connect-FGT' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable. Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de nuevo. New-AsBuiltReport : El término 'Disconnect-FGT' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable. Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de nuevo. En línea: 1 Carácter: 1
- New-AsBuiltReport -Report Fortinet.FortiGate -Target 10.19.1.1 -Usern ...
-
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
Expected behaviour
al ejecutar el script. me arroja el siguiente mensaje "New-AsBuiltReport : El término 'Disconnect-FGT' no se reconoce como nombre de un cmdlet,
Screenshots
Operating System
Windows 11
PowerShell Version
PS C:\windows\system32> $PSVersionTable
Name Value
PSVersion 5.1.22621.3958 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.3958 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
PowerShell Modules
Name Version
AsBuiltReport.Core 1.4.0 AsBuiltReport.Core 1.1.0 AsBuiltReport.Fortinet.FortiGate 0.4.1 PowerFGT 0.8.1 PScribo 0.10.0
Additional Context
No response
Before submitting
- [X] I have read and followed the bug reporting guidelines.
- [X] I have read the documentation, and referred to the known issues before submitting this bug report.
- [X] I have checked for previously opened & closed issues before submitting this bug report.
Can you try to relaunch your shell ?
and/or use import-module PowerFGT ?
Saludos @Krist0be,
Me paso un error similar al tuyo y lo pude resolver inicializando la consola de powershell.
Si con eso no se resuelve podrías intentar importar el módulo nuevamente
import-module PowerFGT -force
Espero esto te ayude!