6 Replies Latest reply on Jun 13, 2019 2:18 AM by thompsoa

    NSX As-Built script | Cannot connect to NSX Manager

    thompsoa Novice
    vExpert

      Hi All,

       

      Trying to run the following command. but I'm not connecting to NSX Manager:

       

      PS C:>New-AsBuiltReport -Report VMware.NSXv -Target vc01 -Credential (Get-Credential) -Format HTML,Word -OutputPath C:\Scripts

      Using existing PowerCLI connection to VCenterXX

       

      Error


      Invoke-AsBuiltReport.VMware.NSXv : Connection to NSX server 172.X.X.X failed : Invoke-NsxRestMethod : The NSX API
      response received indicates a failure. 503 : Service Unavailable : Response Body:
      At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.Core\1.0.1\Src\Public\New-AsBuiltReport.ps1:307 char:13

      •         & "Invoke-$($ReportModule)" -Target $Target -Credential $ ... 
      •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
        • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
        • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-AsBuiltReport.VMware.NSXv
      •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
        • CategoryInfo : ObjectNotFound: (NSXManager:String) [Clear-Variable], ItemNotFoundException
        • FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.ClearVariableCommand

      VERBOSE: [ 12:41:55:219 ] [ Document ] - Document 'VMware NSXv As Built Report' processing completed.
      VERBOSE: [ 12:41:55:221 ] [ Document ] - Total processing time '59.93' seconds.
      VMware NSXv As Built Report has been saved to c:\temp

       

      Screen Shot 2019-06-12 at 12.43.44 PM.png

      I've tested the credentials not using PowerNSX and no issue. The account is Enterprise Administrator