Import-SCSMInstance
Imports objects and relationships from a .csv file into Service Manager.
Parameter Set: Default
Import-SCSMInstance -DataFileName <String> -FormatFileName <String> [-BatchSize <Int32> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Import-SCSMInstance cmdlet imports objects and relationships from a comma-separated value (.csv) file into Service Manager.
Two parameters must be set to import instances in bulk into Service Manager:
-- DataFileName, which must contain the file path of a .csv file that contains the instance data.
-- FormatFileName, which must contain the file path of an .xml file that defines the format of the .csv file.
The optional BatchSize parameter specifies the number of objects or projection instances that will be committed on each database write.
Specifies the number of objects or projection instances that this cmdlet commits on each database write. This value must be an integer between 1 and 5000. The default value is 50.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
50 |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
localhost |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Specifies the file path of the .csv file that contains the instance data.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the file path of an .xml file in which the format of the .csv file is defined.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies an object that represents the session to a Service Manager management server.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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 |
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).
The input type is the type of the objects that you can pipe to the cmdlet.
None.
You cannot pipe input to this cmdlet.
The output type is the type of the objects that the cmdlet emits.
None.
This cmdlet does not generate any output.
This command imports computer projections from the file named computers.csv. The command imports 100 rows at a time.
PS C:\>Import-SCSMInstance -FormatFileName "computers.xml" -DataFileName "computers.csv" -BatchSize 100