' List all SSAS databases in specified server. ' Run example ' cscript ListDBs.vbs /ServerName:MyServerName Dim ServerName Set Arguments = WScript.Arguments.Named ServerName = Arguments.Item("ServerName") DIM StateOfObject StateOfObject = Array("Processed","PartiallyProcessed","Unprocessed") Dim oServer, oDB, State set oServer = CreateObject("Microsoft.AnalysisServices.Server") oServer.Connect(ServerName) WScript.Echo "=== SSAS databases on server " & ServerName For Each oDB in oServer.Databases WScript.Echo oDB.Name WScript.Echo " State : " & StateOfObject(oDB.State) WScript.Echo " Last Update : " & CStr(oDB.LastUpdate) WScript.Echo " Last Processed: " & CStr(oDB.LastProcessed) WScript.Echo " Estimated Size: " & FormatNumber(CDbl(oDB.EstimatedSize) / 1024 / 1024) & " MB" ' On big DB could be slow, so consider commenting this line out WScript.Echo "" Next