Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Get AVD user sessions for all hostpools in current context
- Get-AzWvdHostPool -PipelineVariable hpool | ForEach-Object { Get-AzWvdUserSession -HostPoolName $hpool.name -ResourceGroupName $hpool.ResourceGroupName }|select @{n='HostPool';e={$hpool.Name}},@{n='FriendlyName';e={$hpool.FriendlyName}},@{n='ResourceGroup';e={$hpool.ResourceGroupName}},@{n='Location';e={$hpool.location}},UserPrincipalName,@{n='Host';e={$_.Name -replace '^.*/(.+)/.*$' , '$1' }},ApplicationType,CreateTime,SessionState,@{n='SessionId';e={split-path $_.Id -leaf }}
Advertisement
Add Comment
Please, Sign In to add comment