Import-CMComputerInformation

Imports computer information into a Configuration Manager database.

Syntax

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

Description

The Import-CMComputerInformation cmdlet imports computer information directly into a Microsoft System Center Configuration Manager database. For System Center 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 Configuration Manager. After you import the computer information, System Center 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 Configuration Manager migrates user information and settings from the reference computer to the new computer.

Examples

Example 1: Import computers by using a file

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

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.

Example 2: Import a single computer

PS C:\>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 C:\>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.

Required Parameters

-ComputerName

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-CollectionId
Type:String[]
Aliases:CollectionIds
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName

Specifies a name of a Configuration Manager device collection.

Type:String[]
Aliases:CollectionNames
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableColumnHeading
Type:Boolean
Aliases:EnableColumnHeadings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

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

Type:IResultObject[]
Aliases:Collection, Collections
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MergeIfExist
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SMBiosGuid

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

Type:String
Aliases:SMBIOSID
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceComputerName

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserAccountMigrationBehavior
Type:MigrationBehavior
Parameter Sets:CaptureAllUserAccountsAndRestoreSpecifiedAccounts, CaptureAndRestoreSpecifiedUserAccounts
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserName
Type:String[]
Aliases:UserNames
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WindowsToGoUniqueKey
Type:String
Aliases:WtgUniqueKey
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False