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
Passionate Developer with 7 years of extensive experience working for Data center related products. Contributed and lead the efforts in Solutioning and engineering in Nimesa Technologies for developing Dataprotection and Copy data management product for Private 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.