Subscribe

Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts

Search

Archives

PowerShell 2.0 Getting Started Links

by Steve Wiseman on June 11, 2010 · 0 comments

in Scripts,Tips,Tools,Utility


.

I have been avoiding it for a long time. I know batch files, and VB script so well that I am not in the mood to learn a totally different scripting language.

As each day passes Microsoft is slowly phasing out their support for VB Script. Eventually Power Shell will be the only way to get admin scripts to run on your Windows Box.

While I was browsing TechNet, I found some great likes that can help you get up to speed:

Getting started with PowerShell 2.0 – A perfect place to start creating your first script.

Piping and The Pipeline – Shows you how to string PowerShell scripts together

Tab Expansion – You have seen it before. Press Tab at the command line and it automatically finishes your thought. Same for PowerShell

Shortcut Keys – Learn how to use keyboard shortcuts that will save you time

Remoting – Run your scripts across the network.

The last one is my fav. Simply because PowerShell makes remote admin so much easier (Once you get it configured).

To get a PowerShell session with a remote computer, type:

Enter-PSSession -ComputerName {HOSTNAME}

Where {HOSTNAME} is the name of the remote computer.

If remote administration is not enabled on the remote machine, you will see an error like this:

Remote Administration Error

Powershell has a built-in command to enable remote admin:

winrm quickconfig

Execute the above command on the remote system, and it will add the proper firewall exceptions for your remote session to get through.

Now, to kill that process – get the remote session open and this command will do the trick:

Stop-Process -processname notepad

It kills any open copy of notepad on the remote system.

Clearly, PowerShell is a whole new experience. Not happy I have to re-learn everything, but it does seem like a few commands can go a long way.

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

Leave a Comment

Category Links - Windows Forum - Exchange Forum