19 lines
1.2 KiB
PowerShell
19 lines
1.2 KiB
PowerShell
$ErrorActionPreference='SilentlyContinue'
|
|
"==== WINDOWS SERVER BACKUP FEATURE ===="
|
|
(Get-WindowsFeature Windows-Server-Backup | Select-Object Name,Installed | Out-String)
|
|
"==== ALL DISKS (spot a USB/backup disk) ===="
|
|
Get-Disk | Select-Object Number,FriendlyName,BusType,@{n='SizeGB';e={[math]::Round($_.Size/1GB,0)}},OperationalStatus,PartitionStyle | Format-Table -Auto | Out-String
|
|
"==== VOLUMES ===="
|
|
Get-Volume | Where-Object {$_.DriveType -ne 'CD-ROM'} | Select-Object DriveLetter,FileSystemLabel,DriveType,@{n='SizeGB';e={[math]::Round($_.Size/1GB,1)}},@{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}} | Format-Table -Auto | Out-String
|
|
"==== C: USED (what we must protect) ===="
|
|
$c=Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'"
|
|
"Used GB: $([math]::Round(($c.Size-$c.FreeSpace)/1GB,1)) Free GB: $([math]::Round($c.FreeSpace/1GB,1))"
|
|
"==== VSS WRITER HEALTH (must be stable/no-error before backup) ===="
|
|
$w = vssadmin list writers 2>$null
|
|
($w | Select-String -Pattern 'Writer name:|State:|Last error:' | Out-String)
|
|
"==== EXISTING WBADMIN BACKUP HISTORY ===="
|
|
wbadmin get versions 2>&1 | Out-String
|
|
"==== REACH NEW SERVER? ===="
|
|
Test-NetConnection -ComputerName TPS-SVR -Port 445 -InformationLevel Quiet 2>$null
|
|
"==== DONE ===="
|