In this lesson we simulate adding of a vCenter in Powershell.
As a vCenter is already preconfigured in the Environemnt, we can only look at the existing and change some settings
Get-PPDMinventory_sources -Type VCENTER -filter 'address eq "vcsa-7.demo.local"'
You should see the vCenter configuration now:
- Creating a vCenter Credential in PPDM
- Approving the Certificate
- Adding the vCenter
To Add new vCenter Credntials in ppdm, run the command
$CREDS=New-PPDMcredentials -type VCENTER -name testcreds
$CREDS
with the Credentials admin@vsphere.local / Password123! To approve tghe Certificate ( also good for refreshing Certs) use the following Powershell Code
Get-PPDMcertificates -newhost vcsa-7.demo.local -port 443 | Approve-PPDMcertificates
Now we would be ready to add the new vCenter
Add-PPDMinventory_sources -Hostname vcsa-7.demo.local -port 443 -Type VCENTER -isHostingvCenter -ID $CREDS.id -Name "DEMO VCENTER"
This command is expected to fail as the Inventory already exists
Start an icremental discovery using the function Start-PPDMdiscoveries
Get-PPDMinventory_sources -Type VCENTER -filter 'address eq "vcsa-7.demo.local"' | Start-PPDMdiscoveries -level DataCopies -start inventory-sources
With the Knowledge from Module 1, we can now review the discovery activity:
# Replace your Discovery ID here
Get-PPDMactivities -id 1ff60683-41e4-4389-8db7-38a549bc8ba4
Get the VM Backup Threshold Settings
Get-PPDMvm_backup_setting
Review the Properties before we chage:
$VMsettings=Get-PPDMvm_backup_setting
$VMsettings.properties
$VMsettings.properties[0].value=10
$VMsettings.properties[1].value=5
$VMsettings.properties
Set-PPDMvm_backup_setting -vm_backup_setting $VMsettings
<<Module 2 This Concludes Module 3 Lesson 1 Module 3 Lesson 2 >>