Publish-SilReport

Windows Server 2016 and Windows 10

Publish-SilReport

Generates a report in Software Inventory Logging Aggregator.

Syntax

Parameter Set: All
Publish-SilReport [-All] [-DBServerCredential <PSCredential> ] [-DBServerName <String> ] [-Force] [-OpenReport] [-ReportPath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByMonth
Publish-SilReport [-ByMonth <DateTime> ] [-DBServerCredential <PSCredential> ] [-DBServerName <String> ] [-Force] [-OpenReport] [-ReportPath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByYear
Publish-SilReport [-ByYear <DateTime> ] [-DBServerCredential <PSCredential> ] [-DBServerName <String> ] [-Force] [-OpenReport] [-ReportPath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: None
Publish-SilReport [-DBServerCredential <PSCredential> ] [-DBServerName <String> ] [-Force] [-OpenReport] [-ReportPath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Publish-SilReport cmdlet generates a Software Inventory Logging Aggregator report. You can generate a report for a particular month, for a particular year, or one that includes all data. By default, this cmdlet generates a report from the start of the month, two months prior to the current date, but does not exceed three months of data. Specify parameter values to modify the report. If necessary, provide the database server name and credentials that this cmdlet uses to connect to the database server.

Parameters

-All

Indicates that this cmdlet generates a report that contains all available data.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ByMonth<DateTime>

Specifies a month for which this cmdlet generates a report. For the current month, the report starts at the start of the month and includes data up to the current date.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ByYear<DateTime>

Specifies a year for which this cmdlet generates a report. For the current year, the report starts at the start of the year and includes data up to the current date.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DBServerCredential<PSCredential>

Specifies the credentials to connect to the SQL Server Analysis Services (SSAS) database server for the report. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. You may also need to open a port on the firewall of the SSAS database server.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DBServerName<String>

Specifies the SSAS database server for the report.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OpenReport

Indicates that this cmdlet opens the report that it generates in a new Microsoft Excel application window.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReportPath<String>

Specifies the folder path where this cmdlet saves the report that it generates.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

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: Generate a default report

This command generates a Software Inventory Logging Aggregator report. This default report contains data for the previous two months and the current month up to the local time. This command generates a report and saves it in your Documents folder.


PS C:\> Publish-SilReport 

Example 2: Generate a monthly report

This command generates a report for the month of October 2014.


PS C:\> Publish-SilReport -ByMonth "10/03/2014" 

Example 3: Generate a yearly report

This command generates a report for the year 2012.


PS C:\> Publish-SilReport -ByYear "1/1/2012" 

Example 4: Generate a complete report

This command generates a report that contains all data.


PS C:\> Publish-SilReport -All 

Example 5: Specify a server and credentials

The first command creates a credential by using the Get-Credential cmdlet. That cmdlet prompts you for user name and password. The command stores those credentials in the $Credentials variable. For more information, type Get-Help Get-Credential.

This command generates a report by providing the name of the database server. The cmdlet uses the credentials stored in $Credential to connect to SSAS on a remote server. You may need to open the correct firewall port on the target server to accept this report request.


PS C:\> $Credential = Get-Credential
PS C:\> Publish-SilReport -DBServerName "SILContoso.com" -DBServerCredential $Credential 

Example 6: Generate and open a report

This command generates a report, and then opens it in a new Excel application window.


PS C:\> Publish-SilReport -OpenReport 

Related topics

Community Additions

ADD
Show: