1.    24 Sep 2007 #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.    24 Sep 2007 #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

  3.    24 Sep 2007 #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

  4.    24 Sep 2007 #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

  5.    24 Sep 2007 #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

  6.    26 Sep 2007 #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


Similar Threads
Thread Forum
All network connections gone
Hi, I recently tried to set up a connection to my linksys wireless router, model WRK54G. I struggled my way through manually and thought I had...
Network & Sharing
Network Connections disappeared in Network sharing center
I noticed that my Network connections (Local Area connection, Bluetooth connection, Wireless connection) disappeared SP1 Vista Home premium Update....
Vista networking & sharing
Connections to a network
If anyone can help me with this problem, please let me know. I have my network set up at home and am able to connect to everything. However, i...
Vista General
2 Network connections available?
I have a laptop with wireless built in. However, I would like to change to a wired connection once placed in the docking station and when removed...
Vista networking & sharing
Network Connections
I work in an office where all of the computers are running Windows 2000 or Windows XP and Windows Network. My laptop has Windows Vista. When...
Vista networking & sharing
Network Connections
I have a home network that has a Vista laptop, a Windows 2000 desktop and a desktop that I just upgraded from XP Home to Vista Home Premium, which...
Vista networking & sharing
Network Connections
I didn't see any icon in my Folder to get my Wireless Network Settings... I tried to set up a new home or small conecction, and I can't do it
Vista networking & sharing

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 11:29.
    .