????

Your IP : 18.222.233.22


Current Path : C:/Windows/SysWOW64/WindowsPowerShell/v1.0/Modules/SmbShare/
Upload File :
Current File : C:/Windows/SysWOW64/WindowsPowerShell/v1.0/Modules/SmbShare/SmbShare.Format.Helper.psm1

<#

Copyright (c) 2011 Microsoft Corporation. All Rights Reserved.

Module Name:

    SmbShare.Format.Helper.psm1

Description:

    Provides helper routines for formatting the output of
    SmbShare CmdLets.

#>

function Format-LinkSpeed($LinkSpeed)
<#
Function Description:
    This function returns the link speed of a network adapter

Arguments:
    $LinkSpeed

Return Value:
    Formatted link speed
#>
{
    $out=
      if($LinkSpeed -eq $null)
        {"Unknown"}
      else
        {
          switch ($LinkSpeed)
          {
            {$_ -lt 1000} {"$_  bps"; break}
            {$_ -lt 1000000} {"$($_/1000) Kbps"; break}
            {$_ -lt 1000000000} {"$($_/1000000) Mbps"; break}
            default {"$($_/1000000000) Gbps"}
          }
       }

     return $out
}