Set-CMPackage
Set-CMPackage
Changes configuration settings for Configuration Manager packages.
構文
Parameter Set: SetById
Set-CMPackage -Id <String[]> [-Description <String> ] [-DistributionPriority <Priorities> {High | Low | Normal} ] [-ForcedDisconnectDelay <Int32> ] [-ForcedDisconnectEnabled <Boolean> ] [-ForcedDisconnectNumberRetries <Int32> ] [-Language <String> ] [-Manufacturer <String> ] [-MifFileName <String> ] [-MifName <String> ] [-MifPublisher <String> ] [-MifVersion <String> ] [-NewName <String> ] [-Path <String> ] [-SecuredScopeNames <String> ] [-ShareName <String> ] [-ShareType <ShareTypes> {ShareCommon | ShareSpecific} ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByName
Set-CMPackage -Name <String> [-Description <String> ] [-DistributionPriority <Priorities> {High | Low | Normal} ] [-ForcedDisconnectDelay <Int32> ] [-ForcedDisconnectEnabled <Boolean> ] [-ForcedDisconnectNumberRetries <Int32> ] [-Language <String> ] [-Manufacturer <String> ] [-MifFileName <String> ] [-MifName <String> ] [-MifPublisher <String> ] [-MifVersion <String> ] [-NewName <String> ] [-Path <String> ] [-SecuredScopeNames <String> ] [-ShareName <String> ] [-ShareType <ShareTypes> {ShareCommon | ShareSpecific} ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByValue
Set-CMPackage -InputObject <IResultObject> [-Description <String> ] [-DistributionPriority <Priorities> {High | Low | Normal} ] [-ForcedDisconnectDelay <Int32> ] [-ForcedDisconnectEnabled <Boolean> ] [-ForcedDisconnectNumberRetries <Int32> ] [-Language <String> ] [-Manufacturer <String> ] [-MifFileName <String> ] [-MifName <String> ] [-MifPublisher <String> ] [-MifVersion <String> ] [-NewName <String> ] [-Path <String> ] [-ShareName <String> ] [-ShareType <ShareTypes> {ShareCommon | ShareSpecific} ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Set-CMPackage cmdlet changes configuration settings for Microsoft System Center 2012 Configuration Manager packages.
If you set the MifFileName parameter, System Center 2012 Configuration Manager looks in the %TEMP% directory or the %windir% directory for the installation status Management Information Format (MIF) file that you specified in MifFileName. The installation status indicates whether the program successfully ran.
If System Center 2012 Configuration Manager does not find the file, it searches for all MIF files in those directories. System Center 2012 Configuration Manager makes a case-insensitive comparison of the values that you specify for MifName, MifPublisher, and MifVersion to the values that the MIF file specifies. If System Center 2012 Configuration Manager finds a match, it uses the status that the MIF file specifies as the installation status for the program. If System Center 2012 Configuration Manager cannot find a match, or if you do not specify MifFileName, System Center 2012 Configuration Manager uses the program exit code to set the installation status for the program. An exit code of zero indicates that the program successfully ran. Any other values indicate application-specific error codes.
パラメーター
-Description<String>
Specifies a description for the package. You can use a maximum of 128 characters.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-DistributionPriority<Priorities>
Specifies the sending priority for the deployment package. Configuration Manager uses the sending priority for the deployment package when it sends the package to distribution points at child sites. Valid values are:
-- High
-- Medium
-- Low
Configuration Manager sends packages in priority order. Configuration Manager sends packages that have the same priority in order of creation. Unless a backlog exists, Configuration Manager sends a package immediately regardless of its priority.
エイリアス |
Priority |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ForcedDisconnectDelay<Int32>
Specifies the time, in minutes, that Configuration Manager waits before it forcibly disconnects users from the distribution point share. The default value is 5.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ForcedDisconnectEnabled<Boolean>
Indicates whether Configuration Manager forcibly disconnects users from the distribution point share when a share violation occurs in updating, refreshing, or deleting package source files.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ForcedDisconnectNumberRetries<Int32>
Specifies the number of times Configuration Manager attempts to disconnect a user from the distribution point share. The default value is 2.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Id<String[]>
Specifies an array of package IDs.
エイリアス |
PackageId |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-InputObject<IResultObject>
Specifies a CMPackage object. To obtain a CMPackage object, use the Get-CMPackage cmdlet.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Language<String>
Specifies the language version of the package. You can use a maximum of 32 characters in a format that you choose to use to identify the language version. Configuration Manager uses the Language property together with Manufacturer, Name, and Version to identify a package. For example, you can have an English version and a German version of the same package.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Manufacturer<String>
Specifies a manufacturer name to help you identify the package. You can use a maximum of 32 characters.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-MifFileName<String>
Specifies the name of the MIF file that contains the package status.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-MifName<String>
Specifies the name of the MIF file that contains the program status for the package. The file name extension must be .mif.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-MifPublisher<String>
Specifies the name of the software publisher of the package.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-MifVersion<String>
Specifies the version number of the MIF file.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies a package name.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-NewName<String>
Specifies a new name for the package.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Path<String>
Specifies the location of the files of update contents for the package.
You can specify either a full local path or a Universal Naming Convention (UNC) path. Make sure that this location contains all the files and subdirectories that the program needs to run, including any scripts.
エイリアス |
PackageSourcePath |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SecuredScopeNames<String>
Specifies names of security scopes. A security scope name can be Default or the name of a custom-created security scope.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ShareName<String>
Specifies the UNC share location to use on the distribution point. You can include directories in the share name. If the directories do not exist, Configuration Manager creates them. You must specify a share name if you set the ShareType parameter to SHARE_SPECIFIC.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ShareType<ShareTypes>
Specifies the type of share that the distribution point uses when it shares the package. Valid values are:
-- SHARE_COMMON
-- SHARE_SPECIFIC
The default value is SHARE_COMMON. If you specify SHARE_SPECIFIC, you must specify a value for the ShareName parameter.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Version<String>
Specifies a version number for the package.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
Example 1: Rename a package and add a description
This command renames the package that has the ID ST120001. The command changes the name of the package to ScriptsPackage02 and adds a description for the package.
PS C:\> Set-CMPackage -Id "ST120001" -NewName "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."
Example 2: Rename a package by using an object variable
The first command gets the package that has the ID ST120001, and stores the results in the $Pkg variable.
The second command changes the name of the package stored in $Pkg to ScriptsPackage02, and adds a description for the package.
PS C:\> $Pkg = Get-CMPackage -Id ST120001
PS C:\> Set-CMPackage -InputObject $Pkg -Newname "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."