Tutti21's Posts

I don't think my colleagues find it that interesting to do that again because we migrated some ESX Hosts and the snaphot was 1 h old and we need to do that again and because of our faulty vcenter we ... See more...
I don't think my colleagues find it that interesting to do that again because we migrated some ESX Hosts and the snaphot was 1 h old and we need to do that again and because of our faulty vcenter we have not that much time. So I think we just do the job without script
yeah there are not really any scripts for that out there as I tried to google for vcenter with multible datacenter and only a copy of path + permissions on folders. the rest all worked just not that.... See more...
yeah there are not really any scripts for that out there as I tried to google for vcenter with multible datacenter and only a copy of path + permissions on folders. the rest all worked just not that. For a Powershell noob Other scripts that do the whole migration, I tried it to just copy the things I needed but didnt work because they probably needed the whole code to run.
yeah in the script first 2 line it says no multible datacenter and it seems that it will still to all datacenter but cant keep up with it   on the import script I need to use -permissions  yeah gue... See more...
yeah in the script first 2 line it says no multible datacenter and it seems that it will still to all datacenter but cant keep up with it   on the import script I need to use -permissions  yeah guess what I need to state the datacenter too now too and then it did merge our 4 datacenter is this one and rearanged the folder but I only did the -permissions and  not -folder so I gues I will do the handjob now move it back and make the permission that are missing too.   still thanks for you help
ok so I get a error that I have multible Datacenter in the vcenter  but I only named  one under "datacenter"   then in the import script it tells me something with switches what I dont know what to... See more...
ok so I get a error that I have multible Datacenter in the vcenter  but I only named  one under "datacenter"   then in the import script it tells me something with switches what I dont know what to do
I only get VIobject is empty on the Folder script. I not really good with powershell can you help me merge the Folder and permission script to the Import and Export script?
yeah in the Import file I have 10 with the exact same lines with "UserXXX","admin","true","Test"","Folder" so the script doesn't knwo the exact location of the folders.Can you help me to change this... See more...
yeah in the Import file I have 10 with the exact same lines with "UserXXX","admin","true","Test"","Folder" so the script doesn't knwo the exact location of the folders.Can you help me to change this or is that not possible?
Hello Lucd it seems not all permissions where set I got some lines with   New-VIPermission : the argumentiontransformation for the parameter "Entity" could not be processed. This parameter no longe... See more...
Hello Lucd it seems not all permissions where set I got some lines with   New-VIPermission : the argumentiontransformation for the parameter "Entity" could not be processed. This parameter no longer accepts an array. As an alternative you may pass multiple values by pipeline (if supported by the parameter).
Ok thanks that worked and because I already had the roles in there I only need 1 csv
I get this   New-VIPermission : "System.String" can not be converted to "System.Boolean", for the Parameter "Propagate" is needed. In Z:\Vmware\script\import vcenter.ps1:12 Zeichen:22 +     New-V... See more...
I get this   New-VIPermission : "System.String" can not be converted to "System.Boolean", for the Parameter "Propagate" is needed. In Z:\Vmware\script\import vcenter.ps1:12 Zeichen:22 +     New-Vipermission @Sperm +                      ~~~~~~     + CategoryInfo          : InvalidArgument: (:) [New-VIPermission], ParameterBindingException     + FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission  
but I have now 2 files and not 1 csv, can I just do 1 file and then run again with the other? I did run them and I get "new-VIPermission: System.String cant convert to System Boolean" is it because... See more...
but I have now 2 files and not 1 csv, can I just do 1 file and then run again with the other? I did run them and I get "new-VIPermission: System.String cant convert to System Boolean" is it because the csv dont have worksheet names?
ok now I have to files how do I Import this to the new vcenter?
 powershell cant recognize export-excel seem like I cant do it with Excel Export is it possible to do it with Standard thinks where I dont Need to download Moduls
