Move-CMObject
Move-CMObject
Moves a Configuration Manager object into a different folder.
Syntax
Parameter Set: SearchByIdMandatory
Move-CMObject -FolderPath <String> -ObjectId <String[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByObjectMandatory
Move-CMObject -FolderPath <String> -InputObject <IResultObject[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Move-CMObject cmdlet moves a Microsoft System Center 2012 SP1 Configuration Manager object into a different folder. Specify the object to move and the destination folder. Because an object exists in only one folder, the cmdlet does not specify the current folder.
Parameters
-FolderPath<String>
Specifies a destination folder path, in the following format: AAA:\<object type>\folder\sub-folder\subfolder, where AAA represents the Configuration Manager site code. For example, a folder that is named LOB Apps for an application node at a sight designated CM1 has the following file path: CM1:\Application\LOB Apps.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject[]>
Specifies an array of Configuration Manager objects to move.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ObjectId<String[]>
Specifies an array of IDs of objects to move.
Aliases |
InstanceKey |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Move an object
This command moves the object that has the specified ID to the folder GKP:\Application\TestFolder.
PS C:\> Move-CMObject -FolderPath "GKP:\Application\TestFolder" -ObjectId "209224563"