Quantcast
Channel: VMware Communities: Message List - VMware View
Viewing all articles
Browse latest Browse all 19267

Re: Find inactive desktops

$
0
0

The Events database does the trick, but I've only given you a "Helpful" answer because the events database only goes back 3 months and doesn't hold into account recently created VMs. To circumvent that issue you'd need a "last log in"-field.

I realise 3 months is longer than 90 days, but I'd like to get a timestamp of when the last time they logged in was to take back to the end user. If it's been more than 3 months I'll just be able to say "it was more than 3 months".

 

This is the query I used:

 

 

create table #LocalTempTable(
DesktopID nvarchar(512),
EventText nvarchar(512),
Time datetime)

 

INSERT INTO #LocalTempTable(DesktopID, EventText, Time)
Select DesktopID, ModuleAndEventText, Time
FROM dbo.VMEevent
order by Time DESC

 

DELETE FROM #LocalTempTable
WHERE DesktopID IN (
SELECT DesktopID
FROM #LocalTempTable
WHERE EventText like 'User%')

 

SELECT DISTINCT DesktopID
FROM #LocalTempTable

 

DROP TABLE #LocalTempTable


Viewing all articles
Browse latest Browse all 19267

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>