Why a PowerShell GUI for SAP AI Core?
This PowerShell Code Sample is a single .ps1 file that opens a native Windows Forms GUI. It connects to the SAP AI Core REST API using a service key you paste in at launch. Credentials are held in memory only and are never written to disk.
Prerequisites
What You Need Before You Start
You need an active SAP AI Core service instance with at least one service key, and a Windows machine with PowerShell 5.1 or later.
Requirement Details
| SAP BTP Account | Global account with entitlement for SAP AI Core (extended plan recommended) |
| SAP AI Core Service Instance | Created in a Cloud Foundry space; plan: extended |
| Service Key | At least one service key on the instance — you will copy the JSON credentials |
| Windows 10 / 11 | PowerShell 5.1 ships built-in; no additional runtime needed |
| Execution Policy | Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned if scripts are blocked |
Getting Connected
Connecting to SAP AI Core
When you launch the script, a Connect to SAP AI Core dialog opens immediately. All you need is the JSON from your SAP AI Core service key.
Step 1 — Copy the Service Key JSON from BTP Cockpit
Navigate to your subaccount in SAP BTP Cockpit, go to Services → Instances and Subscriptions, open your SAP AI Core instance, click the service key name under Credentials, and click Copy JSON.
Step 2 — Launch the Script and Paste Your Credentials
Right-click SAP AI Core PowerShell Code Sample.ps1 and choose Run with PowerShell, or open a PowerShell window and run .\SAP AI Core PowerShell Code Sample.ps1. The Connect dialog appears. Paste the JSON into the SERVICE KEY JSON text area and click Connect (or press Ctrl+Enter).
clientId, clientSecret, tokenUrl, aiApiUrl). Nothing is persisted to disk. Clicking Disconnect clears all variables from memory.
Resource Groups
Managing Resource Groups
Resource groups are the primary isolation boundary in SAP AI Core. Each one gets its own namespace for configurations, deployments, artifacts, and secrets. After connecting, the Resource Groups tab loads automatically.
Creating a New Resource Group
Click + New Resource Group. An inline form expands above the list. Enter a Resource Group ID (lowercase letters, digits, and hyphens only). The Document Grounding checkbox is available if your tenant supports it and defaults to disabled.
Click Create Resource Group. New groups appear in PROVISIONING status first, then move to PROVISIONED within seconds once the namespace is ready on the cluster.
Other Actions
- Refresh — re-queries
/v2/admin/resourceGroupsand repaints the grid. - Delete Selected — prompts for confirmation, then deletes the selected resource group.
- View JSON — shows the raw API response for the selected row, including labels and metadata.
Configurations
Orchestration Configurations
An orchestration configuration links a resource group to the SAP AI Core orchestration scenario. Every deployment is based on a configuration, so you need at least one per resource group before you can deploy.
Switch to the Configurations tab and select a resource group from the dropdown. The grid loads all configurations scoped to that group.
Creating a New Configuration
Click + New Configuration. The inline form has three fields:
- Resource Group — pre-selected from the dropdown.
- Configuration Name — defaults to
orchestration, the recommended value matching the SAP AI Core orchestration scenario. - Version — defaults to
0.0.1.
The Scenario and Executable fields are locked to orchestration — the only valid values for the orchestration scenario on the extended plan.
Click Create Configuration. The list refreshes automatically. Select the new row and click Deploy Selected to create a deployment from it — the tool switches to the Deployments tab automatically.
Deployments
Deployments
The Deployments tab shows all deployments for the selected resource group, including deployment ID, current status, target status, configuration ID, and last modified time.
Lifecycle Actions
Action When Available API Call
| Stop | Deployment is RUNNING | PATCH /v2/lm/deployments/{id} with targetStatus: STOPPED |
| Resume | Deployment is STOPPED | PATCH /v2/lm/deployments/{id} with targetStatus: RUNNING |
| Delete | Any state (prompts confirmation) | DELETE /v2/lm/deployments/{id} |
| View JSON | Always | GET /v2/lm/deployments/{id} — full API response |
Get Started
Download and Run
The sample is distributed as a single ZIP containing SAP AI Core PowerShell Code Sample.ps1. No installation, no dependencies beyond what ships with Windows.
- Download the ZIP
UnzipSAP AI Core PowerShell Code Sample.zipto any folder. - Allow script execution (once, per user)
Open PowerShell and run:Set-ExecutionPolicy -Scope CurrentUser RemoteSigned - Run the script
Right-clickSAP AI Core PowerShell Code Sample.ps1→ Run with PowerShell, or from a terminal:.\SAP AI Core PowerShell Code Sample.ps1 - Paste your service key and connect
Copy the credentials JSON from SAP BTP Cockpit, paste it into the dialog, and click Connect.
Ready to Try It?
Download the script, connect with your service key, and manage your SAP AI Core resources from the desktop in under two minutes.
Download PowerShell Code Sample
See and end-to-end video how to use this in context with SAP Business One
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.