Import-CMComputerInformation

Import-CMComputerInformation

Imports computer information into a Configuration Manager database.

Syntax

Parameter Set: ImportComputerByUsingFile
Import-CMComputerInformation -CollectionName <String> -FileName <String> [-EnableColumnHeadings <Boolean> ] [-VariableName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ImportSingleComputer
Import-CMComputerInformation -CollectionName <String> -ComputerName <String> -MacAddress <String> [-SmBiosGuid <String> ] [-SourceComputerName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Import-CMComputerInformation cmdlet imports computer information directly into a Microsoft System Center 2012 SP1 Configuration Manager database. For System Center 2012 Configuration Manager to deploy an operating system to a new computer with no installed operating system, you must add the new computer to System Center 2012 Configuration Manager. After you import the computer information, System Center 2012 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. System Center 2012 Configuration Manager migrates user information and settings from the reference computer to the new computer.

Parameters

-CollectionName<String>

Specifies a name of a Configuration Manager device collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ComputerName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableColumnHeadings<Boolean>

Specifies that the computer information file contains a header row. If you enter a value of $True, the cmdlet ignores the first row of the file.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MacAddress<String>

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SmBiosGuid<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SourceComputerName<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-VariableName<String>

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.

Aliases

none

Required?

false

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: Import computers by using a file

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

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

Example 2: Import a single computer

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

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

Example 3: Import a computer using a reference computer

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.

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

Get-CMComputerAssociation