I was setting up monitoring for my Azure environment and I had an requirement to email the Fileshare usage of all fileshares in a tenant to Support team on daily Basis and also sent notification in Slack. I used PowerShell to consolidate the data and Logic apps for the integration for Slack notification.
To breakdown the script for better understanding, I have used a credential from credential manager which had RBAC permissions to all subscriptions in the tenant and I used the function in https://gallery.technet.microsoft.com/scriptcenter/Accessing-Windows-7210ae91 for my Azure and SFTP authentication using the credentials already in credential manager. I am using Azure Management API's to get the information of the File storage as I found PowerShell Modules had restriction to Storage account opened only for particular subnet outside of the server I am running the script. I have used the method in https://www.powershellgallery.com/packages/LSECosmos/0.2.1-alpha/Content/Get-AzAccessToken.ps1 for API Authentication.
The script will consolidate result in HTML format and Json format. Json format will be sent as Payload to Webhooks to Logic Apps were you can integrate with Slack or Teams alerts. HTML format will be styled with yellow rows for 80 to 90% and Red Rows for usage above 90% as below.
File Share Usage
StorageAccountName |
SubscriptionName |
ResourceGroupName |
ShareName |
TotalCapacity(GB) |
UsedSpace(GB) |
PercentageUsed |
StgAcctName1 |
Sub-1 |
RG-1 |
FileShare-1 |
1 |
0 |
0 |
StgAcctName2 |
Sub-1 |
RG-2 |
FileShare-2 |
10 |
0 |
2 |
StgAcctName3 |
Sub-2 |
RG-3 |
FileShare-3 |
100 |
0 |
0 |
StgAcctName4 |
Sub-3 |
RG-4 |
FileShare-4 |
1024 |
926 |
90 |
StgAcctName5 |
Sub-4 |
RG-5 |
FileShare-5 |
250 |
91 |
37 |
StgAcctName6 |
Sub-4 |
RG-5 |
FileShare-6 |
1024 |
845 |
83 |
https://bayanlarsitesi.com/
ReplyDeleteTokat
Kastamonu
Tekirdağ
Gümüşhane
RNSLXQ
sakarya
ReplyDeleteelazığ
sinop
siirt
van
P0UQ
F43F3
ReplyDeleteBitcoin Nasıl Oynanır
Facebook Takipçi Hilesi
Binance Hesap Açma
Sui Coin Hangi Borsada
Facebook Takipçi Satın Al
Xcn Coin Hangi Borsada
Sohbet
Yeni Çıkan Coin Nasıl Alınır
Baby Doge Coin Hangi Borsada
677D4
ReplyDeleteiOS Uygulama Yapma
seo nedir
fiziksel sunucu
Knight Online Pvp Serverler
jeneratör fiyatları
Twitter Para Kazanma
Telegram Grup Üye
Tiktok Para Kazanma
fuar standı
9A734
ReplyDeleteTiktok Reklam Verme
fuar standı
Silkroad Sunucu
Instagram Para Kazanma
jeneratör fiyatları
sunucu kiralama
Yapay Zeka Siteleri
Kurumsal Hosting
Google Harita & İşletme Kaydı
1527B
ReplyDeleteDüşecek Domainler
Toptan Ürünler
metin2 pvp
adwords hesap satışı
google 5 yıldız
coin kazanma
Youtube Beğeni Satın Al
Dizi Önerileri
Proxy Satın Al
5BD02
ReplyDeletebitcoin forum
offshore hosting
İçerik Editörü (Makale Yazarı)
IPv4 Proxy Satın Al
Tiktok İzlenme Satın Al
Sunucu Kiralama
tiktok seo
Amazon SEO
Instagram Hesap Satın Al
B30F4
ReplyDeletebitcoin
Dizi Önerileri
Hosting Firmaları
Facebook Reklam Verme
Site Satışı
Facebook Grup Satın Al
yorum satın al
Proxy Satın Al
Domain Satın Al
5A9BE
ReplyDeleteSantos Coin Yorum
Alpine Coin Yorum
Bitcoin Yorum
Zec Coin Yorum
BTC Son Dakika
Algo Coin Yorum
Forth Coin Yorum
Ong Coin Yorum
Celr Coin Yorum
F7DFA
ReplyDeleteBitmart Güvenilir mi
Kucoin Güvenilir mi
Binance Referans Kodu
Btcturk Güvenilir mi
Binance Referans Kodu
Mexc Güvenilir mi
Referans Kodu Binance
Binance Referans Kodu
Bitmart Güvenilir mi
A97AC
ReplyDeletegörüntülü sanal şov
7BC7F
ReplyDeletecanlı ücretli show
30F72FD2F9
ReplyDeletegörüntülü seks
cam şov
görüntülü sex
görüntülü şov
sanal sex
sanal seks
sohbet hatti
sex hattı
seks hattı
80527E5418
ReplyDeletesohbet hatti
görüntülü seks
sanal seks
cam şov
görüntülü şov
seks hattı
cam show
sohbet hatti
görüntülü sex