I need help in converting my vbscript to powershell

Hi Guys,

Im new to powershell and i wanted some guide/ help in moving the below vbscript to powershell. The vbscript is just a normal script which does a quality check on a server

When you’ve got a massive script like that, please attach it as a TXT file rather than pasting it into the forums. You can edit your post, if you like, to attach your script, or add a post to this topic with the attachment.

Also, you’re going to have to be more specific. We obviously can’t rewrite the script for you, and it’s a bit tough to look at a giant script like that and offer any help, unless you have a specific question you’d like answered.

You can start with http://technet.microsoft.com/en-us/library/ee221101.aspx for a general conversion guide. PowerShell isn’t a “scripting language,” though, and simply “converting” a script isn’t going to take advantage of what PowerShell is and does. It’s often else work to simply start over, and you’ll typically wind up with better results, too.

oops im sorry, ill attach the script now in a txt file

attaching the script as continuation

i tried to do some part in powershell as part of my learning like

Get-WmiObject Win32_ComputerSystem | select domain
Get-WmiObject win32_localtime | select hour,minute,second
gwmi win32_networkadapter -Filter ‘netconnectionid = " lan port1"’ | select speed

i dont know how to find the duplex speed using powershell. Or you know how to find the IP address details etc