脚本内容: <# .SYNOPSIS This script grab all ARM VM VHD file in the subscription and caculate VHD size. .DESCRIPTION This script grab all ARM VM VHD file in the subscription and caculate VHD size. .Example .\Get-ArmVMDiskSize.ps1 -subscriptionid xxxxxxx-x
代码: using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.IO; using System.Text; using System.Management; using System.Runtime.InteropServices; namespace Lemony.SystemInfo { /// /// 系统信息类 - 获取C