Skip to content

Commit

Permalink
2019-04-12
Browse files Browse the repository at this point in the history
  • Loading branch information
bseltz-cohesity committed Apr 12, 2019
1 parent 59f7624 commit db564ea
Show file tree
Hide file tree
Showing 3 changed files with 496 additions and 0 deletions.
36 changes: 36 additions & 0 deletions powershell/summaryReport/README.md
@@ -0,0 +1,36 @@
# Export Summary Report Using PowerShell

Warning: this code is provided on a best effort basis and is not in any way officially supported or sanctioned by Cohesity. The code is intentionally kept simple to retain value as example code. The code in this repository is provided as-is and the author accepts no liability for damages resulting from its use.

This script exports a protectino summary report to a CSV file.

## Components

* summaryReport.ps1: the main powershell script
* cohesity-api.ps1: the Cohesity REST API helper module

Place both files in a folder together and run the main script like so:

```powershell
./summaryReport.ps1 -vip mycluster -username myuser -domain mydomain.net
Connected!
saving summary report to report.csv...
```

## Parameters

* -vip: Cohesity Cluster to connect to
* -username: Cohesity username
* -domain: Active Directory domain of user (defaults to local)

## Download the script

Run these commands from PowerShell to download the script(s) into your current directory

```powershell
# Download Commands
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/bseltz-cohesity/scripts/master/powershell/summaryReport/summaryReport.ps1).content | Out-File summaryReport.ps1; (Get-Content summaryReport.ps1) | Set-Content summaryReport.ps1
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/bseltz-cohesity/scripts/master/powershell/summaryReport/cohesity-api.ps1).content | Out-File cohesity-api.ps1; (Get-Content cohesity-api.ps1) | Set-Content cohesity-api.ps1
# End Download Commands
```

0 comments on commit db564ea

Please sign in to comment.