none
finding out a protection group from a data source RRS feed

  • Question

  • Help

    I cant seem to work this out, i need to be able to search for a server and work out what protection group its in.

    Get-DPMProductionServer -DPMServerName $dpmservername | Where-Object {$_.Servername -eq 'SERVERNAME'}

    returns me the server in question but there is no object that refers to the protection group its in.

    I need to delete a server basically without knowing the group its in

    Can anyone help?


    • Edited by richsmif Tuesday, March 24, 2020 5:26 PM
    Tuesday, March 24, 2020 5:15 PM

Answers

  • The script below should return all of the protection groups that the server is member of:

    $DataSource = Get-DPMDatasource -DPMServerName "DPMserver.fqdn.com" | Where-Object Computer -eq 'YourServer.fqdn.com'
    $ProtectionGroup = $DataSource.ProtectionGroupName
    $ProtectionGroup

    You can also change the "Computer" to "Name" to have the name of the datasource instead:

    $DataSource = Get-DPMDatasource -DPMServerName "DPMserver.fqdn.com" | Where-Object Name -eq 'YourDataSource'
    $ProtectionGroup = $DataSource.ProtectionGroupName
    $ProtectionGroup


    Blog: https://thesystemcenterblog.com LinkedIn:


    • Edited by Leon Laude Wednesday, March 25, 2020 11:50 AM
    • Marked as answer by richsmif Thursday, March 26, 2020 9:43 AM
    Wednesday, March 25, 2020 11:41 AM

All replies

  • Hi,

    You could simply search for the datasource or by the computer name within the DPM console:

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, March 24, 2020 5:58 PM
  • Users wont have access to the console, needs to be powershell im afraid.  :-(
    Wednesday, March 25, 2020 10:07 AM
  • The script below should return all of the protection groups that the server is member of:

    $DataSource = Get-DPMDatasource -DPMServerName "DPMserver.fqdn.com" | Where-Object Computer -eq 'YourServer.fqdn.com'
    $ProtectionGroup = $DataSource.ProtectionGroupName
    $ProtectionGroup

    You can also change the "Computer" to "Name" to have the name of the datasource instead:

    $DataSource = Get-DPMDatasource -DPMServerName "DPMserver.fqdn.com" | Where-Object Name -eq 'YourDataSource'
    $ProtectionGroup = $DataSource.ProtectionGroupName
    $ProtectionGroup


    Blog: https://thesystemcenterblog.com LinkedIn:


    • Edited by Leon Laude Wednesday, March 25, 2020 11:50 AM
    • Marked as answer by richsmif Thursday, March 26, 2020 9:43 AM
    Wednesday, March 25, 2020 11:41 AM
  • Perfect, just want i wanted.  Thank you!
    Thursday, March 26, 2020 9:43 AM