WID Extractions with Logstash

Hello!

I need to extract some data from a Windows internal Database from WSUS. I already tried using the JDBC and Exec input plugins, buy no one worked using this string connection \.\pipe\MICROSOFT##WID\tsql\query.

This is my exec config file, but it's not retrieving the query results. If i use it directly from shell, it works.

input {
	exec {
    command => "sqlcmd -S \\.\pipe\MICROSOFT##WID\tsql\query
	SELECT [ComputerTargetId],[ParentServerId],[Name],[IPAddress],[LastSyncResult],[LastSyncTime],[LastReportedStatusTime],[LastReportedInventoryTime],[ClientVersion],[OSArchitecture],[Make],[Model],[BiosName],[BiosVersion],[BiosReleaseDate],[OSMajorVersion],[OSMinorVersion],[OSBuildNumber],[OSServicePackMajorNumber],[OSDefaultUILanguage]FROM [SUSDB].[PUBLIC_VIEWS].[vComputerTarget]
	go"
    interval => 30
  }
}

Thanks!