I need help in converting my vbscript to powershell

This topic contains 4 replies, has 2 voices, and was last updated by  Narayanan Subramanian 4 years, 7 months ago.

  • Author
  • #11471

    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

  • #11472

    Don Jones

    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.

  • #11474

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

  • #11475

    attaching the script as continuation

  • #11477

    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

You must be logged in to reply to this topic.