I am trying to defrag the volume by optimize-volume cmdlet . I have passed mount point path. But it fails as below.
PS C:\Users\Administrator> Optimize-Volume -Path C:\Testvol1\disk Optimize-Volume : No MSFT_Volume objects found with property 'Path' equal to 'C:\Testvol1\disk'. Verify the value of the property and retry. At line:1 char:1 + Optimize-Volume -Path C:\Testvol1\disk + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Testvol1\disk:String) [Optimize-Volume], CimJobException + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Path,Optimize-Volume
How to pass path for Optimize-volume? Or is there any other way to defrag using mounthpath available?