I need help in converting my vbscript to powershell

Welcome Forums General PowerShell Q&A I need help in converting my vbscript to powershell

This topic contains 4 replies, has 2 voices, and was last updated by

 
Participant
5 years, 2 months ago.

  • Author
    Posts
  • #11471

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,785
    Helping HandTeam Member
    Rank: Community Hero

    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

    Participant
    Points: 0
    Rank: Member

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

  • #11475

    Participant
    Points: 0
    Rank: Member

    attaching the script as continuation

  • #11477

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘I need help in converting my vbscript to powershell’ is closed to new replies.