With VSS writers till being a pain sometimes and mess up things like backups, I thought it would be useful to have the manual restarts of corresponding services scripted.
First we start with a function supplied on Technet here.
With the information pulled by this function I’ve created a little script which restart the services;
$ListVSS = Get-VssWriters | where {$_.StateDesc -ne "Stable"} $VSSHash = @{ "DHCP Jet writer" = "DHCP Server" "COM+ REGDB Writer" = "Volume Shadow Copy" "Microsoft Hyper-V VSS Writer" = "Hyper-V Virtual Machine Management" "WMI Writer" = "Windows Management Instrumentation" "TermServLicensing" = "Remote Desktop Licensing" "System Writer" = "Cryptographic Services" "SqlServerWriter" = "SQL Server VSS Writer" } ForEach ($Writer in $ListVSS){ ForEach ($VSSService in $VSSHash.GetEnumerator()){ if($Writer.WriterName -eq $VSSService.Key){ Restart-Service -DisplayName $($VSSService.Value) -Force -verbose }}}
If there are any other VSS writers stuck, here is an additional list of writers;
"ASR Writer" = "VSS Volume Shadow Copy"
"BITS Writer" = "BITS Background Intelligent Transfer Service"
"COM+ REGDB Writer" = "VSS Volume Shadow Copy"
"DFS Replication service writer" = "DFSR DFS Replication"
"DHCP Jet Writer" = "DHCP Server"
"FRS Writer" = "NtFrs File Replication"
"FSRM writer" = "File Server Resource Manager"
"IIS Config Writer" = "Application Host Helper Service"
"IIS Metabase Writer" = "IIS Admin Service"
"Microsoft Exchange Writer" = "Microsoft Exchange Information Store"
"Microsoft Hyper-V VSS Writer" = "Hyper-V Virtual Machine Management"
"NTDS NTDS" = "Active Directory Domain Services"
"OSearch VSS Writer" = "Office SharePoint Server Search"
"OSearch14 VSS Writer" = "SharePoint Server Search 14"
"Registry Writer" = "VSS Volume Shadow Copy"
"Shadow Copy Optimization Writer" = "VSS Volume Shadow Copy"
"SPSearch VSS Writer" = "Windows SharePoint Services Search"
"SPSearch4 VSS Writer" = "SharePoint Foundation Search V4"
"SqlServerWriter" = "SQL Server VSS Writer"
"System Writer" = "Cryptographic Services"
"TermServLicensing" = "Remote Desktop Licensing"
"WINS Jet Writer" = "Windows Internet Name Service (WINS)"
"WMI Writer" = "Windows Management Instrumentation"
Be First to Comment