Import-FIMReportDefinition
Allows users to create new reports in the SCSM Data Warehouse.
Syntax
Import-FIMReportDefinition –InstallSqlScriptFile <String> -ReportDefinitionFile <String> -UninstallSqlScriptFile <String> [-CompanyName <String>] [-Copyright <String>] [-DelaySign] [-SealingKeyFile <String>] [-SealManagementPack] [-ServiceManagerCredential <PSCredential>] [-ServiceManagerServer <String>] –ManagementPackFile <String> [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WariningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Detailed Description
This PowerShell cmdlet allows users to import new reports into the FIM reporting system. Typically, this cmdlet is run after creating new schema using the Import-FIMReportingSchemaDefinition cmdlet; however, it may also be run by itself if you wish to create new reports without adding new schema elements to the Data Warehouse.
Parameters
-InstallSqlScriptFile <String>
This required parameter is defined as the path to the installation script file on the local file system. This is the file that contains the SQL script which creates a new stored procedure in the SCSM Data Warehouse which will be used to return report data for viewing in the SCSM console and SSRS.
Required? |
true |
Position? |
named |
Default Value |
No default |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ReportDefinitionFile <String>
This required parameter is defined as the path to the report definition file (rdl) on the local file system. This file is generated as part of the report design process using SQL Server Report Builder, and should not be edited by hand.
Required? |
true |
Position? |
named |
Default Value |
No default |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UninstallSqlScriptFile <String>
This required parameter is defined as the path to the uninstallation script on the local file system. This script simply executes a SQL DROP command on the SPROC which was created as a result of running the installation script.
Required? |
true |
Position? |
named |
Default Value |
No default |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CompanyName <String>
This parameter is optional in all cases, and should only be used if –sealManagementPack is set to true. In the case where –sealManagementPack is present, this parameter specifies the name of the company which has sealed the MP.
Required? |
false |
Position? |
named |
Default Value |
null |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Copyright <String>
This parameter is optional in all cases, and should only be used if –sealManagementPack is present. In the case where –sealManagementPack is true, this parameter specifies copyright information which will be attached to the sealed MP.
Required? |
false |
Position? |
named |
Default Value |
null |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DelaySign
This parameter is optional in all cases, and is only used if “–sealingKeyFile” is present. In the case where –delaySign is present, it specifies whether or not the signing process should be delayed until the MP can be signed by the private key holder. This is useful in testing environments where one only requires partial signing to verify a report that is being developed.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SealingKeyFile <String>
This parameter is defined as the path to the .snk file which holds the public private key pair which will be used to seal the MP file before it is imported. If this parameter is specified, the MPs will be sealed before being imported into the SCSM Data Warehouse
Warning
While the SCSM SDK does not require that you seal your management packs before importing them, it is nonetheless highly recommended to do so. Failure to do so may result in being unable to synchronize your management packs to the Data Warehouse. To seal your management packs using the PowerShell interface, specify the -SealMP parameter and provide a sealing key file (which can be generated using the strong name (sn) tool in Windows).
Required? |
true |
Position? |
named |
Default Value |
null |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SealManagementPack
This parameter specifies whether or not the report management pack being imported should be sealed. Sealing a management pack prevents it from being modified after it has been imported into the SCSM Data Warehouse.
Warning
While the SCSM SDK does not require that you seal your management packs before importing them, it is nonetheless highly recommended to do so. Failure to do so may result in being unable to synchronize your management packs to the Data Warehouse. To seal your management packs using the PowerShell interface, specify the -SealMP parameter and provide a sealing key file (which can be generated using the strong name (sn) tool in Windows).
Required? |
true |
Position? |
named |
Default Value |
null |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServiceManagerCredential <PSCredential>
This is the credential needed for talking to SCSM SDK service. By default, this is set to the credentials of the current user. If the user wishes to run under a different context, she can pass a system.credential object to the commandlet.
Required? |
false |
Position? |
named |
Default Value |
<system.credential> = current user |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServiceManagerServer <String>
This is the hostname of the System Center Service Manager Management Server. By default, this is set to “localhost”.
Required? |
false |
Position? |
named |
Default Value |
localhost |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ManagementPackFile <String>
This required parameter is defined as the path to the report management pack file on the local file system. The report management pack contains metadata about how the report is to appear in the SCSM console, as well as any references to resources necessary for the report to run in SSRS, including any stored procedures, and SQL RDL files.
Required? |
true |
Position? |
named |
Default Value |
No default |
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.
Notes
Example 1
C:\PS> Add-PSSnapin FimReportingAdministration
C:\PS> Import-FIMReportDefinition
-InstallSqlScriptFile C:\ReportingExt\report\Microsoft.FIM_Report_Group_SP_GetExtensionTest.Report.Install.sql
-ReportDefinitionFile C:\ReportingExt\report\GroupExtensionTestReport.rdl -UninstallSqlScriptFile C:\ReportingExt\report\Microsoft.FIM_Report_Group_SP_GetExtensionTest.Report.Uninstall.sql -CompanyName "TwoWards"
-ManagementPackFile C:\ReportingExt\report\Microsoft.FIMGroupExtensionTest.Report.Library.xml
-ServiceManagerServer ilm-vm-scsm -Verbose -SealManagementPack -SealingKeyFile C:\ReportingExt\TestFimReportingKeyPair.snk
.
Example 2
C:\PS> C:\PS> Add-PSSnapin FimReportingAdministration
C:\PS> Import-FIMReportDefinition -InstallSqlScriptFile C:\ReportingExt\report\Microsoft.FIM_Report_Group_SP_GetExtensionTest.Report.Install.sql -ReportDefinitionFile C:\ReportingExt\report\GroupExtensionTestReport.rdl -UninstallSqlScriptFile C:\ReportingExt\report\Microsoft.FIM_Report_Group_SP_GetExtensionTest.Report.Uninstall.sql -CompanyName "TwoWards"
–ServiceManagerCredential CORP\User1 -ManagementPackFile C:\ReportingExt\report\Microsoft.FIMGroupExtensionTest.Report.Library.xml
-ServiceManagerServer ilm-vm-scsm -Verbose -SealManagementPack -SealingKeyFile C:\ReportingExt\TestFimReportingKeyPair.snk