Migrated retired applications show as active on the new server. RRS feed

  • Question

  • I am trying to figure out why migrated retired applications and packages  form SCCM 2012 R2 migrate as active to the new server v1702.

    Is there a fix to that?

    -- Adam

    Friday, January 19, 2018 4:26 PM

All replies

  • I guess it might be assumed that if you migrate something you actually want to use it. Why migrate any retired applications over in the first place?
    Friday, January 19, 2018 5:00 PM
  • I guess you are right, and because the client's team refused to remove them :-).

    -- Adam

    Friday, January 19, 2018 5:09 PM
  • Hi,

    You can easily change a list of applications to the retired state.

    On the new server open the PowerShell ISE and load the Configuration Manager module by running the below.

    change these two values to be your details.

    $siteServer = 'cm01.corp.viamonstra.com'

    $siteCode = 'PS1'

    #requires -Version 3
    #region Declare Variables
    $siteServer = 'cm01.corp.viamonstra.com'
    $siteCode = 'PS1'
    function Get-SMSDRIVE
          Connects to Configuration Manager drive
          This function loads the Configuration Manager PowerShell module and then maps to the Configuration Manager drive, the device must have the Configuration Manager Console installed.
          Get-SMSDRIVE PS1
          specifies the site code for the site.
          Get-SMSDRIVE -Sitecode 'PS1'
        [Parameter(Mandatory=$true, Position=0)]
      $CMModulePath = $Env:SMS_ADMIN_UI_PATH.ToString().SubString(0, $Env:SMS_ADMIN_UI_PATH.Length - 5) `
      + '\ConfigurationManager.psd1'
      Import-Module $CMModulePath -Force
      Set-Location -Path "$Sitecode`:"
    . Get-SMSDRIVE -Sitecode $siteCode

    Running this would then change a list of applications to the required state.

    $list = Get-Content -Path C:\Users\Administrator.VIAMONSTRA\Desktop\List.txt
    foreach ($item in $list)
      Get-CMApplication -Name $item | Suspend-CMApplication -whatif

    Once you are happy remove -Whatif

    Friday, January 19, 2018 5:46 PM
  • Wouldn't that set all application into retired state?

    -- Adam

    Friday, January 19, 2018 6:06 PM
  • No,

    It will just change the ones in the list.

    You could remove

    | Suspend-CMApplication -whatif
    That would just show the list on the screen of the applications in the list.

    On your old server you can do a 

    Get-CMApplication | % { if ($_.IsExpired -eq "True") { Write-Output $_.LocalizedDisplayName } }
    to get a list of all the retired applications. Stick that list in a text file and call it in the first script on the new server.

    Friday, January 19, 2018 6:12 PM
  • Got i, so yes, I did export a list by name with powershell.

    Thanks for the help!

    -- Adam

    Friday, January 19, 2018 6:19 PM
  • Have a nice weekend!
    Friday, January 19, 2018 6:21 PM