baber's Posts

Yes . The problem relates to this part that  I resided it between 2 if    Get-Cluster -Name $clusterName | Get-VM | ForEach-Object -Process { Get-VMHost $hostname | New-AdvancedSetting -Entity $_... See more...
Yes . The problem relates to this part that  I resided it between 2 if    Get-Cluster -Name $clusterName | Get-VM | ForEach-Object -Process { Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name log.keepOld -Value '10' -Confirm:$false -Force Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name RemoteDisplay.maxConnections -Value '1' -Confirm:$false -Force Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name log.rotateSize -Value '2048000' -Confirm:$false -Force   "Please choose an Option to apply configurations:" "1- Select Host" "2- Apply on All ESXi Host" $options= Read-Host "Enter your Number 1/2" if ( 1 -eq $options ) { $hostname= read-host "Please enter your hostname" Write-Output "esxi-7.account-auto-unlock-time" Get-VMHost $hostname | Get-AdvancedSetting Security.AccountUnlockTime | Set-AdvancedSetting -Value 900 } Get-Cluster -Name $clusterName | Get-VM | ForEach-Object -Process { Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name log.keepOld -Value '10' -Confirm:$false -Force Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name RemoteDisplay.maxConnections -Value '1' -Confirm:$false -Force Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name log.rotateSize -Value '2048000' -Confirm:$false -Force } if ( 2 -eq $options ) { Write-Output "6- esxi-7.account-auto-unlock-time" | Green Get-VMHost | Get-AdvancedSetting Security.AccountUnlockTime | Set-AdvancedSetting -Value 900 } else { Write-Output "Insert correct number" | Red }   How can correct it ?
I have written follow script with if condition but when I choose 3 it shows many error although I want it just show "Insert correct digit" "Please choose an Option to apply configurations:" "1- Sel... See more...
I have written follow script with if condition but when I choose 3 it shows many error although I want it just show "Insert correct digit" "Please choose an Option to apply configurations:" "1- Select Host" "2- Apply on All ESXi Host" $options= Read-Host "Enter your Number 1/2" if ( 1 -eq $options ) { $hostname= read-host "Please enter your hostname" Write-Output "esxi-7.account-auto-unlock-time" | Green Get-VMHost $hostname | Get-AdvancedSetting Security.AccountUnlockTime | Set-AdvancedSetting -Value 900 } if ( 2 -eq $options ) { Write-Output "6- esxi-7.account-auto-unlock-time" | Green Get-VMHost | Get-AdvancedSetting Security.AccountUnlockTime | Set-AdvancedSetting -Value 900 } else { Write-Output "Insert correct number" } When insert 3 it shows follow error  Get-VMHost : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\HP server\security.ps1:92 char:14 + Get-VMHost $hostname | New-AdvancedSetting -Entity $_ -Name log.kee ... + ~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Get-VMHost], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost   Although it just shows Insert correct number
Thanks  Also I want to apply this on specific hosts and typed such as follow : This will apply on all hosts : Get-VMHostService -VMHost * | where {$_.Key -eq 'snmpd'} | Set-VMHostService -Policy O... See more...
Thanks  Also I want to apply this on specific hosts and typed such as follow : This will apply on all hosts : Get-VMHostService -VMHost * | where {$_.Key -eq 'snmpd'} | Set-VMHostService -Policy Off This will apply on specific host: Get-VMHost $hostname | Get-VMHostService  | where {$_.Key -eq 'snmpd'} | Set-VMHostService -Policy Off Is that correct ?
Thanks . But this can apply on specific VM in the cluster although I want to apply it on all vms on the cluster
Would you please help me about it ?
I want to apply follow configurations on all VMs in the cluster so I write follow . Is that correct ? Get-VM | ForEach-Object -Process { New-AdvancedSetting -Entity $_ -Name isolation.tools.dis... See more...
I want to apply follow configurations on all VMs in the cluster so I write follow . Is that correct ? Get-VM | ForEach-Object -Process { New-AdvancedSetting -Entity $_ -Name isolation.tools.diskShrink.disable -Value 'TRUE' -Confirm:$false -Force New-AdvancedSetting -Entity $_ -Name isolation.tools.diskWiper.disable -Value 'TRUE' -Confirm:$false -Force New-AdvancedSetting -Entity $_ -Name log.keepOld -Value '10' -Confirm:$false -Force New-AdvancedSetting -Entity $_ -Name RemoteDisplay.maxConnections -Value '1' -Confirm:$false -Force New-AdvancedSetting -Entity $_ -Name log.rotateSize -Value '2048000' -Confirm:$false -Force }   BR  
I am writing a script this is applying on hosts but it ask question and need to respond it so how can set it to respond Y  Write-Output "40- esxi-7.shell-disable" | Green Get-VMHost | Get-VMHostSer... See more...
I am writing a script this is applying on hosts but it ask question and need to respond it so how can set it to respond Y  Write-Output "40- esxi-7.shell-disable" | Green Get-VMHost | Get-VMHostService -VMHost * | where {$_.Key -eq 'TSM'} | Set-VMHostService -Policy Off Get-VMHost | Get-VMHostService -VMHost * | where {$_.Key -eq 'TSM'} | Stop-VMHostService For example it shows follow :   PS C:\Users\Administrator> Get-VMHostService -VMHost * | where {$_.Key -eq 'TSM'} | Stop-VMHostService Perform operation? Perform operation Stop host service. on ESXi Shell? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):   I want it set auto answer Y  
Yes . We n add these parameters but want to know Does it recommend ? For example when we don't have : vm-7.disable-console-copy vm-7.disable-console-paste so we cannot do copy -paste between syste... See more...
Yes . We n add these parameters but want to know Does it recommend ? For example when we don't have : vm-7.disable-console-copy vm-7.disable-console-paste so we cannot do copy -paste between system and console so why should ass this parameter and change its value to True ?
That is so strange in security configuration guide just mentioned edit these parameters not saying about add parameters as new configuration
As you know there are some parameters for vsphere7 Hardening for virtual machines such as follow : isolation.tools.copy.disable isolation.tools.paste.disable isolation.tools.diskShrink.disable is... See more...
As you know there are some parameters for vsphere7 Hardening for virtual machines such as follow : isolation.tools.copy.disable isolation.tools.paste.disable isolation.tools.diskShrink.disable isolation.tools.diskWiper.disable But There are not any of above parameters on my vms . What should I do ? Do I have to insert them manually on all of VM ?
But could not find any document to find out how can assign VMware tools as components but that is not rational solution to create a new cluster to update VMware Tools by base line and another move to... See more...
But could not find any document to find out how can assign VMware tools as components but that is not rational solution to create a new cluster to update VMware Tools by base line and another move to single Image .
But As I know there are not any option to add VMware Tools to image . Actually I am not sure just guess we cannot update VMware Tools on hosts by vLCM when using single image I think the solution is ... See more...
But As I know there are not any option to add VMware Tools to image . Actually I am not sure just guess we cannot update VMware Tools on hosts by vLCM when using single image I think the solution is just apply with esxcli . But I am not sure just guess about it
I have downloaded latest VMware tools vib file "VMware-Tools-12.1.5-core-offline-depot-ESXi-all-20735119.zip" and import it in vCenter by vLCM I am using single image . after import it I have create... See more...
I have downloaded latest VMware tools vib file "VMware-Tools-12.1.5-core-offline-depot-ESXi-all-20735119.zip" and import it in vCenter by vLCM I am using single image . after import it I have created a baseline for that with the name Tools but now there is not any option to apply it on ESXi hosts although in VUM there was an option to apply baselines on esxi hosts . What should I do now ? How can update VMware Tools on my hosts ?
I don't want to use portmirroring because it cannot support vmotion for both source and destination regardless of the virtual switch type, you could have VM1 and VM50 on their own port group. Does ... See more...
I don't want to use portmirroring because it cannot support vmotion for both source and destination regardless of the virtual switch type, you could have VM1 and VM50 on their own port group. Does it your mean we must reside both VMs on separate portgroup ?
I have a portgroup that contains more than 50VMs (VM1-VM50) now VM50 wants to listen all traffics (send/receive) on VM1. So as I know at the first step had to Accept Promiscuous mode on VM1 and this ... See more...
I have a portgroup that contains more than 50VMs (VM1-VM50) now VM50 wants to listen all traffics (send/receive) on VM1. So as I know at the first step had to Accept Promiscuous mode on VM1 and this is possible , but the problem is when I enable Promiscuous mode on VM1 it can listen all VM's traffic in that portgroup although I want just it listen traffics for VM50. What should I do ?
total 949534208 -rw------- 1 root root 3922 Jul 22 2021 Tshoot.vmxf -rw------- 1 root root 270840 Oct 23 06:50 Tshoot.nvram -rw------- 1 root root 529 Oct 24 05:47 Tshoot_3.vmdk -rw------- 1 root... See more...
total 949534208 -rw------- 1 root root 3922 Jul 22 2021 Tshoot.vmxf -rw------- 1 root root 270840 Oct 23 06:50 Tshoot.nvram -rw------- 1 root root 529 Oct 24 05:47 Tshoot_3.vmdk -rw------- 1 root root 966367641600 Oct 24 05:47 Tshoot_3-flat.vmdk -rw------- 1 root root 314 Oct 24 05:47 Tshoot_3-000002.vmdk -rw-r--r-- 1 root root 103 Oct 27 09:22 Tshoot-150f8855.hlog -rw------- 1 root root 77 Oct 31 11:24 Tshoot.vmsd -rw------- 1 root root 14 Oct 31 11:24 Tshoot-aux.xml -rw-r--r-- 1 root root 69499 Nov 7 10:46 vmware-78.log -rw-r--r-- 1 root root 63597 Nov 7 10:47 vmware-79.log -rw-r--r-- 1 root root 63603 Nov 7 10:50 vmware-80.log -rw-r--r-- 1 root root 63594 Nov 7 10:53 vmware-81.log -rw-r--r-- 1 root root 63609 Nov 7 10:56 vmware-82.log -rw-r--r-- 1 root root 63594 Nov 7 10:59 vmware-83.log -rw-r--r-- 1 root root 63609 Nov 7 11:02 vmware.log -rw------- 1 root root 8534114304 Nov 7 11:02 Tshoot_3-000002-sesparse.vmdk -rwxr-xr-x 1 root root 5401 Nov 7 20:28 Tshoot.vmx
Can anyone help me about it ?
I want to know is there any difference if we kill a job in the UI or Kill it by Powercli ?  Because most of the time when we kill a job in the UI it will takes time and cannot kill it immediately Now... See more...
I want to know is there any difference if we kill a job in the UI or Kill it by Powercli ?  Because most of the time when we kill a job in the UI it will takes time and cannot kill it immediately Now want to know Will the job kill immediately (force) when we do it by Powercli ?
I have a vm that cannot power on because the snapshot could not removed completely when I want to power it on shows follow error : File /vmfs/volumes/a38a0b78-37951fd2/Tshoot_c1a869d5-3dc5-4516-967a... See more...
I have a vm that cannot power on because the snapshot could not removed completely when I want to power it on shows follow error : File /vmfs/volumes/a38a0b78-37951fd2/Tshoot_c1a869d5-3dc5-4516-967a-49179a020bef/FileServer-DSA-000002.vmdk was not found Failed to start the virtual machine. Module Disk power on failed. Cannot open the disk '/vmfs/volumes/a38a0b78-37951fd2/Tshoot_c1a869d5-3dc5-4516-967a-49179a020bef/FileServer-DSA-000002.vmdk' or one of the snapshot disks it depends on. The system cannot find the file specified VMware ESX cannot find the virtual disk "/vmfs/volumes/a38a0b78-37951fd2/Tshoot_c1a869d5-3dc5-4516-967a-49179a020bef/FileServer-DSA-000002.vmdk". Verify the path is valid and try again   and this is Tshoot_3.vmdk content   # Disk DescriptorFile version=1 encoding="UTF-8" CID=799c19b8 parentCID=ffffffff createType="vmfs" # Extent description RW 1887436800 VMFS "Tshoot_3-flat.vmdk" # The Disk Data Base #DDB ddb.adapterType = "lsilogic" ddb.deletable = "true" ddb.geometry.cylinders = "117487" ddb.geometry.heads = "255" ddb.geometry.sectors = "63" ddb.longContentID = "5c5b015322810e98f49c28f8799c19b8" ddb.toolsInstallType = "1" ddb.toolsVersion = "11333" ddb.uuid = "60 00 C2 94 20 95 d2 ff-7a fd a7 10 f6 e1 77 bf" ddb.virtualHWVersion = "14"   This is Tshoot_3-000002.vmdk   # Disk DescriptorFile version=1 encoding="UTF-8" CID=61c09cac parentCID=799c19b8 createType="seSparse" parentFileNameHint="Tshoot_3.vmdk" # Extent description RW 1887436800 SESPARSE "Tshoot_3-000002-sesparse.vmdk" # The Disk Data Base #DDB ddb.grain = "8" ddb.longContentID = "bcb572a69e5ca46342ad277361c09cac"   How can solve the issue to power it on ?
As I find out Is that your means there is not any solution to kill  force a running process  ? Does it take same time such as cancel in the UI ?