dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.47k stars 800 forks source link

Get-DbaSerivce detect PowerBI and Polybase service #8408

Open tboggiano opened 2 years ago

tboggiano commented 2 years ago

Summarize Functionality

For the Get-DbaService command to detect with PowerBI server is installed. I know this is not a service that is installed with the installed, but neither is SSRS anymore, but I've got a job now where this was installed on a server, and it would be nice if it could be detected for when using the Max Memory stuff and setting service account stuff.

Is there a command that is similiar or close to what you are looking for?

No

Technical Details

No response

potatoqualitee commented 2 years ago

Looks like we use SqWmi to determine this and Polybase is covered 🤔

        #Dictionary to transform service type IDs into the names from Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.Services.Type
        $ServiceIdMap = @(
            @{ Name = "Engine"; Id = 1 },
            @{ Name = "Agent"; Id = 2 },
            @{ Name = "FullText"; Id = 3, 9 },
            @{ Name = "SSIS"; Id = 4 },
            @{ Name = "SSAS"; Id = 5 },
            @{ Name = "SSRS"; Id = 6 },
            @{ Name = "Browser"; Id = 7 },
            @{ Name = "PolyBase"; Id = 10, 11 },
            @{ Name = "Launchpad"; Id = 12 },
            @{ Name = "Unknown"; Id = 8 }
        )

the command uses this code to find Powerbi

$namespaces = Get-DbaCmObject -ComputerName $Computer -NameSpace root\Microsoft\SQLServer\ReportServer -Query "Select Name FROM __NAMESPACE" -EnableException -Credential $credential

The namespace of PBI is root\Microsoft\SqlServer\ReportServer\RS_PBIRS. Can you execute that and tell me what you find vs root\Microsoft\SQLServer\ReportServer