I have a simple script that works perfectly, but the output is what I need help with.
Here is my script.
# Clear Screen
cls
# Pre Work
Asnp Citrix.* -ErrorAction SilentlyContinue
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
# Delete the exsisting morning report
Remove-Item c:\scripts\DGSUMMARY.htm
$hname = hostname
# Create the HTML table
$a = ""
# ConvertTo-Html -body "
ALP JMF Pooled
" | Add-Content c:\scripts\DGSUMMARY.htm
# Get AD Stats for VDI Groups
##Get-QADGroup VDI_PVS32_Workstation_Access -SizeLimit 0 | Select-Object Name,@{n='MemberCount';e={ (Get-QADGroupMember $_ | Measure-Object).Count}} | ConvertTo-Html -Property Name,MemberCount | Add-Content c:\scripts\DGSUMMARY.htm
Get-QADGroup VDI_PVS32_Workstation -SizeLimit 0 | Select-Object Name,@{n='MemberCount';e={ (Get-QADGroupMember $_ | Measure-Object).Count}} | ConvertTo-Html -Property Name,MemberCount | Add-Content c:\scripts\DGSUMMARY.htm
# Add a Space to the Report
ConvertTo-Html -body "" | Add-Content c:\scripts\DGSUMMARY.htm
# Get % Inuse Stats
$dg = Get-BrokerDesktopGroup "JMF Pooled Win7x86"
Get-BrokerDesktopUsage -AdminAddress ALVJMSWDDC001BP -DesktopGroupUid $dg.Uid -MaxRecordCount 1 -SortBy '-Timestamp' | Select "ALP JMF",InUse,@{Name='Percent';Expression={'{0:P0}' -f ($_.InUse / $dg.TotalDesktops)}} | ConvertTo-Html -head $a -Property "ALP JMF",Inuse,Percent | Add-Content c:\scripts\DGSUMMARY.htm
ConvertTo-Html -body "" | Add-Content c:\scripts\DGSUMMARY.htm
The Output looks like this.
See attchment
What, I am trying to do is get Name, MemeberCount, ALP JMF, Inuse, and percent all on 1 line.