Skip to content

New Package from Definitions with Powershell

Featured Replies

Hi,

 

I am trying to create a new package using a .sms definition file with PowerShell and I can't find any accurate information as to the correct way to specify the definition file in the cmdlet. the syntax is as follows:

 

New-CMPackage -FromDefinition -PackageDefinitionName <String> -SourceFileType {AlwaysObtainSourceFile |
CreateCompressedVersionOfSourceFile} -SourceFolderPath <String> -SourceFolderPathType {LocalFolderOnSiteServer |
UncNetworkPath} [-Confirm] [-WhatIf] [<CommonParameters>]

 

Looks fairly straightforward but it always fails complaining about the PackageDfinitionName parameter. Has anyone got any experience with this?

 

Cheers

Guy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.