Set-CMMSIDeploymentType

%3CLINGO-SUB%20id%3D%22lingo-sub-2121251%22%20slang%3D%22en-US%22%3ESet-CMMSIDeploymentType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2121251%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3BI'm%20working%20on%20a%20powershell%20script%20to%20process%20old%20applications%20to%20a%20retired%20state.%26nbsp%3B%20As%20part%20of%20that%2C%20i%20move%20the%20files%20out%20of%20our%20production%20area%20to%20an%20%22old%22%20area.%20that%20works%20fine%2C%20however%20when%20I%20attempt%20to%20set%20the%20deployment%20types%20new%20content%20path%20with%20a%20command%20like%20the%20one%20below%2C%20if%20fails.%26nbsp%3B%20Why%20is%20it%20talking%20about%20a%20wrong%20file%20extension%3F%20my%20command%20doesn't%20reference%20anything%20regarding%20files.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EApp%20deployment%20type%20is%20MSI%20technology%20(%20as%20indicated%20by%20the%20name)%3C%2FP%3E%3CP%3EThe%20installation%20program%20is%20a%20standard%20msi%20install%20with%20a%20log%20switch.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20copied%20the%20cmd%20line%20out%20and%20added%20all%20entries%20directly%20rather%20than%20via%20variables%20and%20run%20from%20an%20elevated%20PS%20ISE%20while%20connected%20to%20the%20site%20and%20still%20see%20the%20same%20message.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20see%20nothing%20of%20use%20on%20the%20doco%20page%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fconfigurationmanager%2Fset-cmmsideploymenttype%3Fview%3Dsccm-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet-CMMsiDeploymentType%20(ConfigurationManager)%20-%20Configuration%20Manager%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20command%20I'm%20running.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3ESet-CMMSIDeploymentType%20%E2%80%93ApplicationName%20'ECM%20Classic%20ODBC%20-%20PROD'%20%E2%80%93DeploymentTypeName%20'ECM%20Classic%20ODBC%20-%20Prod%20-%20Windows%20Installer%20(*.msi%20file)'%20%E2%80%93ContentLocation%20'%5C%5Ccorp%5Ccm%5CLIBRARY%5COLD_SupercededSoftware%5C1_RetiredApplications%5C2019%5CECM%5CClassic-ODBC%5C2019.05%5CPRD%5C'%20-Force%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E**********************************************************%3C%2FP%3E%3CP%3Ereturns%20this%20error%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-CMMSIDeploymentType%20%3A%3CU%3E%3CSTRONG%3E%20Unexpected%20file%20extension%20specified.%20Must%20be%20one%20of%3A%20.msi%3C%2FSTRONG%3E%3C%2FU%3E%3CBR%20%2F%3EAt%20line%3A1%20char%3A5%3CBR%20%2F%3E%2B%20Set-CMMSIDeploymentType%20%E2%80%93ApplicationName%20'ECM%20Classic%20ODBC%20-%20PROD%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidArgument%3A%20(Microsoft.Confi...mentTypeCommand%3ASetMsiDeploymentTypeCommand)%20%5BSet-CMMsiDeploymentType%5D%2C%20InvalidOperationException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20ContentValidationError%2CMicrosoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand%3CBR%20%2F%3E%3CBR%20%2F%3ESet-CMMSIDeploymentType%20%3A%20Validation%20of%20input%20parameters%20failed.%20Cannot%20continue.%3CBR%20%2F%3EAt%20line%3A1%20char%3A5%3CBR%20%2F%3E%2B%20Set-CMMSIDeploymentType%20%E2%80%93ApplicationName%20'ECM%20Classic%20ODBC%20-%20PROD%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidArgument%3A%20(Microsoft.Confi...mentTypeCommand%3ASetMsiDeploymentTypeCommand)%20%5BSet-CMMsiDeploymentType%5D%2C%20InvalidOperationException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20ValidationFailed%2CMicrosoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2121251%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECM%20current%20branch%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESDK%20and%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2121294%22%20slang%3D%22en-US%22%3ERe%3A%20Set-CMMSIDeploymentType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2121294%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20outputting%20the%20error%20and%20got%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Validation%20of%20input%20parameters%20failed.%20Cannot%20continue.%20Unexpected%20file%20extension%20specified.%20Must%20be%20one%20of%3A%20.msi%20No%20content%20destination%20was%20found.%20This%20can%20happen%20when%20an%20invalid%20collection%2C%20distribution%20point%2C%20or%20distribution%20point%20is%20specified%20or%20if%20the%20content%20has%20already%20been%20distributed%20to%20the%20specified%20destination.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewith%20the%20bit%20from%20%22No%20content%20destination...%22%20repeated%20about%20100%20times.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESetting%20the%20content%20path%20to%20where%20the%20files%20was%20never%20essential%2C%20just%20a%20nice%20to%20have%20as%20obviously%20the%20apps%20are%20retired%20and%20shouldn't%20be%20required%20anymore.%26nbsp%3B%20I%20would%20prefer%20to%20have%20it%20working%20though.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2121268%22%20slang%3D%22en-US%22%3ERe%3A%20Set-CMMSIDeploymentType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2121268%22%20slang%3D%22en-US%22%3E%3CP%3EAlso%20add%20that%20running%20basically%20the%20same%20command%20on%20a%20%22Script%20Technology%22%20Deployment%20type%20with%20the%20Set-CMScriptDeploymentType%20command%20works%20perfectly.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20two%20commands%20in%20use%3C%2FP%3E%3CP%3EFirst%20one%20fails%20when%20run%20for%20an%20MSI%20DT%2C%20second%20one%20works%20when%20run%20against%20a%20Script%20DT%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%221%202%203%204%205%206%207%22%3ESet-CMMSIDeploymentType%20%E2%80%93ApplicationName%20%22%24app%22%20%E2%80%93DeploymentTypeName%20%22%24DeploymentTypeName%22%20%E2%80%93ContentLocation%20%22%24RetiredContentDir%22%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%221%202%203%204%205%206%207%22%3ESet-CMScriptDeploymentType%20%E2%80%93ApplicationName%20%22%24app%22%20%E2%80%93DeploymentTypeName%20%22%24DeploymentTypeName%22%20%E2%80%93ContentLocation%20%22%24RetiredContentDir%22%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138209%22%20slang%3D%22en-US%22%3ERe%3A%20Set-CMMSIDeploymentType%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138209%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20done%20some%20more%20testing%20and%20if%20I%20identify%20an%20MSI%20that%20is%20in%20the%20content%20folder%2C%20append%20that%20to%20the%20content%20location%2C%20the%20command%20works...HOWEVER%2C%20it%20also%20wipes%20the%20custom%20command%20line%20for%20installation%20I%20had%20and%20replaces%20it%20with%20a%20generic%20msiexec%20command.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20then%20this%20is%20the%20content%20location%20switch%3C%2FP%3E%3CP%3E-ContentLocation%20'%5C%5Cmyserver%5CMypath%5CmyApp%5Cv1.0%5CICServerManagerApps2.msi'%3C%2FP%3E%3CP%3Eand%20I%20get%20an%20installation%20program%20of%20%22msiexec%20%2Fi%20%22myAppv1.0.msi%22%20%2Fq%22%20which%20has%20replaced%20the%20cmd%20line%20I%20already%20had%20with%20log%20file%20and%20msp%20switches.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20I%20want%20to%20do%20is%20change%20the%20content%20location%2C%20I%20don't%20want%20the%20installation%20cmd%20changed.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20as%20I%20said%20above%20the%20%22Set-CMScript...%22%20works%20with%20just%20a%20path%2C%20I%20just%20tested%20the%26nbsp%3BSet-CMWindowsAppxDeploymentType%26nbsp%3Bcommand%20and%20that%20also%20works%20with%20just%20the%20content%20location%20path.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20understand%20why%20the%20MSI%20one%20is%20different%20and%20why%20I%20can't%20just%20update%20the%20content%20path%20without%20wiping%20my%20installation%20cmd%20and%20replacing%20with%20a%20default%20one.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi,

   I'm working on a powershell script to process old applications to a retired state.  As part of that, i move the files out of our production area to an "old" area. that works fine, however when I attempt to set the deployment types new content path with a command like the one below, if fails.  Why is it talking about a wrong file extension? my command doesn't reference anything regarding files.  

