I am not sure if there's an equivalent TSQL script for this.
I want to Generate Scripts using TSQL code similar to how backup and others items work in SSMS
clicking the script action it will generate this tsql script
BACKUP DATABASE [prosmartexamples.prosmarttools] TO DISK = N'D:\Backup\example.bak' WITH NOFORMAT, NOINIT, NAME = N'example.test-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Now, I want it also to work the same in Generate Scripts but I dont know how to get the equivalent of it in TSQL