Posted by: Preetam | January 20, 2007

One Good Day

I discovered great thing today, you can divert the output of text file using out-file.

USAGE : .\RemoteSvc.ps1 . a* | Out-File services.txt

No big deal I know but it is always better to share it. I’m happy today as I was able to use powershell scripts in production enviornment and I was able to get satisfied results. Generally I don’t check if the server is reachable, as result for few servers error was thrown. but script continued to work, for this to work in VBScript you will have to type

“On error resume next” at the top of text file or else script will exit tags:

Technorati tags:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: