ConvertTo-SecureString PowerShell command is used to convert plain text into an encrypted form that can be used for secure storage or transmission. It takes a plain text string and converts it to a secure string object that can be saved to a file or used in memory for authentication or encryption purposes.
Command Reference:
Variable name: $pass
Password: password123
$pass = ConvertTo-SecureString 'password123' -AsPlainText -Force