PSGhost - Manage your Ghost Blog with PowerShell
Setup Instructions
- Download PSGhost from the PowerShell Gallery (
Install-Module PSGhost
)
- Create a custom integration for Ghost. https://ghost.org/integrations/custom-integrations/#add-a-new-custom-integration
- Find your API keys in the Ghost console from your custom integration at https://%account-name%.ghost.io/ghost/#/settings/integrations.
- Save all API keys and the API URL to your local configuration. This command saves your API keys encrypted to \configuration.json
Save-GhostConfigurationItem -Label ContentApiKey -Value 'XXXXXXXXX'
Save-GhostConfigurationItem -Label AdminApiKey -Value 'XXXXXXXX'
Save-GhostConfigurationItem -Label ApiUrl -Value 'https://<account-name>.ghost.io'
Save-GhostConfigurationItem -Label UserName -Value 'XXXXXX'
Save-GhostConfigurationItem -Label UserPassword -Value 'XXXXXXXX'
- Run
Get-GhostConfiguration
to ensure all API keys are returned decrypted.
- Run a command to ensure no errors are returned:
Get-GhostSettings
.