Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Skatterbrainz authored Nov 18, 2017
1 parent d731a3b commit 6efb2cb
Showing 2 changed files with 381 additions and 1 deletion.
201 changes: 201 additions & 0 deletions Docs/Export-CMHealthCheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
---
external help file: CMHealthcheck-help.xml
Module Name: CMHealthcheck
online version:
schema: 2.0.0
---

# Export-CMHealthCheck

## SYNOPSIS
Convert extracted ConfigMgr site information to Word Document

## SYNTAX

```
Export-CMHealthCheck [-ReportFolder] <String> [-Detailed] [[-CoverPage] <String>] [[-CustomerName] <String>]
[[-AuthorName] <String>] [[-CopyrightName] <String>] [[-Healthcheckfilename] <String>]
[[-MessagesFilename] <String>] [[-Healthcheckdebug] <Object>] [-Overwrite]
```

## DESCRIPTION
Converts the data output from Get-CMHealthCheck to generate a
report document using Microsoft Word (2010, 2013, 2016).
Intended
to be invoked on a desktop computer which has Office installed.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
Export-CMHealthCheck -ReportFolder "2017-11-17\cm01.contoso.com" -Detailed -CustomerName "Contoso" -AuthorName "David Stein" -CopyrightName "ACME Consulting" -Overwrite -Verbose
```

## PARAMETERS

### -ReportFolder
Path to output data folder (e.g.
".\2017-11-17\cm01.contoso.com")

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Detailed
Collect more granular data for final reporting
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -CoverPage
Word theme cover page (default = "Slice (Light)")
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: Slice (Light)
Accept pipeline input: False
Accept wildcard characters: False
```
### -CustomerName
Name of customer (default = "Customer Name")
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Customer Name
Accept pipeline input: False
Accept wildcard characters: False
```
### -AuthorName
Report Author name (default = "Your Name")
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: Your Name
Accept pipeline input: False
Accept wildcard characters: False
```
### -CopyrightName
Text to use for copyright footer string (default = "Your Company Name")
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: Your Company Name
Accept pipeline input: False
Accept wildcard characters: False
```
### -Healthcheckfilename
Healthcheck configuration XML file name (default = ".\assets\cmhealthcheck.xml")
The file can be local, UNC or URI sourced as well
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MessagesFilename
Status and error message lookup table (default = ".\assets\messages.xml")
The file can be local, UNC or URI sourced as well
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Healthcheckdebug
Enable verbose output (or use -Verbose)
```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Overwrite
Overwrite existing report file if found
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
## INPUTS
## OUTPUTS
## NOTES
1.0.1 - 11/17/2017 - David Stein
Thanks to Rafael Perez for inventing this - http://www.rflsystems.co.uk
Thanks to Carl Webster for the basis of Word functions - http://www.carlwebster.com
Thanks to David O'Brien for additional Word function - http://www.david-obrien.net/2013/06/20/huge-powershell-inventory-script-for-configmgr-2012/
Thanks to Starbucks for empowering me to survive hours of clicking through the Office Word API reference
## RELATED LINKS
181 changes: 180 additions & 1 deletion Docs/Get-CMHealthCheck.md
Original file line number Diff line number Diff line change
@@ -1 +1,180 @@
1
---
external help file: CMHealthcheck-help.xml
Module Name: CMHealthcheck
online version:
schema: 2.0.0
---

# Get-CMHealthCheck

## SYNOPSIS
Extract ConfigMgr Site data

## SYNTAX

```
Get-CMHealthCheck [-SmsProvider] <String> [[-OutputFolder] <String>] [[-NumberofDays] <Int32>]
[[-Healthcheckfilename] <String>] [-Overwrite] [-NoHotfix]
```

## DESCRIPTION
Exracts SCCM hierarchy and site server data
and stores the information in multiple XML data files which are then
processed using the Export-CM-Healthcheck.ps1 script to render
a final MS Word report.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -NumberofDays:30
```

### -------------------------- EXAMPLE 2 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -Overwrite -Verbose
```

### -------------------------- EXAMPLE 3 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -HealthcheckDebug -Verbose
```

### -------------------------- EXAMPLE 4 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -NoHotfix
```

### -------------------------- EXAMPLE 5 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -OutputFolder "c:\temp"
```

### -------------------------- EXAMPLE 6 --------------------------
```
.\Get-CMHealthCheck -SmsProvider cm01.contoso.com -OutputFolder "c:\temp" -HealthcheckFilename ".\healthcheck.xml"
```

## PARAMETERS

### -SmsProvider
FQDN of SCCM site server

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -OutputFolder
Path for output data files
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: "$($env:USERPROFILE)\Documents"
Accept pipeline input: False
Accept wildcard characters: False
```
### -NumberofDays
Number of days to go back for alerts in logs (default = 7)
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 7
Accept pipeline input: False
Accept wildcard characters: False
```
### -Healthcheckfilename
Name of configuration file (default is .\assets\cmhealthcheck.xml)
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Overwrite
Overwrite existing output folder if found.
Folder is named by datestamp, so this only applies when
running repeatedly on the same date
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -NoHotfix
Suppress hotfix inventory.
Can save significant runtime
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
## INPUTS
## OUTPUTS
## NOTES
1.0.1 - 11/18/2017 - David Stein
Thanks to Rafael Perez for inventing this - http://www.rflsystems.co.uk
Thanks to Carl Webster for the basis of Word functions - http://www.carlwebster.com
Thanks to David O'Brien for additional Word function - http://www.david-obrien.net/2013/06/20/huge-powershell-inventory-script-for-configmgr-2012/
Thanks to Starbucks for empowering me to survive hours of clicking through the Office Word API reference
Support: Database name must be CM_\<SITECODE\> (you need to adapt the queries if not this format)
Security Rights: user running this tool should have the following rights:
- SQL Server (serveradmin) to be able to see database / cpu stats
- SCCM Database (db_owner) used to create/drop user-defined functions
- msdb Database (db_datareader) used to read backup information
- read-only analyst on the SCCM console
- local administrator on all computer (used to remotely connect to the registry and services)
- firewall allowing 1433 (or equivalent) to all SQL Servers (including SQL Express on Secondary Site)
- Remote WMI/DCOM firewall - http://msdn.microsoft.com/en-us/library/jj980508(v=winembedded.81).aspx
- Remote WUA - http://msdn.microsoft.com/en-us/library/windows/desktop/aa387288%28v=VS.85%29.aspx
Comments: To get the free disk space, enable the Free Space (MB) for the Logical Disk
## RELATED LINKS

0 comments on commit 6efb2cb

Please sign in to comment.