While testing our product Nimesa with Microsoft SQL Server 2016 on Microsoft Windows 2019 i hit with some scenarios my nodes in SQL cluster has some shadows, i wanted to check in all the machine and delete the shadows.
What i did is, i wrote a small powershell script which connects to all the nodes in my test bed and run diskshadow command
delete shadows all
For that, First i need to enable the PowerShell Remoting on all the nodes ( My nodes are connected to active directory and all are part of Windows Failover clustering )
And to run diskshadow commands remotely using script mode, first i write the script to temp file and delete it later
$script = “./tmp.dsh”
“list shadows all” | Set-Content $script
diskshadow /s $script
Finally did a forloop and connected to all machines and deleted the shadows.
Note: Password is hardcoded in the script
6+ years of experience in building Data Protection, Copy Data Management and Storage management applications, automation software and plugins for private datacenter and public clouds
This is my personal weblog, opinions expressed here represent my own and not those of my employer.
All content provided on this blog is for informational purposes only and i will not be liable for any errors, losses, or damages from the display or use of this information.