I'm new to this CI/CD and using powershell command "cf install-plugin" in my release pipeline. It's working in the agent windows-2019 but not working in windows-latest. And it's giving error like cf : The term 'cf' is not recognized as the name of a cmdlet, function, script file, or operable program.
Even i tried with command line task, there i'm getting 'cf' is not recognized as an internal or external command,operable program or batch file.##[error]Cmd.exe exited with code '1'.
Please suggest.
According to windows-latest workflows will use Windows Server 2022, Cloud Foundry CLI was removed on windows-2022(windows-latest) due to its low popularity and maintenance concerns.
If you want to use Cloud Foundry CLI in windows-latest, you can add the following command in your PowerShell to install Cloud Foundry CLI before you use it.
choco install cloudfoundry-cli -y
cf install-plugin ...