I need to run a script in my VMware vcenter server. The Instructions are:
I downloaded the WMware CLI in powershell 7 using: Install-Module -Name VMware.PowerCLI -RequiredVersion 22.214.171.12455375
I connected to my vSphere server using the command Connect-VIServer -Server -My server name-
How would I run the script files from my windows PC in this CLI shell? I turned on BASH shell in my appliance.
Moderator: Thread moved to the vCenter Server area.
Hey, hope you are doing fine.
Usually .sh files are for bash shell scripts which are for unix/linux based systems.
In this case I think that script is intended to be ran on a VCSA (vCenter Server Appliance - Linux Based) instead of on windows.
If it were a windows Powershell/PowerCli script it would end on .ps1
If you have the KB where you obtained the steps or the steps you are trying to accomplish i would gladly help
As i can see you are trying to follow this KB for vSphere Lifecycle Manager which has been introduced in vSphere 7: VMware Knowledge Base
What you need to do is really easy just copy the downloaded files inside the vCenter Server Appliance using WinSCP or Filezilla or any tool you are familiar with to copy files. Once inside the VCSA go to the location where you copied the files an execute the .sh file using the next command: ./cleanup_patch_store.sh
The KB does not detail anything about permissions to be assigned to the file so i just assume that is missing. If you cannot run the file with the previously mentioned command first run chmod +x cleanup_patch_store.sh and after that try to run the file again.
Let us know how it goes.