mpeneva's Posts

It's normal! It happens sometimes But it's great that you find the clue
Do you have the module loaded in the session you've invoked the corresponding 'Get-' command ?
Hi, I'm not pretty sure that I've understood you, however according to me, you could create a "map" that presents the relationship between vm and desired vm folder. $vmMap = @{    'vmName' = 'vmFo... See more...
Hi, I'm not pretty sure that I've understood you, however according to me, you could create a "map" that presents the relationship between vm and desired vm folder. $vmMap = @{    'vmName' = 'vmFolder' } And than in foreach statement, you'll iterate through the keys and then for a given key , you'll get the desired value (that is the desired vm folder). Could this be working for you ? Regards, Maya
I would suggest to get the vm(s) by the specific tag: Get-VM -Tag <tag_name> However, 1) could you type here how you get the vms fromyour VC ? 2) could you check which are these 4 extra entities a... See more...
I would suggest to get the vm(s) by the specific tag: Get-VM -Tag <tag_name> However, 1) could you type here how you get the vms fromyour VC ? 2) could you check which are these 4 extra entities after your filtering by invoking the script ?
Is it possible to have any other entity in your VC associated with the certain tag that could be returned when invoking that script ?
Hi, here is the link to PowerCLI compatibly matrix: https://developer.vmware.com/docs/15745/  for the latest released PowerCLI . Check this section - " Interopability with VMware Solutions", if that ... See more...
Hi, here is the link to PowerCLI compatibly matrix: https://developer.vmware.com/docs/15745/  for the latest released PowerCLI . Check this section - " Interopability with VMware Solutions", if that could help you.
Thanks, Luc!
Hi, Actually the result is correct because the "Export-CSV" method exports the properties of the object. Could you use Out-File method and export the result in csv file format ?   Maya  
Hi, here is the information of the module's manifest file: # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @( 'VMware.VimAutomation.ViCore.Interop.dll', 'VMwa... See more...
Hi, here is the information of the module's manifest file: # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @( 'VMware.VimAutomation.ViCore.Interop.dll', 'VMware.VimAutomation.ViCore.Cmdlets.dll', 'VMware.VimAutomation.ViCore.Impl.dll', 'VMware.VimAutomation.ViCore.Types.dll', 'VMware.VimAutomation.ViCore.Util10.dll', 'VMware.VimAutomation.ViCore.Util10Ps.dll' ) However, I've downloaded all of the PowerCLI modules and just Import the Core one. And the operation was successful Maya  
HI, The New-HardDisk cmdlet has the needed parameters for these actions (Check the help link above). Regards, Maya
Hi, You need to use the New-HardDisk command. Here is its documentation link: https://developer.vmware.com/docs/powercli/latest/vmware.vimautomation.core/commands/new-harddisk/#CreateNew In your ca... See more...
Hi, You need to use the New-HardDisk command. Here is its documentation link: https://developer.vmware.com/docs/powercli/latest/vmware.vimautomation.core/commands/new-harddisk/#CreateNew In your case, I would do something like : foreach ($vm in $vms){   $vm | New-HardDisk -CapacityGB 10 [any_other_settings if needed to be added] | Out-Null } Regards, Maya
Oh, sorry that's my current config scratch value...I didn't want to make any changes to my local configuration. You change it to yours   Maya
Hi Mike, Here is how I did the successful invocation: (Get-AdvancedSetting -Entity (Get-VMHost $VMHost) -Name "ScratchConfig.ConfiguredScratchLocation") | Set-AdvancedSetting -Value $newValue -Conf... See more...
Hi Mike, Here is how I did the successful invocation: (Get-AdvancedSetting -Entity (Get-VMHost $VMHost) -Name "ScratchConfig.ConfiguredScratchLocation") | Set-AdvancedSetting -Value $newValue -Confirm:$false I've used the pipeline input to the cmdlet in that way. Maya  
Hi, Please, could you check the value of $CurrentScratchPath ? Is it a single value or an array ?  
The error message said "Cannot convert the "compute cluster" value of type "System.String" . What about passing the cluster object to parameter not just the cluster name ?
Sorry for the extra bracket in the second line. Below is my suggestion: $vcConnection = Connect-VIServer -Server <server_IP? -User <user_name> -Password <user_password> $dc = Get-Datacenter -Server... See more...
Sorry for the extra bracket in the second line. Below is my suggestion: $vcConnection = Connect-VIServer -Server <server_IP? -User <user_name> -Password <user_password> $dc = Get-Datacenter -Server $vcConnection $objects = $dc | Get-VMHost -Server $vcConnection| Get-VirtualPortGroup -Server $vcConnection foreach($obj in $objects) { $clusterResult = $dc | Get-Cluster -Server $vcConnection foreach ($cluster in $clusterResult) { $vmHost = $cluster | Get-VMHost $vmHost | Get-VirtualPortGroup | ? {$_.Name -eq $obj.Name} | select @{N='Datacenter'; E = {$dc.Name}}, @{N = 'Portgroup'; E = {$obj.Name}}, @{N = 'VLanId'; E = {$obj.VLanId}}, @{N = 'ClusterName'; E = {$cluster.Name}}, @{N = 'VCenter' ; E={$vcConnection}}, @{N = 'VMHostCount'; E = {$vmHost.Count}}, @{N = 'VMCount'; E = {($vmHost|Get-VM).Count}} } }  
I have made some modifications of Luc's script: $vcConnection = Connect-VIServer -Server <server_IP? -User <user_name> -Password <user_password> $dc = (Get-Datacenter -Server $vcConnection $object... See more...
I have made some modifications of Luc's script: $vcConnection = Connect-VIServer -Server <server_IP? -User <user_name> -Password <user_password> $dc = (Get-Datacenter -Server $vcConnection $objects = $dc | Get-VMHost -Server $vcConnection| Get-VirtualPortGroup -Server $vcConnection foreach($obj in $objects) { $dc | Get-VMHost | Get-VirtualPortGroup | ? {$_.Name -eq $obj.Name} | select @{N='Datacenter';'E' = {$dc.Name}},@{N = 'Portgroup'; E = {$obj.Name}}, @{N = 'VLanId'; E = {$obj.VLanId}} } Does this work for you ?
You are right Luc. It said only "virtual switches".
I think that you need to use Get-VDSecurityPolicy for distributed switches
Hi, Try to retrieve the 'standard' switch for a concrete host, so that you could get the default switch security policy: ... Get-VirtualSwitch -VMHost $hostVar.Name -Standard | Get-SecurityPolicy ... See more...
Hi, Try to retrieve the 'standard' switch for a concrete host, so that you could get the default switch security policy: ... Get-VirtualSwitch -VMHost $hostVar.Name -Standard | Get-SecurityPolicy ...