VMware Cloud Community
jcouch
Enthusiast
Enthusiast
Jump to solution

Delete files from /usr/lib/vmware/hostd/docroot/downloads with Powercli

I am tying to accomplish the same goal as their example cronjob in this KB with PowerCLI or C# :
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=102635...

We have tools that gather our ESX/ESXi log bundles and ship it to Vmware support for analysis, but the files never get removed from the */downloads directory on the hosts.

We have a mixed  esx 3.5 / esx 4.0 / esxi 4.1 environment. I would prefer not to run local cronjobs on hosts. Does anyone have a good way to handle this with either PowerCLI or C# code against vCenter?

Thanks!

Jeff

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

On the ESX servers, where you have a COS, you can use the plink.exe command from the PuTTT Suite.

There is an example in the HBA Information: PowerCLI thread.

On an ESXi server you can use the same procedure, but it requires a bit more.

And the environment you connect to is a bit more limited compared to the COS.

See Change password polices on ESXi for an example


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

On the ESX servers, where you have a COS, you can use the plink.exe command from the PuTTT Suite.

There is an example in the HBA Information: PowerCLI thread.

On an ESXi server you can use the same procedure, but it requires a bit more.

And the environment you connect to is a bit more limited compared to the COS.

See Change password polices on ESXi for an example


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jcouch
Enthusiast
Enthusiast
Jump to solution

Thanks Luc for solidifying my original thoughts.  I thought about using the plink method, but it is complicated with remote TSM disabled. Like you suggested in the above discussions, it is however possible.

If this is the only way, then it is what it is! Smiley Happy

0 Kudos