DennieTidwell's Posts

A complete uninstall including deleting all modules in vmware folders and then reinstall corrected this issue.
PS C:\> VMware.VimAutomation.Core\Get-Cluster -Name clustername | Get-VM | Measure-Object Get-VM : 3/15/2018 3:13:06 PM Get-VM Exception has been thrown by the target of an invocation. At line:... See more...
PS C:\> VMware.VimAutomation.Core\Get-Cluster -Name clustername | Get-VM | Measure-Object Get-VM : 3/15/2018 3:13:06 PM Get-VM Exception has been thrown by the target of an invocation. At line:1 char:55 + VMware.VimAutomation.Core\Get-Cluster -Name clustername | Get-VM | Measur ... +                                                       ~~~~~~     + CategoryInfo          : NotSpecified: (:) [Get-VM], VimException     + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Count    : 48 Average  : Sum      : Maximum  : Minimum  : Property : 90 VMs actually in cluster today
C:\> VMware.VimAutomation.Core\Get-Cluster -Name clustername Name                           HAEnabled  HAFailover DrsEnabled DrsAutomationLevel                                            ... See more...
C:\> VMware.VimAutomation.Core\Get-Cluster -Name clustername Name                           HAEnabled  HAFailover DrsEnabled DrsAutomationLevel                                            Level                                     ----                           ---------  ---------- ---------- ------------------  Clustername                       True       1          True       FullyAutomated
Yes, $DefaultVIserver is target Reconnected with same results
On a server 2012 R2 PS C:\> get-cluster clustername | get-vm | measure get-vm : 3/15/2018 2:15:27 PM Get-VM Exception has been thrown by the target of an invocation. At line:1 char:23 + get... See more...
On a server 2012 R2 PS C:\> get-cluster clustername | get-vm | measure get-vm : 3/15/2018 2:15:27 PM Get-VM Exception has been thrown by the target of an invocation. At line:1 char:23 + get-cluster clustername | get-vm | measure +                       ~~~~~~     + CategoryInfo          : NotSpecified: (:) [Get-VM], VimException     + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Count    : 48 Average  : Sum      : Maximum  : Minimum  : Property : PS C:\> get-cluster clustername Name                           HAEnabled  HAFailover DrsEnabled DrsAutomationLevel                                            Level                                     ----                           ---------  ---------- ---------- ------------------  Clustername                       True       1          True       FullyAutomated      PS C:\> get-cluster clustername | get-vm | measure-object get-vm : 3/15/2018 2:17:02 PM Get-VM Exception has been thrown by the target of an invocation. At line:1 char:23 + get-cluster garland | get-vm | measure-object +                       ~~~~~~     + CategoryInfo          : NotSpecified: (:) [Get-VM], VimException     + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Count    : 48 Average  : Sum      : Maximum  : Minimum  : Property : PS C:\> get-cluster clustername | get-vm -ErrorAction SilentlyContinue | measure-object Count    : 48 Average  : Sum      : Maximum  : Minimum  : Property : PS C:\> get-cluster clustername | get-vmhost | measure-object Count    : 3 Average  : Sum      : Maximum  : Minimum  : Property : PS C:\> (get-cluster clustername | get-vmhost).ExtensionData.vm.count 91 PS C:\>
Thank you for your response, Luc. There are 13 datacenters on this vC. Results do not change if I preface commands with get-datacenter. Today I am getting different but still unsatisfactory... See more...
Thank you for your response, Luc. There are 13 datacenters on this vC. Results do not change if I preface commands with get-datacenter. Today I am getting different but still unsatisfactory results. Results when run against full vC are accurate on vm count. C:\> get-vm | measure Count    : 268 Average  : Sum      : Maximum  : Minimum  : Property : get-cluster clustername | get-vm | measure get-cluster : Check the spelling of the cluster name. Otherwise, there might be a problem with your network. Make sure the cluster nodes are turned on and connected to the network or contact your network administrator.     The RPC server is unavailable At line:1 char:1 + get-cluster garland | get-vm | measure + ~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : ConnectionError: (:) [Get-Cluster], ClusterCmdletException     + FullyQualifiedErrorId : ClusterRpcConnection,Microsoft.FailoverClusters.PowerShell.GetClusterCommand Count    : 0 Average  : Sum      : Maximum  : Minimum  : Property : Results of running commands you suggested were all the same. Same results against other clusters. get-cluster : Check the spelling of the cluster name. Otherwise, there might be a problem with your network. Make sure the cluster nodes are turned on and connected to the network or contact your network administrator.     The RPC server is unavailable At line:1 char:1 + get-cluster garland | get-vm | measure + ~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : ConnectionError: (:) [Get-Cluster], ClusterCmdletException     + FullyQualifiedErrorId : ClusterRpcConnection,Microsoft.FailoverClusters.PowerShell.GetClusterCommand Strangely, My vCheck reports are accurate - I guess since get-vm from root is good. There is an update for this vC available.
Get-VM doesn't show actual VMs in cluster. Web Client clearly shows 89 VMs powered up and running. VM count is off. Correct number is 89 VMs in this cluster. Causes issues on performance repor... See more...
Get-VM doesn't show actual VMs in cluster. Web Client clearly shows 89 VMs powered up and running. VM count is off. Correct number is 89 VMs in this cluster. Causes issues on performance reports as only subset is used for calculations. Two resource groups, but subset contains VMs from both (just not all). Checked PS, .Net, PwrCli versions Tried this on several servers/workstations. PS C:\> get-cluster clustername | get-vm | measure get-vm : 3/15/2018 7:14:39 AM Get-VM Exception has been thrown by the target of an invocation. At line:1 char:23 + get-cluster clustername | get-vm | measure +                       ~~~~~~     + CategoryInfo          : NotSpecified: (:) [Get-VM], VimException     + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Count    : 47 Average  : Sum      : Maximum  : Minimum  : Property : PowerCLI Version ----------------    VMware PowerCLI 6.5 Release 1 build 4624819 --------------- Component Versions ---------------    VMware Cis Core PowerCLI Component 6.5 build 4624453    VMware VimAutomation Core PowerCLI Component 6.5 build 4624450    VMWare ImageBuilder PowerCLI Component 6.5 build 4561891    VMWare AutoDeploy PowerCLI Component 6.5 build 4561891    VMware Vds PowerCLI Component 6.5 build 4624695    VMware Cloud PowerCLI Component 6.5 build 4624821    VMware HA PowerCLI Component 6.0 build 4525225    VMware HorizonView PowerCLI Component 7.0.2 build 4596620    VMware Licensing PowerCLI Component 6.5 build 4624822    VMware PCloud PowerCLI Component 6.5 build 4624825    VMware Storage PowerCLI Component 6.5 build 4624820    VMware vROps PowerCLI Component 6.5 build 4624824    VMware vSphere Update Manager PowerCLI 6.5 build 4540462 PS C:\> $psversiontable Name                           Value                                                                                                                                        ----                           -----                                                                                                                                         PSVersion                      5.1.14409.1012                                                                                                                             PSEdition                      Desktop                                                                                                                                     PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                       BuildVersion                   10.0.14409.1012                                                                                                                               CLRVersion                     4.0.30319.42000                                                                                                                               WSManStackVersion              3.0                                                                                                                                           PSRemotingProtocolVersion      2.3                                                                                                                                           SerializationVersion           1.1.0.1                                                                                                                                       PS C:\> Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release 460805
Thanks for your time, Luc. The correlation of stats may be a fluke based on my attempts to make sense of gathered stats. It is a strange coincidence that the numbers resulting from 5 days Mem.... See more...
Thanks for your time, Luc. The correlation of stats may be a fluke based on my attempts to make sense of gathered stats. It is a strange coincidence that the numbers resulting from 5 days Mem.Usage.Average against VMs, calculated against total cluster memory, results in a value within 1% of vC GUI observed and gathered % Mem.Usage.Average over 30 days of aggregate cluster hosts. The desired result of this exercise is to accurately report actual VM requirements for migration purposes. The active memory doesn't reflect this based on my reading as it doesn't include all used memory by the VM. In a 90% windows shop (or 90% anything), I guess shared memory is a wash. Do you have any suggestions for accurately reporting VM requirements in total for migration or capacity planning? I have rewarded all points. Thank you. Happy Holiday.
Hi Luc - thanks for replying. Your comment is well taken although that is not my core question. The core question is whether the metric percentage should be applied to the individual VM all... See more...
Hi Luc - thanks for replying. Your comment is well taken although that is not my core question. The core question is whether the metric percentage should be applied to the individual VM allocated memory or rather the total cluster available memory. Does "Mem.Usage.Average" results run against VMs reflect used memory as a percentage of each VM allocated memory or as a percentage of total cluster available memory? The SDK reference is not definitive on this the way I read it. Based on my results, when applied to individual VM allocated memory, the resulting total used memory on each VM is very small. When these individual VM memory used results are summed up in Excel, they are tiny, when the observed memory use in the cluster is consistently above 75% on every host. When I run the "Mem.Usage.Average" against the hosts, the numbers are consistent with observed vC GUI results. (ie. the host report using this same metric (although using 30 days) is consistently over 75% per host) When I compare results of Mem.Usage.Average % * VM MemoryMB allocated as run against VMs and total them - they are significantly lower as to be unreal. BTW, I was on Amazon the other day and saw what appeared to be an upcoming book on Powercli Performance scripting methods authored by you. It wasn't available yet and I haven't been able to find it since. Do you have another book on the way? Cause I want it. Thanks Dennie
Please see attachment for full story. Please give me a sanity check on this. I was using the “Mem.Usage.Average” as a % against VM allocated MemoryMB. The sum of these calculations was coming ... See more...
Please see attachment for full story. Please give me a sanity check on this. I was using the “Mem.Usage.Average” as a % against VM allocated MemoryMB. The sum of these calculations was coming nowhere near the actual calculations from vCenter based on %Memory. So, I modified my calculations as you see in the spreadsheet to use the “Mem.Usage.Average” against the total aggregate available across all hosts in the cluster. This sum came within 1% of my calculations based on vCenter GUI. Am I correct in using “Mem.Usage.Average” against the total aggregate of cluster host memory instead of against VM allocated memory? Thxs- SDK is not clear on “total configured or available memory”. https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/memory_counters.html description Portion of memory in use as a percentage of total configured or available memory. $start = (Get-Date).AddDays(-5) get-cluster -Location ActualClusterName | Get-VM | Where {$_.PowerState -eq "PoweredOn"} @{N="Mem.Usage.Average";E={[Math]::Round((($_ |Get-Stat -Stat mem.usage.average -Start $start -Finish $finish -IntervalMins 1800 -MaxSamples (250) |Measure-Object Value -Average).Average),2)}} ` Cluster is 6 hosts with 128G per host for total of 768G (786432 MB RAM) There are 118 powered on VMs
My desire to provide a "ready to forward" report continues. The Hal Rottenberg script with a small modification provides all output required. My problem continues to be providing a filtered re... See more...
My desire to provide a "ready to forward" report continues. The Hal Rottenberg script with a small modification provides all output required. My problem continues to be providing a filtered report that contains only pertinent information without manual filtering. Output desired (specifically those VMs at risk of not vMotioning or Reregistering during HA) VM Name, DriveType, Connected, StartConnected, ISOPath filtered to contain: Are Connected = true or StartConnected = true Are DriveType Host Device or Datastore ISO File And Datastore ISO File is not a Shared LUN Name      DriveType            Connected           StartConnected           ISOPath gggggV1 Datastore ISO File TRUE     FALSE           [] /usr/lib/vmware/isoimages/linux.iso jjjjjjjj01pv Datastore ISO File FALSE      TRUE           [] /usr/lib/vmware/isoimages/linux.iso gGGGgV1 Host Device      TRUE     FALSE           jjjjLLLj01pv  Host Device      FALSE      TRUE           NrrrrrV      Datastore ISO File TRUE  TRUE                                          [S_LUN1] iso/Win2KSESP4.iso VVddddV      Datastore ISO File TRUE  TRUE  [A_LUN001] iso/GImage/LiteTouchPE_x64.iso CWI01PV      Datastore ISO File FALSE  FALSE  [] /vmimages/tools-isoimages/windows.iso hhhh2sv      Datastore ISO File FALSE  FALSE  [] /usr/lib/vmware/isoimages/linux.iso zzzzP14      Datastore ISO File FALSE  FALSE  [] Modified Script $Name = "*" $vmCol = Get-VM -Name $Name $Output = @() foreach ($vm in $vmCol) {     $vm | Get-CDDrive | ForEach-Object {         $process = "" | select Name, DriveType, Connected, StartConnected, ISOPath         $process.Name = $vm.Name   switch ( $_ ) {             { $_.IsoPath }        { $process.DriveType = "Datastore ISO File" }             { $_.HostDevice }    { $process.DriveType = "Host Device" }             default                { $process.DriveType = "Client Device " }         }         $process.Connected = $_.ConnectionState.Connected   $process.StartConnected = $_.ConnectionState.StartConnected   $process.ISOPath = $_.ISOPath   $Output += $process } } $Output | Export-Csv $filelocation -NoTypeInformation
Thanks Hal of Hal Rottenberg's TFM $Name = "*" $vmCol = Get-VM -Name $Name $Output = @() foreach ($vm in $vmCol) {     $vm | Get-CDDrive | ForEach-Object {         $process = "" | select ... See more...
Thanks Hal of Hal Rottenberg's TFM $Name = "*" $vmCol = Get-VM -Name $Name $Output = @() foreach ($vm in $vmCol) {     $vm | Get-CDDrive | ForEach-Object {         $process = "" | select Name, DriveType, Connected, StartConnected         $process.Name = $vm.Name   switch ( $_ ) {             { $_.IsoPath }        { $process.DriveType = "Datastore ISO File" }             { $_.HostDevice }    { $process.DriveType = "Host Device" }             default                { $process.DriveType = "Client Device " }         }         $process.Connected = $_.ConnectionState.Connected   $process.StartConnected = $_.ConnectionState.StartConnected   $Output += $process   } } $Output | Export-Csv $filelocation -NoTypeInformation "Name","DriveType","Connected","StartConnected" "lllllllllll","Datastore ISO File","True","False" "vvvvvvvvv","Datastore ISO File","True","True" "nnnnn1","Client Device ","False","True" "ggggggggggv","Datastore ISO File","False","False" "ssssssssv","Datastore ISO File","False","False" "xxxxxxxxxpv","Datastore ISO File","False","False" "qqqqqqqqq","Client Device ","False","False" "yyyyyyyyyy","Client Device ","False","False" "uuuuuuuuu","Host Device","False","True" "oooooooooooo","Datastore ISO File","True","True" "vvvvvvvvv","Datastore ISO File","True","True" "eeeeeeeeee","Datastore ISO File","False","False" "nnnnnnnnnnn","Client Device ","False","False" And so, the top two outputs are target filters but with the DS ISO File being a local Host folder (ie. vmimages folder with vmtools isos). If the VM is connected to a shared LUN ISO, it is not a vMotion problem or HA issue; and therefore, should not be on a problem report. The StartConnected config is an issue because the VM may power up under automatic conditions ie Web Servers in pools and then become a vMotion problem or HA issue. So how do I get from this output to automated report with the VM names of Connected OR StartConnected AND DS ISO to unshared/local host ISOs? Whew.
I'm checking out Hal's TFM chap 4 Get-VMCDReport.ps1 now
where {$_.IsoPath) IsoPath         : [] IsoPath         : [] /usr/lib/vmware/isoimages/linux.iso IsoPath         : [SHAREDSTORAGE_LUN001] iso/RHEL3.7/rhel-3-u7-i386-es-disc1.iso ---------- ... See more...
where {$_.IsoPath) IsoPath         : [] IsoPath         : [] /usr/lib/vmware/isoimages/linux.iso IsoPath         : [SHAREDSTORAGE_LUN001] iso/RHEL3.7/rhel-3-u7-i386-es-disc1.iso ---------- Where {$_.IsoPath -match '[]'} errors ---------- Where {$_.IsoPath -match '``[``]'} or Where {$_.IsoPath -match '````[````]*'} no output ---------- {!$_.IsoPath} does not contain the anomaly "[]" in output anomaly does appear in where {$_.IsoPath) so it is "mounted" via this query --------- Please note that I am not concerned with anomaly being in or out of output. It shows up as mounted in isopath query but those anamolies are also "NotConnected" and "NotStartConnected" and should not show up in final filtered output anyways. p0lwE663p0P12           NotConnected, GuestControl, NoStartConnected           [] ------------- Thanks for any suggestions.
At C:\Utilities\tempScripts\LucD_CD_032014.ps1:22 char:31 + Get-VM | Get-CDDrive | where {$_.IsoPath -match '[]'} | Select Parent,Connection ... +                               ~~~~~~~~~~~~~~... See more...
At C:\Utilities\tempScripts\LucD_CD_032014.ps1:22 char:31 + Get-VM | Get-CDDrive | where {$_.IsoPath -match '[]'} | Select Parent,Connection ... +                               ~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : OperationStopped: (:) [], ArgumentException     + FullyQualifiedErrorId : System.ArgumentException May need some character exception syntax.
I don't know how the iso path can contain just "  []  " brackets. This may be a remnant of past Converter or migration operations. It is not permitted and prompts error in normal operations. The ... See more...
I don't know how the iso path can contain just "  []  " brackets. This may be a remnant of past Converter or migration operations. It is not permitted and prompts error in normal operations. The fact is that we have a number of Linux clients with that exact scenario. The CDRoms are NotConnected and NotStartConnected and the ISO is selected and mapped to "  []  ". It doesn't seem pertinent to my goal of providing VM Admins with risks of Connected CDRoms or StartConnected CDRoms with local storage (non-shared datastores) as ISOPath. Although this one liner produces the required data, It does not filter connected state for "only Connected or StartConnected" or ISOPath of "local, non-shared storage" with output of VMname, connectionstate, and ISOpath. Get-VM | Get-CDDrive | where {$_.IsoPath} | Select Parent,ConnectionState,IsoPath Parent ConnectionState IsoPath p0lp0730s01730 Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso Output would include all VMs with ConnectionState: Connected, GuestControl, NoStartConnected Connected, NoGuestControl, NoStartConnected Connected, GuestControl, StartConnected NotConnected, NoGuestControl, StartConnected NotConnected, GuestControl, StartConnected And ISOPaths with local, non-shared storage (determining factor? [] ? MultiHostAccess? ) The filter of: -and  !((Get-Datastore -Name ($_.IsoPath.Split(']')[0]).TrimStart('[')).ExtensionData.Summary.MultipleHostAccess)}} | results in zero output and 5 errors of: Get-Datastore : Cannot validate argument on parameter 'Name'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. At C:\Utilities\tempScripts\LucD_CD_032014.ps1:22 char:181 + ... atastore -Name ($_.IsoPath.Split(']')[0]).TrimStart('[')).ExtensionData.Summary. ... +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidData: (:) [Get-Datastore], ParameterBindingValidationException   + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDatast    ore A working parameter to filter via "where" for the [] has eluded me so far. Perhaps an additional function is required to get to desired output. Goal is to provide VM Admins with specific VMs that are configured such as to pose a true vMotion and/or HA failure without having to manually filter output via Excel for daily reports.
That did same as previous script. 5 of the 'Name" errors and no output. Why are you using "$_.IsoPath -notmatch "^/usr/lib/vmware/isoimages|^/vmimages/tools-isoimages" -and" - doesn't this eli... See more...
That did same as previous script. 5 of the 'Name" errors and no output. Why are you using "$_.IsoPath -notmatch "^/usr/lib/vmware/isoimages|^/vmimages/tools-isoimages" -and" - doesn't this eliminate the local iso mounts from output? The empty double brackets should filter any shared storage. Shouldn't we filter for -eq [] and not use the the "get-datastore -name"?
Luc - thanks for helping. So, the single bracket is a no go, but the double bracket does separate the local from the shared storage. I left enough data in to see all the different combinations... See more...
Luc - thanks for helping. So, the single bracket is a no go, but the double bracket does separate the local from the shared storage. I left enough data in to see all the different combinations. Looks like " CDs with connectionState of connected or start connected  and ISOpath with "[]"" would be target output. " However; we also have to get by that error regarding the null named DS. I don't see a pattern on 5 out of 93 total returned with this query. Parent ConnectionState IsoPath p0lp0730s01730 Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0lp0730s02730 Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0lp0ngt01dv Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0lwCRMp01 Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso 9geWDB66630730 Connected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/windows.iso p06630GDS01730 Connected, GuestControl, StartConnected [l5_sto001] iso/en_windows_server_2012_x64_dvd_915478.iso p0sqp001 Connected, GuestControl, StartConnected [l5_sto001] Windows2003STD-x32SP2.iso 9ge6630VAD30730 Connected, GuestControl, StartConnected [mker_sto001] iso/Gold Image/LiteTouchPE_x64.iso 9ge6630Vkrf30730 Connected, GuestControl, StartConnected [mker_sto001] iso/Gold Image/LiteTouchPE_x64.iso p06630ISYN02730 Connected, GuestControl, StartConnected [mker_sto001] iso/Gold Image/LiteTouchPE_x64.iso p0WWBISYN01730 Connected, GuestControl, StartConnected [mker_sto001] iso/Gold Image/LiteTouchPE_x64.iso p0WWB66604730 Connected, NoGuestControl, StartConnected [l5_sto001] iso/Win2KSESP4.iso p0lwCp011 NotConnected, GuestControl, NoStartConnected [] p0lwe663db11 NotConnected, GuestControl, NoStartConnected [] p0lwE663p0P11 NotConnected, GuestControl, NoStartConnected [] p0lwE663p0P12 NotConnected, GuestControl, NoStartConnected [] p0lwOSPp0P11 NotConnected, GuestControl, NoStartConnected [] p0lwOSPp0P12 NotConnected, GuestControl, NoStartConnected [] CONkrf2 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p011 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0ldb730s01730 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0lwMQS2 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0p0gpm11 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso p0sjs66602730 NotConnected, GuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/solaris.iso p0WBBI01730 NotConnected, GuestControl, NoStartConnected [] /vmimages/tools-isoimages/windows.iso p0wTestVM01QV NotConnected, GuestControl, NoStartConnected [] /vmimages/tools-isoimages/windows.iso p0lp0cctui02dv NotConnected, GuestControl, NoStartConnected [l5_sto001] iso/RHEL3.7/rhel-3-u7-i386-es-disc1.iso p0WDSHQ01DV NotConnected, GuestControl, NoStartConnected [mkAGG_sto001] WIn2003SysprepTools.iso p0WDSHQ01730 NotConnected, GuestControl, NoStartConnected [mkPCISG_5656-120] w2k3_R2_Enterprise_x64_SP2_Disk1.iso p0WDSHRC01730 NotConnected, GuestControl, NoStartConnected [mkPCISG_5656-120] w2k3_R2_Enterprise_x64_SP2_Disk1.iso p0WDSNA01730 NotConnected, GuestControl, NoStartConnected [mkPCISG_5656-120] w2k3_R2_Enterprise_x64_SP2_Disk1.iso p0WDSAkrf1730 NotConnected, GuestControl, NoStartConnected [PCI_sto001] iso/NETFRAMEWORK.ISO p0WDSHOT01730 NotConnected, GuestControl, NoStartConnected [PCI_sto001] iso/w2k3_R2_Standard_x64_SP2_Disk1.iso p0LSNR66601730 NotConnected, GuestControl, StartConnected [DMZ_sto001] ISO/erServer-v6.1.1-0-130618-x64.iso p0lwCCTBp001DV NotConnected, GuestControl, StartConnected [l5_sto001] iso/RHEL3.7/rhel-3-u7-i386-es-disc1.iso p0lwCCTUI01DV NotConnected, GuestControl, StartConnected [l5_sto001] iso/RHEL3.7/rhel-3-u7-i386-es-disc1.iso p0WWBp0p0P01QV NotConnected, GuestControl, StartConnected [mkWKSSG_1751-782] SourceFiles.iso p0lwdcikrf1 NotConnected, NoGuestControl, NoStartConnected [] /usr/lib/vmware/isoimages/linux.iso
Get-Datastore : Cannot validate argument on parameter 'Name'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. At C:\Utilities\temp... See more...
Get-Datastore : Cannot validate argument on parameter 'Name'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. At C:\Utilities\tempScripts\LucD_CD_032014.ps1:22 char:181 + ... atastore -Name ($_.IsoPath.Split(']')[0]).TrimStart('[')).ExtensionData.Summary. ... +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidData: (:) [Get-Datastore], ParameterBindingValidationException   + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDatast    ore I get 5 of these errors and no output on: Get-VM | Where {Get-CDDrive -VM $_ | Where {($_.ConnectionState.StartConnected -eq "true" -or $_.ConnectionState.Connected -eq "true") -and ($_.IsoPath -and !((Get-Datastore -Name ($_.IsoPath.Split(']')[0]).TrimStart('[')).ExtensionData.Summary.MultipleHostAccess))}} | select parent,connectionstate,ISOPath,@{N="DSname";E={($_.IsoPath.Split(']')[0]).TrimStart('[')}} | export-csv $filelocation -NoTypeInformation You can see output received in previous post on the variant of one liner. I'm running script inside PowerGUI where I test all my scripts. Powercli 5.5, Powershell 3 The attempt of mine using bracket was just one try of many different variants including some get-view attempts. Modified requirement:   VMs with connected CDRoms with ISOs on unshared storage As a heads up of vMotion issues to VM Admins.
No luck. Tired and must have tried every syntax combo. Can't sleep until this works. Modified requirement to "Any cdrom that is connected to a non-shared storage LUN ISO". Where-Object :... See more...
No luck. Tired and must have tried every syntax combo. Can't sleep until this works. Modified requirement to "Any cdrom that is connected to a non-shared storage LUN ISO". Where-Object : Cannot bind argument to parameter 'FilterScript' because it is null. At C:\Utilities\tempScripts\CDReport2.ps1:13 char:16 + Get-VM | where ( $_ | Get-CDDrive | +                ~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidData: (:) [Where-Object], ParameterBindingValidationException     + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.WhereObjec    tCommand ************ Get-VM | where ( $_ | Get-CDDrive | where (($_.ConnectionState.Connected -eq "true" -and $_.ISOPath -like "*.ISO*") -and ( $_.ISOPath -inotcontains "]" ))) | select parent,connectionstate,ISOPath,@{N="DSname";E={($_.IsoPath.Split(']')[0]).TrimStart('[')}} | export-csv $filelocation -NoTypeInformation Correct answer points still available.