Skip to content

adminph-de/ps-powerbi-asr-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Site Recovery (ASR) PowerBI Reporting

Contributors Forks Stargazers Issues MIT License LinkedIn


Code Snipes

Output your ASR status into a PowerBI report by using PowerShell
Bug Report · Request Feature

Content

Documentation

Find a detaild documentation at http://github.code-snipes.de/ps-powerbi-asr-report

Prerequisites

You need an installed PowerShell or, if you like to do it on Microsoft Visual Studio Code, you can try the Remote-Connection and let the code run in an isolated Docker container. Find the instruction on how to run here Using Azure PowerShell in Docker. It can be helpful if you use a macOS or Linux.

Running the script in the end, you need the Azure "AZ" module installed. Here the simple installation (it works the same way in the Docker container) InstallAzure Module "AZ"

if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) {
    Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
      'Az modules installed at the same time is not supported.')
} else {
    Install-Module -Name Az -AllowClobber -Scope CurrentUser
}

Create an Azure service principal to run the script with SPN authentification.

Analyzing the generated data, Microsoft PowerBI needs to be available on your computer. You can of cures use an analyzing tool of your choice and connect the generated *.csv file to it. I am not an expert in Microsoft PowerBI and can not guide you to build a report. Find a description of how to import the *.csv file to the example Microsoft PowerBI released in the more detailed documentation.

Installation

Clone the git reop to start:

git clone https://git.com/adminph-de/ps-powerbi-asr-report.git

Usage

Change the JSON file (report.json)

{
  "delimiter": ";",
  "location":"reports",
  "login": {
      "TENANT_ID": "00000000-0000-0000-0000-00000000000",
      "SPN_ID": "00000000-0000-0000-0000-00000000000",
      "SPN_PW": "yourSpnSecret"
  },
  "subscription": [
      { "name":[ "prod", "test", "dev" ] }
  ]
}

Execute the script

report.ps1 -JsonFile report.json

Script Output in Microsoft PowerBI:

Code Snipes

Find an example PowerBi report /example/report.pbix Including a report.csv example with demo data.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch git checkout -b feature/AmazingFeature
  3. Commit your Changes git commit -m 'Add some AmazingFeature'
  4. Push to the Branch git push origin feature/AmazingFeature
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/adminph-de/ps-powerbi-asr-report

Patrick Hayo

N00ky2010

Acknowledgements

Referenzes