Fang001's Posts

Hi, I have question about Set-PowerCLIConfiguration with powerclicore. I used InvalidCertificateAction option for ignoring server certification in Docker Linux. It's work. Then, I wrote C# cod... See more...
Hi, I have question about Set-PowerCLIConfiguration with powerclicore. I used InvalidCertificateAction option for ignoring server certification in Docker Linux. It's work. Then, I wrote C# code. However, it isn't work on Docker Linux.   using (var handler = new HttpClientHandler())   {         handler.ServerCertificateCustomValidationCallback = (message, xcert, chain, errors) => true;   } How can I do for ignoring server certification like the command? Thanks
Hi all,     My purpose is collecting the task when vm is running. Then, I always get the exception message "The operation is not supported on the object." when call CreateCollectorForTasks.  ... See more...
Hi all,     My purpose is collecting the task when vm is running. Then, I always get the exception message "The operation is not supported on the object." when call CreateCollectorForTasks.     I try to use powercli command to clarify the problem. However, it always get error call when I use Get-View TaskManager.     Could someone provide the sample command about TaskManager usage?or tell me the problem about my TaskManager problem.   My code as follows:                     TaskManager taskmgr = new TaskManager(_client, _client.ServiceContent.TaskManager);                     taskmgr.UpdateViewData();                     TaskFilterSpec filter = new TaskFilterSpec();                     filter.Entity = new TaskFilterSpecByEntity();                     filter.Entity.Entity = _vm.MoRef;                                         ManagedObjectReference moRf = taskmgr.CreateCollectorForTasks(filter);                     TaskHistoryCollector histaskmgr = new TaskHistoryCollector(_client, moRf);
Hi Bayu Wibowo,     I mean login automatically in guest OS.     In vm workstation, there are the setting which can login guest os when vm is start. Thanks
Hi LucD,     Thanks for your information.     I found the bug of the program because your command.
Hi all,      Is possible configure windows to login automatically on VMware ESXi 6.5 by PowerCli? I found the article which doesn't support on ESXi 5.5. However, I can't find this information ... See more...
Hi all,      Is possible configure windows to login automatically on VMware ESXi 6.5 by PowerCli? I found the article which doesn't support on ESXi 5.5. However, I can't find this information in the SDK design doc. May someone know about this? Where can find the information? Isn't it also support ESXi 6.5?
Hi all,           I can't find this information on Powercli SDK 6.5 document.      Could someone please answer my question? Manay thanks
Hi all,      I am a new guy with powercli. I can't find these relatived information on 6.5 SDK Documnet.  Could someone help me to answer it? Many thanks
Hi all,      I would like to ask how to create a directory on the guest VM by using GuestFileManager?      Could someone provide example code? Because I always get exception when I call MakeD... See more...
Hi all,      I would like to ask how to create a directory on the guest VM by using GuestFileManager?      Could someone provide example code? Because I always get exception when I call MakeDirectoryInGuest()      Many thanks.          _service = _client.Connect(_hostName);     NameValueCollection nvcFilter = new NameValueCollection();     nvcFilter.Add("Name", "W81x64");     _vm = (VirtualMachine)_client.FindEntityView(typeof(VirtualMachine), null, nvcFilter, null);      string DirectoryPath = @"C:\TestFolder\";      NamePasswordAuthentication auth = new NamePasswordAuthentication();      auth.Password = "admin";      auth.Username = "password";      auth.InteractiveSession = false;      GuestFileManager guestfilemgr = new GuestFileManager(VimClient, _service.FileManager);      guestfilemgr.MakeDirectoryInGuest(_vm.Runtime.Host,auth, DirectoryPath, true);
Hi all,     I search the all examples from Java and C# about this function usage. However, I always get the exception    "The object 'vim.vm.guest.ProcessManager:guestOperationsProcessMa... See more...
Hi all,     I search the all examples from Java and C# about this function usage. However, I always get the exception    "The object 'vim.vm.guest.ProcessManager:guestOperationsProcessManager' has already been deleted or has not been completely created"    VMware.Vim.VimException.     Could someone help it?                  NameValueCollection nvcFilter = new NameValueCollection();                nvcFilter.Add("Name", "W81x64");                _vm = (VirtualMachine)_client.FindEntityView(typeof(VirtualMachine), null, nvcFilter, null);                                           while (true)                {                    _vm.UpdateViewData();                    if (_vm.Guest.ToolsStatus == VirtualMachineToolsStatus.toolsOk)                    {                        break;                    }                    Thread.Sleep(3000);                }                              NamePasswordAuthentication auth = new NamePasswordAuthentication();                auth.Password = "admin";                auth.Username = "password";                auth.InteractiveSession = false;                ManagedObjectReference vmRef = new ManagedObjectReference ();                vmRef.Type = "VirtualMachine";                vmRef.Value = "W81x64";                GuestWindowsProgramSpec progSpec = new GuestWindowsProgramSpec();                progSpec.Arguments = "";                progSpec.ProgramPath = @"C:\Windows\system32\calc.exe";                ManagedObjectReference moRf= new ManagedObjectReference();                moRf.Type = "GuestProcessManager";                moRf.Value = "guestOperationsProcessManager";                GuestProcessManager guestprogmgr = new GuestProcessManager(VimClient,moRf);                                            long pid = guestprogmgr.StartProgramInGuest(vmRef, auth, progSpec);