Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Powershell comdlet to create package in SCCM

$
0
0

Hi

I am working on a powershell script to create package using definition. The script will scan a shared folder and scan all the .sms files in it. Later script will read each sms file for the application name and create the package. The script does works fine in my one of the testing environment but same script does not work in my second testing environment.

I found that it fails at creation of the application in the second test environment. Tried to run the below cmdlet separately that is being used in script:

New-CMPatckage -FromDefinition -PackageDefinitionName "XXXXXXX" -sourcefiletype alwaysobtainsourcefile -sourcefolderpath "\\XXXXXX" -sourcefolderpathtype uncnetworkpath

But the above line gives me a warning "Input an existed package definition name." This was not the case with my first environment.

Then i created the application manually in the second environment once and then ran the above line, was able to create the package using the cmdlet.

Could any one suggest if i am using the correct cmdlet. Or any other suggestion. Please help.

Regards


Regards Ram


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>