Cómo exportar listado de todos los Amazon Workspaces y obtener su última conexión.

1. Creación del Rol IAM de la instancia bastión.

2. Asignación del Rol a la instancia Windows EC2

3. Conectamos a la instancia Bastión RDP

Get-WKSWorkspace | ForEach-Object { $connstat = Get-WKSWorkspacesConnectionStatus -WorkspaceId $_.WorkspaceId  New-Object PSObject -Property @{              WorkspaceId = $_.WorkspaceId; User = $_.UserName; ComputerName = $_.ComputerName; DirectoryId = $_.DirectoryId; IpAddress = $_.IpAddress; State = $_.State; SubnetId  = $_.SubnetId; ConnectionState = $connstat.ConnectionState; LastConnection = $connstat.LastKnownUserConnectionTimestamp; ConnectionStateCheckTimestamp = $connstat.ConnectionStateCheckTimestamp  }  } | Export-Csv outputtesttest.csv –NoTypeInformation

Conclusiones

--

--

--

Entrepreneur, travel lover, AWS x3, CIO High Cloud Tec , AWS Community Builder, passionate about cloud learning

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Oscar Ivan Ocampo

Oscar Ivan Ocampo

Entrepreneur, travel lover, AWS x3, CIO High Cloud Tec , AWS Community Builder, passionate about cloud learning

More from Medium

Guide to 5 best practices on AWS Cloud for cost optimization

Credit Checker: An effective Equifax API integration

AWS Cloud Experienced Questions & Answers

AWS Organizations — my perception