立即与支持人员聊天
与支持团队交流

Migration Manager for AD 8.15 - Resource Updating Toolkit for PowerShell Reference

Remove-RumComputer

Removes a computer from a collection.

Detailed Description

The Remove-RumComputer cmdlet Removes a computer from a collection without deleting it from the project..

Syntax
Remove-RumComputer [-Computer] <PSRumComputer[]> [
-Collection] <PSRumCollection> [<CommonParameters>]
Remove-RumComputer [-Computer] <PSRumComputer[]> 
-CollectionName <String> [<CommonParameters>]
Remove-RumComputer [-Id] <Guid[]> [-Collection] <PSRumCollection> [
<CommonParameters>]
Remove-RumComputer [-Id] <Guid[]> -CollectionName <String> [
<CommonParameters>]
Remove-RumComputer [-Name] <String[]> [
-Collection] <PSRumCollection> [<CommonParameters>]
Remove-RumComputer [-Name] <String[]> -CollectionName <String> [
<CommonParameters>]
Parameters
-Computer <PSRumComputer[]>

Computer to remove from the collection.

Required? true
Position? 1
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

-Id <Guid[]>

ID of the computer to remove from the collection.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

 

-Name <String[]>

Name of the computer to remove from the collection.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

 

-Collection <PSRumCollection>

Collection.

Required? true
Position? 2
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

 

-CollectionName <String>

Name of collection.

Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, see about_CommonParameters.

Inputs

PSRumCollection

Outputs

None

Examples
Example 1
Get-RumCollection "collection_1" | Remove-RumComputer 
"domain_1\computer_1"
Example 2
Remove-RumComputer "domain_1\computer_1" 
-CollectionName "collection_1"
Example 3
Get-RumComputer -CollectionName "collection_1""domain_1\computer_1" | Remove-RumComputer -CollectionName "collection_1"

Remove-RumDomainCredential

Removes account-representing objects from a collection..

Detailed Description

The Remove-RumDomainCredential cmdlet removes account-representing objects from a collection; the accounts are used for access to the specified domain.

Syntax
Remove-RumDomainCredential [-DomainCredential] <PSRumDomainCredential[]> [
<CommonParameters>]
Remove-RumDomainCredential [-Id] <Guid[]> [<CommonParameters>]
Remove-RumDomainCredential [-Name] <String[]> -CollectionName <String> [
<CommonParameters>]
Remove-RumDomainCredential [-Name] <String[]> [[-Collection] <PSRumCollection>] [
<CommonParameters>]
Parameters
-DomainCredential <PSRumDomainCredential[]>

Credential object to remove from a collection or project root.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

 

-Id <Guid[]>

ID of credential object to remove from a collection or project root.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

 

-Name <String[]>

Domain name of credential object to remove from collection or project root.

Required? true
Position? 1
Default value none
Accept pipeline input? false
Accept wildcard characters? true

 

-Collection <PSRumCollection>

Collection.

Required? false
Position? 2
Default value none
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

 

-CollectionName <String>

Name of collection.

Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, see about_CommonParameters.

Inputs

PSRumDomainCredential

Outputs

None

Examples
Example 1
Get-RumCollection "collection_1" | Get-RumDomainCredential "domain" | Remove-RumDomainCredential

Reset-RumCollectionDataProvider

Resets currently specified external account mapping data provider for a collection.

Detailed Description

The Reset-RumCollectionDataProvider cmdlet resets currently specified external account mapping data provider for a collection. Original account mapping settings used prior to changing the data provider with the Set-RumCollectionDataProvider cmdlet will be restored for a collection (either default project map or custom map).

Syntax
Reset-RumCollectionDataProvider [-Id] <Guid> [-PassThru] [<CommonParameters>]
Parameters
-Id <Guid>

ID of the collection.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

 

-PassThru

Returns the object that represents the modified collection. By default, this cmdlet does not generate any output.

Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, see about_CommonParameters.

Inputs

Guid

Outputs

PSRumCollection

Examples
Example 1
Reset-RumCollectionDataProvider b5ba8569-80b2-42ea-a07d-a4cc1d3ef7cc
Example 2
Get-RumCollection "collectionName" | Reset-RumCollectionDataProvider

Set-RumCollectionDataProvider

Sets an external account mapping data provider for a collection.

Detailed Description

The Set-RumCollectionDataProvider cmdlet specifies a data provider from which to obtain account mapping data instead of account map currently utilized for a collection in the project (default project map or custom map).

Syntax
Set-RumCollectionDataProvider [-Id] <Guid> [-DataProviderKey] <String> 
[-DataProviderConfig] <String> [-PassThru] [<CommonParameters>]
Parameters
-Id <Guid>

ID of the collection.

Required? true
Position? 1
Default value none
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

 

-DataProviderKey <String>

Key of data provider. Currently, only the account mapping data provider named "PowerShell" is available.

Required? true
Position? 2
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

-DataProviderConfig <String>

Configuration of the data provider. For data provider "PowerShell" specify script file or script itself that implements the Get-DomainPairs and Get-ObjectPairs($DomainPair) functions. See Example 2 below for details.

Required? true
Position? 3
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

-PassThru

Returns the object that represents the modified collection. By default, this cmdlet does not generate any output.

Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false

 

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, see about_CommonParameters.

Inputs

Guid

Outputs

PSRumCollection

Examples
Example 1
Set-RumCollectionDataProvider "b5ba8569-80b2-42ea-a07d-a4cc1d3ef7cc" 
-DataProviderKey PowerShell -DataProviderConfig ". C:\script.ps1"
Example 2
$tmp = 'function Get-DomainPairs {
@{ Source = @{SID="S-1-5-21-sourceDomainSID"; Name="source"; DNS="source.local" };
Target = @{SID="S-1-5-21-targetDomainSID"; Name="target"; DNS="target.local" };
Id = 1; } }
function Get-ObjectPairs($DomainPair)
{ $Id = $DomainPair.Get_Item("Id"); switch ( $Id ) { 1 {
@{ Source = @{SID="S-1-5-21-sourceUserSID"; Name="user.name"; UPN="user.name@source.local"; };
Target = @{SID="S-1-5-21-targetUserSID"; Name="user.name"; UPN="user.name@target.local"; };
Type="user"; } } default { throw "Unknown item Id: " + $Id; } } }'
Get-RumCollection "collection1" | Set-RumCollectionDataProvider 
-DataProviderKey PowerShell -DataProviderConfig $tmp
Example 3

Get-RumCollection "MainCollection" | Set-RumCollectionDataProvider -DataProviderKey PowerShell
-DataProviderConfig '. "$env:CommonProgramFiles\Aelita Shared\Migration Tools\Resource Updating\CustomMapFromFile.ps1"
''\\Server\Share\Folder\list.csv''' -PassThru

where list.csv file contains a list of migration pairs in the following format, one pair per line:

SourceNetBIOSDomainName\SourceUserName,SourceUserSID,SourceUPN,SourceDomainDNSName,TargetNetBIOSDomainName\TargetUserName,TargetUserSID,TargetUPN,TargetDomainDNSName

The following is an example of list.csv file:

SOURCE1\user1.name,S-1-5-21-sourceUser1SID,user1@source1.principal.name,source1.com,TARGET1\user1.name,S-1-5-21-targetUser1SID,user1@target1.principal.name,target1.com
SOURCE2\user2.name,S-1-5-21-sourceUser2SID,user2@source2.principal.name,source2.local,TARGET2\user2.name,S-1-5-21-targetUser2SID,user2@target2.principal.name,target2.local
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级