cwstad2
asked on
Powershell multiple queries
Hi all, is it possible to query multiple objects and have the all returned for example im looking to get a report on
SAMAccountName,name.IPv4Ad dress,Crea ted,Modifi ed,Operati ngSystemVe rsion,Oper atingSyste m,Operatin gSystemSer vicePack,L astLogonTi meStamp
thanks
SAMAccountName,name.IPv4Ad
thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
What becraig meant was, translated to the example by RMA:
function get-objectvalues
{
New-Object PsObject -Property @{
ComputerName = $env:ComputerName
TotalProcesses = (Get-Process).Count
}
}
$results = get-objectvalues
$results | format-table -auto
Write-Host "$($results.ComputerName) has $($results.TotalProcesses) processes running"
ASKER
sorry for the delay guys. Appreciate the help
Open in new window
OrOpen in new window