🌅 This is the 19.14 Vesrion 🌅
the module should be installed from PSgallery
Install-Module -Name PPDM-pwsh -MinimumVersion 19.14.0.20
😛 Install the Pre-Release Version:
Install-Module PPDM-pwsh -AllowPrerelease -MinimumVersion 19.14
We need to initially load the Module and connect to the API Endpoint:
ipmo .\PPDM-pwsh -Force
Connect-PPDMapiEndpoint -PPDM_API_URI https://<your ppdm server> -trustCert
this uses a user password authentication. the token is saved as a Global Variable. You also can use a secure Credentials string to connect. Credentials will be stored in Session ofr easy reconnect
Get-PPDMprotection_policies | ft
Start-PPDMprotection_policies -PolicyID <ID>
this starts the Policy that matches the name Exchange and is not Self Service
Get-PPDMprotection_policies | where { ($_.name -match "Exchange") -and ($_.passive -eq $False) } | Start-PPDMprotection_policies
Get-PPDMactivities -days 1 -PredefinedFilter QUEUED
Get-PPDMactivities -days 1 -PredefinedFilter PROTECT_OK -query Manual | ft
Get-PPDMassets | ft
now we want to see a specific asset
Get-PPDMassets | where name -eq dcnode
And finally view the Storage and Replica Locations .....
(Get-PPDMassets | where name -eq dcnode | Get-PPDMcopy_map).storagelocations
Get-PPDMinventory_sources | ft
Get-PPDMprotection_policies | ft
Start-PPDMprotection_policies -PolicyID 4f8ee8f7-68ef-4c09-8789-17301e82be3a
Get-PPDMactivities -Filter RUNNING | ft
Get-PPDMactivities -query Kubernetes -Filter RUNNING | ft
Get-PPDMprotection_policies | ft
(Get-PPDMprotection_policies -id 200fb9c7-22a8-406b-b495-b6d6457de034).stages | ft
Get-PPDMstorage_systems
Get-PPDMdatadomain_cloud_units -storageSystemId ed9a3cd6-7e69-4332-a299-aaf258e23328
Create a Centralized Exchange Backup Policy In order to create a Primary Backup for Exchange, we fisrt need to create a Schdule locally Schedules for Primary Backup set the Time / Window for Synthetic Fulls, and Optionally the Time For FULLS
$schedule=New-PPDMBackupSchedule -hourly_w_full_weekly -CreateCopyIntervalHrs 2 -CreateFull_Every_DayofWeek SUNDAY -RetentionUnit DAY -RetentionInterval 7
this Translates into a Primary PPDM Backup Schedule as follows:
Now we can set the Backup Policy with Above Schedule, and control Exchange Specific Feature
New-PPDMExchangeBackupPolicy -Schedule $sched -StorageSystemID ed9a3cd6-7e69-4332-a299-aaf258e23328 -consistencyCheck LOGS_ONLY -enabled -encrypted -Name CI_EX_CLI_CENTRAL2
Get-PPDMactivity_metrics
this gets all metrics of the actual day, us -days parameters for extended list
Things can fail, i want to know !
Get-PPDMactivities -query Kubernetes -days 14 -PredefinedFilter PROTECT_FAILED | Select-Object name, id -ExpandProperty result
From above, we can see that predefined query filters are used. PowerProtect comes with it´s own query filters, see more from
Get-Help Get-PPDMactivities -Online
You can use your own Filters:
# get a date stamp from -1 week ( Adjust to you duration)
$myDate=(get-date).AddDays(-7)
$usedate=get-date $myDate -Format yyyy-MM-ddThh:mm:ssZ
# all protection Jobs last week
$FILTER='startTime ge "'+$usedate+'" and parentId eq null and classType in ("JOB", "JOB_GROUP") and category in ("CLOUD_TIER","EXPORT_REUSE","PROTECT","REPLICATE","RESTORE","CLOUD_PROTECT")'
Get-PPDMactivities -Filter $FILTER | Select-Object * -ExpandProperty result | ft
# all failed last week
$FILTER='startTime ge "'+$usedate+'" and parentId eq null and classType in ("JOB", "JOB_GROUP") and category in ("CLOUD_TIER","EXPORT_REUSE","PROTECT","REPLICATE","RESTORE","CLOUD_PROTECT") and result.status eq "FAILED"'
Get-PPDMactivities -Filter $FILTER | Select-Object * -ExpandProperty result | ft
# Protect SUCCEEDED
$FILTER='result.status in ("OK","OK_WITH_ERRORS") and startTime ge "'+$usedate+'" and parentId eq null and classType in ("JOB", "JOB_GROUP") and category in ("PROTECT")'
Get-PPDMactivities -Filter $FILTER | Select-Object * -ExpandProperty result | ft
# filter for failed system jobs
$FILTER='startTime ge "'+$usedate+'" and parentId eq null and classType in ("JOB", "JOB_GROUP") and category in ("CONSOLE","CONFIG","CLOUD_DR","CLOUD_COPY_RECOVER","DELETE","DISASTER_RECOVERY","DISCOVER","MANAGE","NOTIFY","SYSTEM","VALIDATE") and result.status eq "FAILED"'
# filter for Successfull system:
$FILTER='startTime ge "'+$usedate+'" and parentId eq null and classType in ("JOB", "JOB_GROUP") and category in ("CONSOLE","CONFIG","CLOUD_DR","CLOUD_COPY_RECOVER","DELETE","DISASTER_RECOVERY","DISCOVER","MANAGE","NOTIFY","SYSTEM","VALIDATE") and result.status eq "OK"'