The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I want to read the contents of a text file to set deployment artefacts for my Power BI Service deployment pipeline using the Power BI Rest API.
My Reports.txt file looks like:
reportOne.pbix
reportTwo.rdl
Using Get-Content, how can I filter the content of the text file to just the .pbix line?
I tried the below but it returns both lines:
Solved! Go to Solution.
Figured this out:
$pbix_reports = Get-Content "C:\Temp\Reports.txt" | Select-String -Pattern ".pbix" -AllMatches
Figured this out:
$pbix_reports = Get-Content "C:\Temp\Reports.txt" | Select-String -Pattern ".pbix" -AllMatches