立即与支持人员聊天
与支持团队交流

Enterprise Reporter 3.5.1 - Report Manager User Guide

Quest Enterprise Reporter Report Manager Introducing the Report Manager Running and Scheduling Reports Creating and Editing Reports Troubleshooting Issues with Enterprise Reporter Appendix: PowerShell cmdlets

Using cmdlets to manage discoveries

An important aspect of Enterprise Reporter, discoveries return information about the systems in your environment. Discoveries gather data about Active Directory, computers, SQL Server, and NTFS permissions for files and folders. When using Enterprise Reporter cmdlets, discoveries are referred to as jobs. The examples in this section demonstrate how to create and run jobs using cmdlets.

This section contains the following examples:

Getting job information

You probably have configured and run discoveries in the Enterprise Reporter Configuration Manager. These job definitions are useful in understanding how the cmdlets work and provide good examples for you to follow when creating new jobs using cmdlets. The Get-ERJobDefinition cmdlet returns information on the jobs.

In this example, information about a job identified with the name of Active Directory is returned.

Output

In this example, information about all the jobs (the * wildcard is used in -JobDefinitionName) located on the cluster named Second Cluster is returned.

Output

As you can see in these examples, there is a lot of information contained in the job definition. The largest and seemingly most complicated part is the configuration, which contains all of the information about the jobs that you created using the Discovery Wizard. For more information about the configuration, see Creating a job.

Creating a job

Using cmdlets to create a new job requires planning as there is a lot information contained in a job definition. You would use cmdlets to automate a process, such as cloning a current job or creating a new job in an environment with limited resources.

[-Configuration] is the XML representation of the job or discovery configuration. See any of the job examples in the Getting job information section, which discussed the Get-ERJobDefinition cmdlet. This is the best way to get a configuration to use in creating a job manually.

As you can see in this example, each section of the XML file has an opening and a closing statement. When you are working with a copy of the configuration from the Get-ERJobDefinition cmdlet, pay attention to spaces, text, slashes, and other characters, as missing or extra characters will cause an issue with the job.

In this example, the contents of the XML configuration file is used with the New-ERJobDefinition cmdlet. The values for the -Configuration parameter are enclosed in a single quote mark (').

The parameters in this example are formatted to make it easier for you to read. When running the cmdlet, the parameters cannot contain any carriage returns in the command line. If you want to use this example, you must first paste it into NotePad and remove the carriage returns.

In this example the configuration is in an XML file, which allows changes to be made to the configuration when using the cmdlets. The XML files are just simple files that can be edited using Notepad and do not require any special formatting. The configuration of any current job is in the XML format and can be used as a template.

In this example, you want to clone a current job. The important item to note is that the -Name parameter needs to be changed to a unique value. The first cmdlet Get-ERJobDefinition gets the data on the job you wish to clone. In the New-ERJobDefinition cmdlet you use the data in the configuration of the cloned job by using $JobDefinition.Configuration to supply the needed configuration for the new job.

Running a job

Now that you have a job or two you need to run them to retrieve data from your environment by sending a job to the Enterprise Reporter server for immediate execution. Depending on what is processing within the server, the job may be queued to run at the next available time. This is different than scheduling a job which is discussed later.

In this example, the job or discovery identified by the JobDefinitionId ecaae8bb-f0f8-48ee-91ff-da959a937dfa is submitted for immediate processing. If the job starts, True is returned.

In this example, the information about the job definition retrieved by the Get-ERJobDefinition cmdlet is piped to the Submit-ERJobDefinition cmdlet, so the job starts immediately. If the job starts, True is returned.

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级