Edit

Share via


Import-CMComputerInformation

Imports computer information into a Configuration Manager database.

Syntax

ImportSingleComputer (Default)

Import-CMComputerInformation
    -ComputerName <String>
    [-CollectionId <String[]>]
    [-CollectionName <String[]>]
    [-InputObject <IResultObject[]>]
    [-MacAddress <String>]
    [-MergeIfExist]
    [-SMBiosGuid <String>]
    [-SourceComputerName <String>]
    [-UserAccountMigrationBehavior <MigrationBehavior>]
    [-UserName <String[]>]
    [-WindowsToGoUniqueKey <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ImportComputerByUsingFile

Import-CMComputerInformation
    -FileName <String>
    [-CollectionId <String[]>]
    [-CollectionName <String[]>]
    [-EnableColumnHeading <Boolean>]
    [-InputObject <IResultObject[]>]
    [-VariableName <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Import computers by using a file

PS XYZ:\>Import-CMComputerInformation -CollectionName "All Systems" -FileName "\\cmshare\Public\CM\ImportComputers.csv" -EnableColumnHeading $True

This command imports the computers specified in the CSV file into the All Systems collection. This command includes a value of $True for the -EnableColumnHeading parameter. The cmdlet ignores the first line of the file.

Example 2: Import a single computer

PS XYZ:\>Import-CMComputerInformation -CollectionName "All Systems" -ComputerName "Computer08" -MacAddress "5F:DA:FA:FA:FA:FA" -SmBiosGuid "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"

This command imports a specified computer into the All Systems collection. The command specifies the name, MAC address, and SMBIOS GUID for a computer.

Example 3: Import a computer using a reference computer

PS XYZ:\>Import-CMComputerInformation -CollectionName "All Systems" -ComputerName "Computer08" -MacAddress "5F:DA:FA:FA:FA:FA" -SmBiosGuid "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" -SourceComputerName "ResourceComputer01"

This command imports a specified computer into the All Systems collection. The command specifies the name, MAC address, and SMBIOS GUID for a computer. The command also includes a reference computer to associate with the new computer.

Parameters

-CollectionId

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:CollectionIds

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CollectionName

Specifies a name of a Configuration Manager device collection.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:CollectionNames

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies the name of a computer that this cmdlet imports information from.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableColumnHeading

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EnableColumnHeadings

Parameter sets

ImportComputerByUsingFile
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileName

Specifies a .csv file that contains computer information. The file must contain the name and MAC address of each computer to be imported.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:FilePath, ImportFilePath, Path

Parameter sets

ImportComputerByUsingFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Collection, Collections

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-MacAddress

Specifies a MAC address for a computer in the format (00:00:00:00:00:00). The Windows Preinstallation Environment (Windows PE) must have a driver for the specified network adapter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MergeIfExist

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SMBiosGuid

Specifies a GUID for the system management BIOS (SMBIOS) of a computer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SMBIOSID

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceComputerName

Specifies a name of a reference computer. Configuration Manager migrates user state and settings from the reference computer to the new computer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserAccountMigrationBehavior

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:MigrationBehavior
Default value:None
Accepted values:CaptureAllUserAccountsAndRestoreSpecifiedAccounts, CaptureAndRestoreSpecifiedUserAccounts
Supports wildcards:False
DontShow:False

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserName

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:UserNames

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VariableName

Specifies a variable name for an imported column. When you import a .csv file, you specify the columns to import and assign them to a Configuration Manager field. A variable allows you to assign a column to a variable.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ImportComputerByUsingFile
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WindowsToGoUniqueKey

The Import-CMComputerInformation cmdlet imports computer information directly into a Configuration Manager database. For Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to Configuration Manager. After you import the computer information, Configuration Manager can deploy an operating system.

You can import a single computer by specifying the Media Access Control (MAC) address and computer name, along with the name of a collection. This cmdlet adds this computer to the specified collection.

You can also import several computers by specifying a Comma Separated Values .csv file with computer information, along with the name of a collection. This cmdlet adds the computers to the specified collection.

You can specify the name of a reference computer. Configuration Manager migrates user information and settings from the reference computer to the new computer.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:WtgUniqueKey

Parameter sets

ImportSingleComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object