Most of my scripts end up being functions because I will eventually combine them into modules My recent script function get-logedonuser {
param (
[string] $computername = $env:COMPUTERNAME
)
Get-WmiObject -Class Win32_LogonSession -ComputerName… Read the full text.