Add PowerShell version: sf-org-lic.ps1

- Complete PowerShell implementation of the license reporting tool
- Full PowerShell parameter handling with Get-Help integration
- Error handling consistent with PowerShell patterns
- Color-coded output using PowerShell Write-Host
- Updated README.md to document both Unix and PowerShell versions
- Added PowerShell examples and installation instructions
- Maintains feature parity with Bash version

Cross-platform support:
- sf-org-lic (Bash/Unix)
- sf-org-lic.ps1 (PowerShell/Windows)
This commit is contained in:
app
2025-09-01 23:43:26 +08:00
parent fafc8fac20
commit d6c55ce0b3
2 changed files with 254 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ Authentication:
Org and metadata:
- **[`sf-org-create` / `sf-org-create.ps1`](#sf-org-create)** - Smart scratch org creation
- **[`sf-org-lic`](#sf-org-lic)** - Salesforce org license utilization report
- **[`sf-org-lic` / `sf-org-lic.ps1`](#sf-org-lic--sf-org-licps1)** - Salesforce org license utilization report
- **[`sf-org-info` / `sf-org-info.ps1`](#sf-org-info--sf-org-infops1)** - Quick org info, limits, and context
- **[`sf-retrieve` / `sf-retrieve.ps1`](#sf-retrieve--sf-retrieveps1)** - Streamlined metadata retrieval (types, manifest, packages)
@@ -176,7 +176,7 @@ sf-org-create -al TestOrg -dd 5 -nn
---
### <a id="sf-org-lic"></a>[🏠](#salesforce-cli-wrapper-scripts) sf-org-lic
### <a id="sf-org-lic--sf-org-licps1"></a>[🏠](#salesforce-cli-wrapper-scripts) sf-org-lic / sf-org-lic.ps1
Generate comprehensive Salesforce license utilization reports.
@@ -184,6 +184,9 @@ Generate comprehensive Salesforce license utilization reports.
```bash
sf-org-lic -to ORG [-hp]
```
```powershell
sf-org-lic.ps1 -to "PROD-ORG"
```
**Options:**
- `-to` - Target org alias or username (required)