I am getiing some scripts which written in SQLcmd code which connect various server and excutes the commands . But I want to do it by SSMs .Can anyone please help?
You have enable the "SQLCMD mode" of the Query Editor, which is "disabled" by default. To do so, go to the Query menu and click on the "SQLCMD mode" item or press ALT+Q+M.