Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Use of sql server tokens

$
0
0

Hi,

I am creating a new job which has powershell job steps.

I know that in TSQL you can make use of tokens:

PRINT N'Current instance name is $(ESCAPE_SQUOTE(INST))' ;

PRINT N'Current server name is $(ESCAPE_SQUOTE(MACH))' ;

Is there a way to embed it into Powershell without running TSQL queries?

I need to be able to do something like this: 

$InstanceName = $(ESCAPE_SQUOTE(INST))' ;

$ServerName = $(ESCAPE_SQUOTE(MACH))' ;

 

Thanks.

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles