Forum Discussion
user4444
Jan 26, 2022Copper Contributor
Expand-DedupFile - expand files on other Servers?
I would like to expand multiple files on a File Server that's using deduplication from a remote location. From my attempts at doing so it doesn't seem to work (The request is not supported), howe...
Jan 29, 2022
Does this work for you like this?
user4444
Feb 02, 2022Copper Contributor
Hello,
apologies for the delayed response.
This script doesn't work, but I think it might be more to do with the paths to folders.
Perhaps if I explain the bigger picture it might help.
You were kind enough to help me with a script on another thread where I was searching for folders in various network locations. I suppose we could call that part 1 of the process.
After finding the folders I need to expand the files inside them.
I would like my colleague who uses these scripts to be able to run them from one location (not locally). To do that the paths to search will be network shares rather than local folders.
So, while the script to search for the folders in network shares works, it returns the locations as network paths, not local. The script you have provided here requires local paths. I did some testing using local paths but this didn't work, however, it's quite likely due to me making a mistake.
apologies for the delayed response.
This script doesn't work, but I think it might be more to do with the paths to folders.
Perhaps if I explain the bigger picture it might help.
You were kind enough to help me with a script on another thread where I was searching for folders in various network locations. I suppose we could call that part 1 of the process.
After finding the folders I need to expand the files inside them.
I would like my colleague who uses these scripts to be able to run them from one location (not locally). To do that the paths to search will be network shares rather than local folders.
So, while the script to search for the folders in network shares works, it returns the locations as network paths, not local. The script you have provided here requires local paths. I did some testing using local paths but this didn't work, however, it's quite likely due to me making a mistake.
- Feb 02, 2022
Strange, I tested it using invoke-command with a local path and it did return a error code but the Measure-DedupFileMetadata statistics showed me that the files were not dedupped anymore...
So, if you enter e:\data and servername server01.. It connects to server01 using a invoke-command and does a expand-dedupfile command on e:\data.Could take some time to dedup the files, but run a measure-dedupfilemetadata before and after running the script on the target server to check the diffence.
- user4444Feb 04, 2022Copper ContributorHello Harm_Veenstra,
I've performed some more testing and I think your script is working when using the Server name with the folder’s local path. I believe the cause of the failures are due to the users software having locked folder/files.
I received some inconsistent results which I now believe were due to the folder permissions being changed by the users first attempt to run their software. Their software deliberately locks the files, but doesn't unlock them when it fails to complete due to errors. The users software errors are due to the deduplicated files.
I need to wait on the user to provide fresh, untouched by their software, folder/files to confirm there is no problems on the Powershell side. I am quite confident this is the cause.
To troubleshoot the issue I manually expanded (expand-dedupfile) the files and checked the errors. I could see “access denied” errors. The user was able to revert the actions taken by their software. After doing so I was able to deduplicate the remaining files without the access denied errors.
I still have the problem of needing to know the local location of the folders. The script that searches for the folders runs remotely and searches network shares. Therefore, the paths returned are UNC paths, not the local path that the dedupe script requires.- Feb 04, 2022In my case the files were not in use, so not sure why the errors are there.. But in your case that could be the problem... And the location path relative to the server is something that you need to find in this case, it's strange that UNC paths don't work