App deployment type is MSI technology ( as indicated by the name)

The installation program is a standard msi install with a log switch. 

 

I have copied the cmd line out and added all entries directly rather than via variables and run from an elevated PS ISE while connected to the site and still see the same message.  

 

I see nothing of use on the doco page - Set-CMMsiDeploymentType (ConfigurationManager) - Configuration Manager | Microsoft Docs

 

This is the command I'm running.  

Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD' –DeploymentTypeName 'ECM Classic ODBC - Prod - Windows Installer (*.msi file)' –ContentLocation '\\corp\cm\LIBRARY\OLD_SupercededSoftware\1_RetiredApplications\2019\ECM\Classic-ODBC\2019.05\PRD\' -Force

 

**********************************************************

returns this error

 

Set-CMMSIDeploymentType : Unexpected file extension specified. Must be one of: .msi
At line:1 char:5
+ Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException
+ FullyQualifiedErrorId : ContentValidationError,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand

Set-CMMSIDeploymentType : Validation of input parameters failed. Cannot continue.
At line:1 char:5
+ Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException
+ FullyQualifiedErrorId : ValidationFailed,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand

4 Replies

Also add that running basically the same command on a "Script Technology" Deployment type with the Set-CMScriptDeploymentType command works perfectly.  

 

the two commands in use

