Comments (17)
No resolution yet @zpatrickson Was ok on vsphere 6.5 but won't work on 6.7 u2
from asbuiltreport.vmware.vsphere.
@EloiseJory you seem to be using the vSphere report module from my dev repo.
Have you tried using the module from PSGallery?
from asbuiltreport.vmware.vsphere.
Yes i initially tried the prod version and had these errors so thought I'd give the dev version a whirl..
from asbuiltreport.vmware.vsphere.
I would suggest that you set all InfoLevels to 0 and then gradually increase the InfoLevel, one section at a time to help isolate where you are having the issue.
from asbuiltreport.vmware.vsphere.
Running the report withInfolevel 0 on all settings, lets the script complete, but it doesnโt output anything (As expected).
If Iset vCentre to 1, or 2, the script completes, and yields an empty report.
Setting InfoLevel to 3 for vCenter, as below, the report crashes, with the same error as before.
from asbuiltreport.vmware.vsphere.
I'm facing the exact same issue. Have you figured out a solution to this issue?
from asbuiltreport.vmware.vsphere.
Hi @zpatrickson are you able to provide some more information regarding your vSphere environment and the AsBuiltReport module versions? Do you have anything unusual or unique in your environment?
Would you be open to doing a webex (or similar) session to allow me to investigate further?
from asbuiltreport.vmware.vsphere.
Hi @tpcarman, sure we can do a webex. How can we proceed with troubleshooting the script? I'm using version 1.0.7 and reside in DC. Nothing unusual in my environment. My Vsphere is 5.5 and planning to do an upgrade. I just want to document it before hand.
from asbuiltreport.vmware.vsphere.
@zpatrickson I am in UTC +10 for the next 1.5 weeks. Late evening my time, early morning your time probably works best for me. We can either do webex or do LiveShare within VS Code. Let me know if this works for you.
from asbuiltreport.vmware.vsphere.
Webex works. I can do 10:00 PM, 11:00 PM or 12:00AM your time. If you can provide me with a contact info that would be helpful.
from asbuiltreport.vmware.vsphere.
@zpatrickson Send me your email address via the contact page.
from asbuiltreport.vmware.vsphere.
@zpatrickson @EloiseJory hi guys, would you mind connecting to your vCenter with PowerCLI and running the following;
$VMs = Get-VM
$VMInfo = foreach ($VM in $VMs) {
$VMView = $VM | Get-View
[PSCustomObject]@{
'Name' = $VM.Name
'Power State' = Switch ($VM.PowerState) {
'PoweredOn' { 'On' }
'PoweredOff' { 'Off' }
default { $VM.PowerState }
}
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
$null { '--' }
default { $VMView.Summary.Guest.IpAddress }
}
'vCPUs' = $VM.NumCpu
'Memory GB' = [math]::Round(($VM.MemoryGB), 0)
'Provisioned GB' = [math]::Round(($VM.ProvisionedSpaceGB), 0)
'Used GB' = [math]::Round(($VM.UsedSpaceGB), 0)
'HW Version' = ($VM.HardwareVersion).Replace('vmx-', 'v')
'VM Tools Status' = Switch ($VMView.Summary.Guest.ToolsStatus) {
'toolsOld' { 'Old' }
'toolsOK' { 'OK' }
'toolsNotRunning' { 'Not Running' }
'toolsNotInstalled' { 'Not Installed' }
default { $VMView.Guest.ToolsStatus }
}
}
}
Write-Output $VMInfo | ft
Please let me know how this goes.
from asbuiltreport.vmware.vsphere.
@zpatrickson @EloiseJory hi guys, would you mind connecting to your vCenter with PowerCLI and running the following;
I should be able to test it tomorrow - will let you know !!
thanks
Eloise.
from asbuiltreport.vmware.vsphere.
Hi
All I get is errors:
You cannot call a method on a null-valued expression.
`At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
`
from asbuiltreport.vmware.vsphere.
What about this?
$VMs = Get-VM
$VMInfo = foreach ($VM in $VMs) {
$VMView = $VM | Get-View
[PSCustomObject]@{
'Name' = $VM.Name
'Power State' = Switch ($VM.PowerState) {
'PoweredOn' { 'On' }
'PoweredOff' { 'Off' }
default { $VM.PowerState }
}
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
$null { '--' }
'' { '--' }
default { $VMView.Summary.Guest.IpAddress }
}
'vCPUs' = $VM.NumCpu
'Memory GB' = [math]::Round(($VM.MemoryGB), 0)
'Provisioned GB' = [math]::Round(($VM.ProvisionedSpaceGB), 0)
'Used GB' = [math]::Round(($VM.UsedSpaceGB), 0)
'HW Version' = ($VM.HardwareVersion).Replace('vmx-', 'v')
'VM Tools Status' = Switch ($VMView.Summary.Guest.ToolsStatus) {
'toolsOld' { 'Old' }
'toolsOK' { 'OK' }
'toolsNotRunning' { 'Not Running' }
'toolsNotInstalled' { 'Not Installed' }
default { $VMView.Guest.ToolsStatus }
}
}
}
Write-Output $VMInfo | ft
If that still doesn't work, try removing these lines and trying again
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
$null { '--' }
'' { '--' }
default { $VMView.Summary.Guest.IpAddress }
}
from asbuiltreport.vmware.vsphere.
What about this?
First attempt was a heap of these again
`You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:11 char:26
-
'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull`
second attempt with the IP code removed was
`You cannot call a method on a null-valued expression.
At line:6 char:27
-
'Power State' = Switch ($VM.PowerState) {
-
~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:6 char:27
-
'Power State' = Switch ($VM.PowerState) {
-
~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:6 char:27
-
'Power State' = Switch ($VM.PowerState) {
-
~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull`
from asbuiltreport.vmware.vsphere.
This issue should be resolved in 5a2992c. Please reopen if you continue to experience issues.
from asbuiltreport.vmware.vsphere.
Related Issues (20)
- SDRS VM Overrides shows empty "Virtual Machine" column while Cluster filtering is used
- Record the TPM State of each node and if encryption enabled, backup the keys of each node into the report HOT 4
- vCenter user privileges doesn't handle groups
- Exception calling "Substring" with "1" argument(s) HOT 6
- The underlying connection was closed: A connection that was expected to be kept alive was closed by the server HOT 2
- Issues with reporting of PCI Devices with VMware ESXi 8.0 hosts HOT 1
- Issues with reporting of vCenter Server Alarms in vSphere 8.0
- Missing vSAN information when running against vSphere 8.0 environment HOT 1
- IP address Report HOT 1
- Error in Image Profile section HOT 2
- Asbuilt for vSphere errors stops running HOT 2
- vSphere 8.0 U1c Build 22088981 - New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection. HOT 29
- vSAN 8 ESA - "VsanDiskGroup" is empty HOT 10
- Cannot Bind Argument to Parameter "Rows" because its is empty collection following PCI devices. HOT 1
- vSphere 8.0.2-22617221 - New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection. HOT 8
- Host Network Section - NSX-T virtual switch portgroup labels are erroneously associated with a VMKernel port HOT 2
- New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection. HOT 2
- vCenter Resource Summary displayed only with $InfoLevel.vCenter -eq 2
- Machine SSL certificate information not working using the vcenter IP address as -Target
- SDRS VM Overrides display duplicate VMs if the vCenter is connected by IP and FQDN
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asbuiltreport.vmware.vsphere.