Announcement

Collapse
No announcement yet.

What Revit Wants: How to find the IPs and Usernames of Users Logged In on your Networ

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What Revit Wants: How to find the IPs and Usernames of Users Logged In on your Networ

    Install and Run Windows Powershell

    Give yourself unrestricted script access:
    Set-ExecutionPolicy Unrestricted
    Make a list of IPs to query and put it in a text file (1 IP per line).

    Modify script below and put it in a text file with extension .ps1 (like script.ps1)

    $ErrorActionPreference ='SilentlyContinue'
    $computers
    =Get-Contentg:\script\ipaddress.txt
    foreach($computer in $computers){
    $ping
    =Test-Connection-ComputerName $computer -Count1-Quiet
    $computerName
    =[system.net.dns]::Resolve("$computer")
    #$hostname = $computerName.HostName
    $shortHostname
    = $computerName.HostName.Split(".")[0]
    if($ping -eq 'True')
    {
    $UserName
    =(Get-WmiObject-ComputerName $computer win32_ComputerSystem).UserName
    Write-Host"$shortHostname $UserName"-ForegroundColorGreen
    #Write-Host "$hostname is pingable" -ForegroundColor Green
    }
    else
    {
    Write-Host"$computer is not pingable"-ForegroundColorRed
    }
    }
    Put the .txt and the.ps1 in the same folder.

    Browse to the folder in Powershell.

    Type .\script.ps1

    Wait for the query to find all the logged in users on your IP range...

    from
    Power ping and get computer, username


    Click here to view the entire blog post.
    Luke Johnson | Autodesk Expert Elite Member
    Author of What Revit Wants

Related Topics

Collapse

Working...
X