First one fails when run for an MSI DT, second one works when run against a Script DT - 

Set-CMMSIDeploymentType –ApplicationName "$app" –DeploymentTypeName "$DeploymentTypeName" –ContentLocation "$RetiredContentDir"
Set-CMScriptDeploymentType –ApplicationName "$app" –DeploymentTypeName "$DeploymentTypeName" –ContentLocation "$RetiredContentDir"

I tried outputting the error and got this

 

- Validation of input parameters failed. Cannot continue. Unexpected file extension specified. Must be one of: .msi No content destination was found. This can happen when an invalid collection, distribution point, or distribution point is specified or if the content has already been distributed to the specified destination. 

 

with the bit from "No content destination..." repeated about 100 times.  

 

Setting the content path to where the files was never essential, just a nice to have as obviously the apps are retired and shouldn't be required anymore.  I would prefer to have it working though.  

I have done some more testing and if I identify an MSI that is in the content folder, append that to the content location, the command works...HOWEVER, it also wipes the custom command line for installation I had and replaces it with a generic msiexec command.  

so then this is the content location switch

-ContentLocation '\\myserver\Mypath\myApp\v1.0\ICServerManagerApps2.msi'

and I get an installation program of "msiexec /i "myAppv1.0.msi" /q" which has replaced the cmd line I already had with log file and msp switches.  

 

All I want to do is change the content location, I don't want the installation cmd changed.  

 

Note that as I said above the "Set-CMScript..." works with just a path, I just tested the Set-CMWindowsAppxDeploymentType command and that also works with just the content location path.  

I don't understand why the MSI one is different and why I can't just update the content path without wiping my installation cmd and replacing with a default one.  

I'll see if there is an official answer, submitted feedback as per below. 

 

Powershell - Set-CMMSIDeploymentType

maybe I'm doing something wrong here, but I think this command is defective.

set-CMMsiDeploymentType contentPath returns an error when run and it appears to be wanting the name of an MSI file as part of the path, however the content path is a directory, not a file.

for example, running this command returns the error

set-CMMsiDeploymentType -ApplicationName 'MyApp' -DeploymentTypeName 'MyDType - Windows Installer (*.msi file)' -ContentLocation '\\myserver\myapp\V1'

I am trying to change "Content Location" on the second tab in the deployment type - this is a directory, not a file.

the error is
set-CMMsiDeploymentType : Unexpected file extension specified. Must be one of: .msi
At line:1 char:1
+ set-CMMsiDeploymentType -ApplicationName 'Cisco Webex Meetings' -Depl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException
+ FullyQualifiedErrorId : ContentValidationError,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand

set-CMMsiDeploymentType : Validation of input parameters failed. Cannot continue.
At line:1 char:1
+ set-CMMsiDeploymentType -ApplicationName 'Cisco Webex Meetings' -Depl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException
+ FullyQualifiedErrorId : ValidationFailed,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand
***********************************
this doesn't make sense to me, why do i need to somehow figure out what the name of one of the MSI's in the content location is to add to my script when the file isn't used in the content location. I definitely don't want the MSI shown in the content path as obviously that won't work.

Am I missing something?

I have tested this with both Set-CMScriptDeploymentType and Set-CMWindowsAppxDeploymentType - both these work as expected for those types of Deployment Type with just the content location ( no file names required. )

If I browse to the content location for the MSI, locate an MSI in there and append that to the content location, this then updates the content location, HOWEVER, it also wipes the current installation command and replaces it with a generic msi installation commandline for the MSI i put in the config script.

that is, rather than this command
set-CMMsiDeploymentType -ApplicationName 'MyApp' -DeploymentTypeName 'MyDType - Windows Installer (*.msi file)' -ContentLocation '\\myserver\myapp\V1'

I use this (which updates the content path, but also wipes my installation command. )
set-CMMsiDeploymentType -ApplicationName 'MyApp' -DeploymentTypeName 'MyDType - Windows Installer (*.msi file)' -ContentLocation '\\myserver\myapp\V1\myMSIv1.msi'