Skip to content

jeremyciak/Get-UserSession

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Get-UserSession

SYNOPSIS

PowerShell wrapper for "query user" command which also offers resolving the Display Name of users and gathering of user session process information

DESCRIPTION

PowerShell wrapper for "query user" command which also offers resolving the Display Name of users and gathering of user session process information

PARAMETERS

-ComputerName

Foo Foo
The computer name(s) for which you want to gather user session information

-ResolveDisplayName

Foo Foo Foo
Used to determine whether or not to attempt resolving the Display Name for each user

-IncludeProcessInfo

Foo Foo Foo
Used to determine whether or not to gather process information for each user session

-Credential

Foo Foo
Used to pass into the Invoke-Command function for gathering process information. This is exposed so that you have flexibility for connectivity.

-Port

Foo Foo Foo
Used to pass into the Invoke-Command function for gathering process information. This is exposed so that you have flexibility for connectivity.

-UseSSL

Foo Foo Foo
Used to pass into the Invoke-Command function for gathering process information. This is exposed so that you have flexibility for connectivity.

-Authentication

Foo Foo
Used to pass into the Invoke-Command function for gathering process information. This is exposed so that you have flexibility for connectivity.

-SessionOption

Foo Foo
Used to pass into the Invoke-Command function for gathering process information. This is exposed so that you have flexibility for connectivity.

-BatchSize

Foo Foo Foo
Used for the runspace pooling that is utilized for more efficient parallel processing. This is exposed so that you have flexibility for runspace behavior. Default value is calculated from: [int]$env:NUMBER_OF_PROCESSORS + 1

-ApartmentState

Foo Foo Foo
Used for the runspace pooling that is utilized for more efficient parallel processing. This is exposed so that you have flexibility for runspace behavior. Default value is 'STA'

-ShowProgress

Foo Foo Foo
Used to determine whether or not to display a progress bar as the runspace pool is processed

EXAMPLE 1

PS C:\>Get-UserSession

Gets the current user sessions from the local machine

EXAMPLE 2

PS C:\>Get-UserSession -ComputerName (Get-ADComputer -Filter *).DnsHostname -ShowProgress -Verbose | Format-Table -Autosize

Gets the user sessions from all Active Directory computers while showing a progress bar and displaying verbose information

EXAMPLE 3

PS C:\>'ComputerA', 'ComputerB' | Get-UserSession -ResolveDisplayName | Format-Table -Autosize

Gets the user sessions from ComputerA and ComputerB and resolves the Display Name of the users for the output

About

PowerShell function to get user session information from computers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published