This article discusses the options for creating PowerShell reports and management tasks through SysKit.
PowerShell Scripts on the Administration tab are designed to make it as easy as possible for you to take control and simplify reporting and administration of your Windows environments.
If you navigate to Administration > PowerShell Scripts, you will find endless possibilities for the creation of new report and management scripts.
This section is completely different from the one on Inventory Reports > PowerShell Reports. It consists of Reports and Management Tasks subsections within which you can categorize the scripts you want to create.
This subsection contains all PowerShell scripts that always return results in the form of multiple columns / rows and are meant for reporting purposes. Saved and executed report scripts can return varying amounts of data, but these report scripts can also return ‘Error’ results for some computers.
Reports subsection comes with two report categories and three predefined PowerShell scripts for you to explore:
- Computers by OUs – The script is located in the AD category. Note that it can only be executed on the Domain Controller(s) in a server environment.
This report displays a list of all computers in a domain and their corresponding Organizational Units.
- Installed Features – The script is located in the Roles and Features category. It can be executed on any monitored computer.
This report displays information about Windows Server features that are available for installation and installed on the target computer(s).
- Installed Roles – The script is located in the Roles and Features category. It can be executed on any monitored computer.
This report displays information about Windows Server roles and role services that are available for installation and installed on the target computer(s).
PowerShell scripts saved as Reports, depending on the scripts’ purpose, will have multiple columns displayed, but some of the default columns are: Computer on which the script was executed, Date/Time at which the script was triggered, and Status in which the script returned from target computers.
This subsection contains all PowerShell scripts that perform some kind of management task and only return details on whether the specified task was successfully completed or an error occurred. PowerShell scripts saved as Management Tasks will only have three columns displayed: Computer on which the script was executed, Date/Time at which the script was triggered, and Status in which the script returned from target computers.
Error results are returned from the target computers in the following cases:
- If executing PowerShell script(s) on target computers with lower Operating System versions, which have a certain number of cmdlets available and do not support the usage of cmdlets available in the newer OS versions.
- If PowerShell is not installed on target computers for some reason.
- If PSRemoting is disabled on target computers for some reason.
- If PowerShell command timed out on target computers for some reason.
- If user has insufficient rights on target computers.
- If other errors are thrown by Windows PowerShell.
All PowerShell Scripts available on the Administration tab have the filter panel available to the right. It contains three filter types—Date Range, Computer Groups, and Computer—so you can filter your data more easily. Use the Date Range filter to select any day, week, month, or custom date range.
PowerShell is known as an excellent tool for automating repetitive tasks, so you can start building your report and management scripts using SysKit’s PowerShell Script editor. You can import PowerShell scripts into the wizard (with .ps1 extension only), write your own PowerShell code, and create some amazing reports and management tasks.
With the built-in PowerShell Script Wizard, you can also import and edit PowerShell Script Modules with .ps1 and .psm1 extensions. A script module allows you to use a number of rules and cmdlets in your scripts. In simple terms, a script module is just a grouping of functions and code that can be applied to a specific group of scripts. PowerShell modules are actually highly recommended when writing PowerShell scripts, because they are created for applications such as Microsoft Exchange, Active Directory, VMware, etc., to manage all aspects of various applications.
The PowerShell module feature within SysKit’s PowerShell Script Wizard allows the combining of multiple scripts to simplify code management, accessibility, and sharing.
The PowerShell Wizard also comes with PowerShell Script Alerts, which are crucial for effective monitoring of any critical and important jobs that run in a server environment. SysKit will let you know when critical errors occur if you’ve configured the alert conditions for important PowerShell Scripts.
PowerShell Script rows that match the applied conditions and have triggered an alert will be painted light yellow after the script executes. These rows will be exported to .csv format and included in the email attachment of the alert.