Hello, because a update killed our vcetner vmware suggested we build a new one. I have already importet the roles + permission to that role how can I Export and Import the permission of a of all r... See more...
Hello, because a update killed our vcetner vmware suggested we build a new one. I have already importet the roles + permission to that role how can I Export and Import the permission of a of all roles on all objects e.g datacenters and folders. will be nice if there is an easy way. by tutti
Thanks LucD I will try this script next week when I have time and the last one sets the command to all CanonicalName starts with 'naa.600'   and megotloves I try to keep that in mind and change it.
ok it is possible that was the Question and now it is how do I do this for like for i in `esxcfg-scsidevs -c | awk '{print$1}' | grep naa.600 `; do esxcli storage nmp psp roundrobin deviceconfig set... See more...
ok it is possible that was the Question and now it is how do I do this for like for i in `esxcfg-scsidevs -c | awk '{print$1}' | grep naa.600 `; do esxcli storage nmp psp roundrobin deviceconfig set --type=iops --iops=1 --device=$i; done I dont even know how to make it into a Get-ESXcli and then I need so do this all for every ESX and all commands how can I do this.
Hello, our Storage configuration need to be update in order to funktion better, so we got a list of commands we need to apply.   Is it possible to script this? We have like 500 Esx Hosts. Becaus w... See more...
Hello, our Storage configuration need to be update in order to funktion better, so we got a list of commands we need to apply.   Is it possible to script this? We have like 500 Esx Hosts. Becaus we need to apply Esxshell commands to EsxHosts  and PowerCli over the vCenter   esxcli system module parameters set -p ql2xmaxqdepth=32 -m qlnativefc Get-AdvancedSetting -Entity EsxHost -Name VMFS3.UseATSForHBOnVMFS5 | Set-AdvancedSetting -Value 0 -Confirm:$false for i in `esxcfg-scsidevs -c | awk '{print$1}' | grep naa.600 `; do esxcli storage nmp psp roundrobin deviceconfig set --type=iops --iops=1 --device=$i; done Get-AdvancedSetting -Entity $esx -Name Disk.DiskMaxIOSize | Set-AdvancedSetting -Value 256 -Confirm:$false | Out-Null esxcli storage core device set --device device_uid --queue-full-threshold 32 --queue-full-sample-size 8  
  Template = $row.Template   I got it now thanks
so I just did command out the #  Template = $templateTab I dont know what the clone from the template is doning but the cloned VMs have 1 CPU 0.25 GB RAM and the Templates both have 2 or 4 ... See more...
so I just did command out the #  Template = $templateTab I dont know what the clone from the template is doning but the cloned VMs have 1 CPU 0.25 GB RAM and the Templates both have 2 or 4 CPUs and 4 or 8 GB RAM at least no error but the wrong configurations seems like it cant find my templates and then just do a default one. but all the parameters from the CSV are set. so what is the right way to call the right template
Get-Template : A positional parameter cannot be found that accepts argument 'System.Collections.Hashtable'. At U:\vmwarescript\Create from CSV.ps1:29 char:5 +     Template = $templateTab +    ... See more...
Get-Template : A positional parameter cannot be found that accepts argument 'System.Collections.Hashtable'. At U:\vmwarescript\Create from CSV.ps1:29 char:5 +     Template = $templateTab +     ~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-Template], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetTemplate Only one error now and have the table now there is it possible to give out what template it used just for testing not need for the real thing    $sVM = @{       Name = $row.Name    Datastore = $row.Datastore    VMHost = $row.VMHost    Location = $row.Folder    }     Template = $templateTab     $templateTab = @{       'VDI-768-VDI-ENTW-00' = 'template1'       'WTS-354-VDI-ENTW-01' = 'template2'    } #   Import-Csv -Path "U:\vmwarescript\WTS.csv" -UseCulture | #  ForEach-Object -Process { #   Get-VM -Name $_.Name |
PS U:\vmwarescript> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; & 'U:\vmwarescript\Create from CSV.ps1' New-VM : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomat... See more...
PS U:\vmwarescript> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; & 'U:\vmwarescript\Create from CSV.ps1' New-VM : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.ViCore.Types.V1.Inventory.Template' required by parameter 'Template'. Specified method is not supported. At U:\vmwarescript\Create from CSV.ps1:63 char:17 +    $vm = New-VM @sVM +                 ~~~~     + CategoryInfo          : InvalidArgument: (:) [New-VM], ParameterBindingException     + FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM   Get-NetworkAdapter : Cannot validate argument on parameter 'VM'. The argument is null. Provide a valid value for the argument, and then try running the command again. At U:\vmwarescript\Create from CSV.ps1:65 char:27 +    Get-NetworkAdapter -VM $vm | Set-NetworkAdapter -MacAddress $row.M ... +                           ~~~     + CategoryInfo          : InvalidData: (:) [Get-NetworkAdapter], ParameterBindingValidationException     + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.GetNetworkAdapter   Set-Annotation : Cannot validate argument on parameter 'Entity'. The argument is null. Provide a valid value for the argument, and then try running the command again. At U:\vmwarescript\Create from CSV.ps1:67 char:27 +    Set-Annotation -Entity $vm -CustomAttribute Ansprechpartner -Value ... +                           ~~~     + CategoryInfo          : InvalidData: (:) [Set-Annotation], ParameterBindingValidationException     + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation     and some more