PowerShell script exchange
Post Reply
JS-Virt
Novice
Posts: 3
Liked: never
Joined: Oct 16, 2015 5:20 am
Full Name: Joe S.
Contact:

Command to show user sessions on B&R console

Post by JS-Virt »

Hello,

Is there a command or a way i can see who has a console open (show their IP and username)?

I tried Get-VBRServerSession but it's showing nothing at all. But the console is showing about 20 "Shell Run" sessions still open.

Thanks.
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Command to show user sessions on B&R console

Post by Egor Yakovlev »

- You can use Export-VBRAudit to see logon sessions by time, but it does not show if session is still active. It also shows if user changes something so might be of use to track the guy down.
- You can check C:\ProgramData\Veeam\Backup\Console\ for per-user shell logs. Sort by Change Date and see who is clicking something in a console.

Code: Select all

Log has been started by 'demo\egor.yakovlev' user (Interactive)
MachineName: [MyWorkstationName], OS: [Microsoft Windows Server 2016 Standard (10.0.14393)], CPU: [8]
UTC Time: [4/30/2020 11:00:57 AM], DaylightSavingTime: [False]
[4/30/2020 11:23:57 AM] <01> Info     Expanding node: 'Jobs' (Jobs)
- Last but not least, Wireshark catches active Console connections like a charm with "(ip.src != your.vbr.server.ip) and (tcp.port==9392)" filter.

After all, only local admins of VBR Server(default setting, unless you altered Veeam User Roles) can connect to VBR Server via console, so the list should be quite short?
/Thanks!
JS-Virt
Novice
Posts: 3
Liked: never
Joined: Oct 16, 2015 5:20 am
Full Name: Joe S.
Contact:

Re: Command to show user sessions on B&R console

Post by JS-Virt »

Hello,


When I try to run Export-VBRAudit, I get:

Export-VBRAudit : The term 'Export-VBRAudit' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Export-VBRAudit -From 17/04/2020 -To 01.05.2020
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Export-VBRAudit:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Egor Yakovlev
Veeam Software
Posts: 2537
Liked: 683 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Command to show user sessions on B&R console

Post by Egor Yakovlev »

It's a new feature of VBR10. Make sure you are up to date to use it.
Upgrade guide can be found here.
/Cheers!
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Command to show user sessions on B&R console

Post by veremin »

Also, don't forget to check whether:

- the account you're running the script under has required permissions
- you're adding Veeam PS snap-in in the beginning of the script (more information here)

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests