question

AyodhyaMounica-1299 avatar image
0 Votes"
AyodhyaMounica-1299 asked IanXue-MSFT commented

how to read JSON based TMSL script using power shell

how to read JSON based TMSL script using power shell, i want to read the content of JSON file with TSML script for automation of 1400 compatible SSAS cubes deployment.

Below is the one i am currently using for reading xmla for 1103 compatible ssas cubes:


$xml = [xml](Get-Content $SSASDatabaseXMLA

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered IanXue-MSFT commented

Hi,

Please try the ConvertFrom-Json cmdlet.

 Get-Content -Path $file | ConvertFrom-Json

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-json

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

i have tried this but it is not converting the entire file, the converted file is not working similar to TMSL create or replace script of a SSAS cube.

0 Votes 0 ·