Windows Vista Forums

Checking network connections

  1. #1


    Hans Guest

    Checking network connections

    Hi,

    How can i check the number of incoming network connections in PS. I'm
    looking for something similar to net session. ?

    Thanks


      My System SpecsSystem Spec

  2.   


  3. #2


    Marco Shaw Guest

    Re: Checking network connections

    Hans wrote:

    > Hi,
    >
    > How can i check the number of incoming network connections in PS. I'm
    > looking for something similar to net session. ?
    >
    > Thanks
    Did you need anything additional? Because you can just run 'net
    session' directly from within PowerShell.

    Marco

    --
    ----------------
    PowerGadgets MVP
    http://www.powergadgets.com/mvp

    Blog:
    http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  4. #3


    Hans Guest

    Re: Checking network connections

    Well i'm creating a backup script (to backup some MS-Access database), but i
    want to check if any else in the network is still using the database. So
    idea is to check the number of incoming network connections;


    "Marco Shaw" <marco.shaw@_NO_SPAM_gmail.com> schreef in bericht
    news:Oc0ud3p$HHA.4568@xxxxxx

    > Hans wrote:

    >> Hi,
    >>
    >> How can i check the number of incoming network connections in PS. I'm
    >> looking for something similar to net session. ?
    >>
    >> Thanks
    >
    > Did you need anything additional? Because you can just run 'net session'
    > directly from within PowerShell.
    >
    > Marco
    >
    > --
    > ----------------
    > PowerGadgets MVP
    > http://www.powergadgets.com/mvp
    >
    > Blog:
    > http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  5. #4


    Marco Shaw Guest

    Re: Checking network connections

    Hans wrote:

    > Well i'm creating a backup script (to backup some MS-Access database),
    > but i want to check if any else in the network is still using the
    > database. So idea is to check the number of incoming network connections;
    You're best bet might be to check if there's a if there's a lock file
    though.

    But you can just call 'net session' directly:

    PSH> net session
    There are no entries in the list.

    PSH> $result=net session
    PSH> if ($result -like "*no entries*"){"no connections"}
    no connections

    Marco

      My System SpecsSystem Spec

  6. #5


    /\/\o\/\/ [MVP] Guest

    Re: Checking network connections

    gwmi win32_serverSession might give the onfo you need

    also you can use performance counters from PowerShell
    see also
    http://mow001.blogspot.com/2005/12/g...info-from.html

    h.t.h.

    Greetings /\/\o\/\/


    "Hans" wrote:

    > Well i'm creating a backup script (to backup some MS-Access database), but i
    > want to check if any else in the network is still using the database. So
    > idea is to check the number of incoming network connections;
    >
    >
    > "Marco Shaw" <marco.shaw@_NO_SPAM_gmail.com> schreef in bericht
    > news:Oc0ud3p$HHA.4568@xxxxxx

    > > Hans wrote:

    > >> Hi,
    > >>
    > >> How can i check the number of incoming network connections in PS. I'm
    > >> looking for something similar to net session. ?
    > >>
    > >> Thanks
    > >
    > > Did you need anything additional? Because you can just run 'net session'
    > > directly from within PowerShell.
    > >
    > > Marco
    > >
    > > --
    > > ----------------
    > > PowerGadgets MVP
    > > http://www.powergadgets.com/mvp
    > >
    > > Blog:
    > > http://marcoshaw.blogspot.com
    >
    >

      My System SpecsSystem Spec

  7. #6


    Kuma Guest

    Re: Checking network connections

    On Sep 24, 8:16 pm, "Hans" <hans.hant...@xxxxxx> wrote:

    > Hi,
    >
    > How can i check the number of incoming network connections in PS. I'm
    > looking for something similar to net session. ?
    >
    > Thanks
    You can use something similar to this:
    Get-WmiObject -ComputerName MYSERVER01 -Query {Select * From
    Win32_ServerConnection Where NumberOfFiles>"0" and
    ShareName="MYSHARE"} | Select-Object UserName,ShareName,NumberOfFiles
    | Format-Table -autosize

    This will work if the Database is the ONLY thing in the share. For
    some reason I can't figure out a way to check specific open files
    within shares just connections to a share that have files open.
    Replace MYSERVER01 with your server name and MYSHARE with the share
    name.


      My System SpecsSystem Spec


Checking network connections
Similar Threads
Thread Forum
network connections gone?! Vista General
Network Connections disappeared in Network sharing center Vista networking & sharing
Ridiculous Methods for Checking Network Status Vista networking & sharing
Network Connections Vista General
Network Connections Vista networking & sharing