- Windows operating system.
- PowerShell installed (version 5.1 or later recommended).
- OpenShift CLI (
oc.exe) downloaded.
- Visit OpenShift CLI Downloads.
- Download the
ocCLI for Windows.
- Open PowerShell and run: New-Item -ItemType Directory {directory}
- Place the
oc.exefile in the {directory}.
- Run the following command in PowerShell: $env:Path += ";{directory}"
- Run the following commands in PowerShell: $CurrentPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::User) [Environment]::SetEnvironmentVariable("Path", $CurrentPath + ";{directory}", [System.EnvironmentVariableTarget]::User)
- Open a new terminal and run: oc version
- You should see the version information for the
ocCLI.
- Ensure you have the necessary permissions to modify environment variables.
- If you encounter issues, restart your terminal or system to apply changes.
Happy OpenShift-ing!