mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-19 00:37:22 +00:00
Fixes
This commit is contained in:
parent
b223ed8332
commit
d59e0420a8
@ -23,9 +23,7 @@ Schedule advanced query.
|
||||
|
||||
## Use case
|
||||
|
||||
You need to schedule an advanced query and use the result for follow up actions and processing.
|
||||
|
||||
You can use [Microsoft Flow](https://flow.microsoft.com/) (or Logic Apps) for it!
|
||||
If you need to schedule an advanced query and use the results for follow up actions and processing, you can use [Microsoft Flow](https://flow.microsoft.com/) (or Logic Apps) for it!
|
||||
|
||||
## Define a flow to run query and parse results
|
||||
|
||||
@ -74,6 +72,8 @@ You will find below a very basic flow example:
|
||||
|
||||

|
||||
|
||||
## Full flow definition
|
||||
|
||||
You can find below the full definition
|
||||
|
||||

|
||||
|
@ -89,15 +89,19 @@ If you want to run complex queries (or multilines queries), save your query in a
|
||||
|
||||
## Work with query results
|
||||
|
||||
To work with the results you can, for instance, do the below
|
||||
You can now use the query results.
|
||||
|
||||
To output the results of the query in CSV format in file file1.csv do the below:
|
||||
|
||||
```
|
||||
$results | ConvertTo-Csv -NoTypeInformation | Set-Content file1.csv
|
||||
$results | ConvertTo-Json | Set-Content "file1.json"
|
||||
```
|
||||
|
||||
- Line 1 outputs the results of the query in CSV format in file file1.csv
|
||||
- Line 2 outputs the results of the query in JSON format in file file1.json
|
||||
To output the results of the query in JSON format in file file1.json do the below:
|
||||
|
||||
```
|
||||
$results | ConvertTo-Json | Set-Content "file1.json"
|
||||
```
|
||||
|
||||
|
||||
## Related topic
|
||||
|
Loading…
x
Reference in New Issue
Block a user