Hi Abhijeet and Sam, Actually the Vcenter in my organisation has policy enforced not have SSL connectivity , so i cld nt use ansible vm-modules . That is why i had to switch to PWSH using ansible. Jordan's Suggestion worked . But i need to figure out how to remove special characters from o/p using PowerCLi cmds
On Thursday, November 14, 2019 at 9:58:18 AM UTC+5:30, Abhijeet Kasurde wrote: > > Hi Rakesh, > > I agree with Sam and Jordan. You can take a look at this custom VMware > powershell modules to write your own - > https://github.com/Akasurde/ansible-vmware_update_manager > > Thanks > > On Thu, Nov 14, 2019 at 1:44 AM Jordan Borean <[email protected] > <javascript:>> wrote: > >> You could use something like grep to extract it but you could also add >> the following in your powershell script >> >> | Select-Object -ExpandProperty Name >> >> This must come after your Get-* cmdlet call, i.e. 'Get-VMs | >> Select-Object -ExpandProperty Name'. This works by taking in the output >> from the cmdlet and outputting only the values of the Name property. >> >> Thanks >> >> Jordan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/cfaa8c15-8b6e-48b7-9d20-90f17f08713b%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/cfaa8c15-8b6e-48b7-9d20-90f17f08713b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Thanks, > Abhijeet Kasurde > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb3c62df-0fe2-420b-923e-fde549c87be9%40googlegroups.com.
