AsBuiltReport.VMware.vSphere
AsBuiltReport.VMware.vSphere copied to clipboard
VM Names need to be regex escaped for Get-View
Hi!
As to see in this output, I believe the VM-Names should be [regex]::escape()'ed before used as Parameter for Get-View.
Regards
Please wait while the VMware vSphere As Built Report is being generated.
Get-View : 2/17/2021 5:10:34 AM Get-View Invalid pattern '^IP-100 [LastWrite=2017-07-20_08:44:54]$' at offset 25. [x-y] range in reverse order.
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:01 AM Get-View Invalid pattern '^MitterDev [LastWrite=2017-01-16_10:04:10]$' at offset 28. [x-y] range in reverse order.
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:37 AM Get-View Invalid pattern '^SCCCL12 [LastWrite=2020-04-08_08:12:11]$' at offset 29. [x-y] range in reverse order.
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:48 AM Get-View Invalid pattern '^SCCCL49 - Win8.1 - WinCCV7.3 [LastWrite=2018-08-17_14:12:32]$' at offset 47. [x-y] range in reverse order.
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
VMware vSphere As Built Report '2021-02-17_05-07-32_vSphereAbrInventory' has been saved to '\\xxxx'
Are you using special characters in your VM names? Can you provide an example of a VM name which causes the problem? I have been unsuccessful in trying to recreate this issue.
Closing this issue due to the lack of a response. Please re-open this issue if you are able to provide additional information.