Add Workflows/Windows/VSS/Delete Shadow Copies.md
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 8s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 8s
				
			This commit is contained in:
		
							
								
								
									
										20
									
								
								Workflows/Windows/VSS/Delete Shadow Copies.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Workflows/Windows/VSS/Delete Shadow Copies.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| ## Purpose | ||||
| You may find that you need to delete shadow copies on a disk for any number of reasons such as freeing up space.  Sometimes the shadow copies simply don't want to be deleted gracefully.  In those circumstances, you can use the two methods seen below to delete the shadows. | ||||
|  | ||||
| !!! warning | ||||
|     These commands will delete **all** shadow copies for the associated drive letter.  In these examples, the drive letter will be `D:\`. | ||||
|  | ||||
| ### Delete Shadows Via `vssadmin` | ||||
| Vssadmin is generally the de-facto method of deleting shadows, as it is pretty graceful with the process, but sometimes antivirus might not let you run it thinking you are doing something ransomware-ish.  If that happens, defer to the `diskshadow` method seen further below. | ||||
| ```batch | ||||
| vssadmin delete shadows /for=D: /all /quiet | ||||
| ``` | ||||
|  | ||||
| ### Delete Shadows via `diskshadow` | ||||
| This method is a little more aggressive than `vssadmin` and should be only used as a *Plan B* if `vssadmin` doesn't work. | ||||
| ```batch | ||||
| diskshadow | ||||
| set context persistent nowriters | ||||
| delete shadows volume D: | ||||
| exit | ||||
| ``` | ||||
		Reference in New Issue
	
	Block a user