Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59f7624
commit db564ea
Showing
3 changed files
with
496 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
Oops, something went wrong.