Hello Urgon_Cobol,
Good to see you in Microsoft Community.
Unfortunately, it is not possible to set a SATA port as external/removable media in Windows 11. The operating system determines whether a drive is internal or external based on the hardware configuration. In your case, since the SATA disk tray is connected directly to the motherboard, the operating system sees it as an internal drive.
The command you mentioned is used to change the behavior of external drives to be treated as internal drives, but it does not work the other way around.
Your best option would be to safely shut down the computer and unplug the SATA disk tray before removing the HDD. Alternatively, you can use a USB external enclosure for your SATA HDDs, which will be recognized as removable media by the operating system.
Additionally, as a reminder, some models of advanced motherboards offer hot-swap technology, which means that SATA disk can be safely removed without shutting down and without security risks. It depends on whether the computer hardware itself supports the feature. For more information, please refer to the user manual (operating guide) provided by your hardware manufacturer.
If anything is unclear, please do not hesitate to let me know.
Best Regards,
Mosken_L - MSFT | Microsoft Community Support Specialist