A simple Windows command-line tool for changing logical sector size for WD/HGST Datacenter drives. This program needs administrator privilege to run. It is designed to work on SATA interface by using ATA Pass-Through function provided by Windows.
WD4kConverter \\.\PhysicalDrive[num]
Physical drive numbers can be obtained by Powershell command "Get-Disk | Format-List"
Do NOT attempt to run this program on drives already filled with data. Despite the function itself doesn't affect data directly, but Partition Table and File System are directly relying on sector size. Your data will remain byte by byte in your drive but your files will be inaccessible!
Bunch of the code is copied from smartmontools.
This page provided a lot of information:
Also this page:
https://stackoverflow.com/questions/5070987/sending-ata-commands-directly-to-device-in-windows
Last but not least, the official document from WD themselves:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.