MWJ Computing A life lived through digital exploration.

31Jan/100

Link: Parse NMAP XML Output

I came across this while browsing around today. The post was released in June 2009, but still a cool way to use PowerShell.

http://blogs.sans.org/windows-security/2009/06/11/powershell-script-to-parse-nmap-xml-output/

I am a frequent user of NMAP and of course PowerShell and this seems like it will be really useful.

Filed under: Links No Comments
8Jan/100

January 2010 Technet Magazine is out

The January 2010 Technet Magazine is out. You can read it here.

The disappointing part is how much content there is. Not a lot. Frustrating, but still has good content.

- Matt

Filed under: Links No Comments
8Jan/100

Link Clearance – 1/8/2010

Wonder what I am reading this weekend? Here is a short list of the links I will be reading this weekend. There are a ton more, but these are on the top of the to read pile.

This list may get updated throughout the day depending on how busy I get.

-Matt

Filed under: Links No Comments
5Jan/100

An introduction to PowerShell remoting – Part 1

One of the exciting features of PowerShell v2 is remoting. In a series of posts, I am going to go through PowerShell remoting and explore its features. Some topics I will cover are:

  • Getting Started
  • Setting up your environment
  • Commands and Cmdlets
  • Security
  • Random things to do with remoting

Warning: If you are a member of the SE Michigan PowerShell Users group, please close your eyes as I will be presenting on this the next two months.

In this first post we are going to go through what you need to make PowerShell remoting work on your network and some things you need to know about remoting before you start. So lets get started.

What you need

If you are lucky to be running Windows 7 or Windows Server 2008 R2, you already have the necessary software to get PowerShell remoting up and running. However, if you are running any of the following you will need the Windows Management Framework and the .NET Framework 2.0 or later.

  • Windows XP Service Pack 3
  • Windows Vista Service Packs 1 or 2
  • Windows Server 2003 Service Pack 2
  • Windows Server 2003 R2
  • Windows Server 2008 Service Pack 2

The Windows Management Framework includes Windows PowerShell 2.0, Windows Remote Management (WinRM) 2.0 and Background Intelligent Transfer Service (BITS) 4.0. You can download the framework here.

To find out what version of PowerShell you are using, you can use the variable $PSVersionTable. You want $PSVersionTable.Version.Major to be 2. Here is the output from one of my lab PC’s running Windows 7.

powershell-version-table

Some things to know

As I was going through starting to configure PowerShell remoting, here are some things I found.

  • Both the remote and local computers must be configured to use remoting.
  • You must have PowerShell and the related bits installed on all machines.
  • You can both run scripts remotely as well has have an interactive session with a remote PC.
  • You must be a member of the Administrators group on the remote PC or provide valid credentials with Admin privileges.
  • On current versions of windows. The network type must be work or home. Public will not work.
  • Any policies, ie group policies, on the remote pc are in effect in remote PowerShell sessions. Keep that in mind if something isn’t working as expected.

Where we go from here

In the next post, I will go over enabling PowerShell remoting. If you are following along at home, you will need to have the necessary software installed to continue with the examples. If you have any questions or comments  please leave them here, email feedback [at] mwjcomputing [dot] com, or contact me on Twitter at @mwjcomputing.

-Matt

Updated 1/5/2009: Updated to include service pack info for Windows OSs. Thanks to Aleksandar Nikolić for the reminder!

Filed under: PowerShell No Comments