locked
the get-networkstatistics.ps1 script isn't working for me RRS feed

  • Question

  • Hello,

    This post is regarding the get-networkstatistics.ps1 script.

    I run the command once to implement the function (I have debug/trace level set to two with 'set-psdebug -trace 2'):

    I then attempt to run the script against the local computer:


    I then ran the same script against another machine.


    Execution policy is set to unrestricted during the commands above:

    Can someone tell me what the prerequisites are for this script to run successfully?

    • Moved by Bill_Stewart Monday, July 29, 2019 7:35 PM This is not "teach me basics" forum
    Friday, October 26, 2018 2:21 PM

All replies

  • There's a Q & A section in the gallery for support for gallery scripts

    https://gallery.technet.microsoft.com/scriptcenter/Get-NetworkStatistics-66057d71/view/Discussions#content


    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    • Proposed as answer by jrv Friday, October 26, 2018 8:52 PM
    Friday, October 26, 2018 2:55 PM
  • Thanks for your reply. Unfortunately, I already checked that site and even posted the same question there. 

    • Edited by byroni13 Friday, October 26, 2018 3:03 PM
    Friday, October 26, 2018 3:01 PM
  • You should have a little patience. Usually they do not offer 24/7 support with a service level.  ;-)

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Friday, October 26, 2018 3:27 PM
  • I figured it out.

    To create the function I had to type this:

    . c:\temp\get-networkstatistics.ps1

    instead of

    .\temp\get-networkstatistics.ps1

    --

    after doing this I was able run the following command successfully:

    get-networkstatistics -computername computername | Export-CSV "C:\temp\computername.csv"
    Friday, October 26, 2018 4:02 PM