Open davesbrown opened 3 years ago
The -Workspace
parameter accepts an object of type Microsoft.PowerBI.Common.Api.Workspaces.Workspace
, which you can retrieve using Get-PowerBIWorkspace
. When using the -Workspace
parameter, the Get-PowerBIReport
cmdlet will use the Id from the Workspace object to filter for the report.
What's the difference? I can use -WorkspaceId with the guid no problem, but if I use -Workspace with a named workspace like 'MyWorkspace' then I get an error:
Get-PowerBIReport : Cannot bind parameter 'Workspace'. Cannot convert the "MyWorkspace" value of type "System.String" to type "Microsoft.PowerBI.Common.Api.Workspaces.Workspace".
It obviously doesn't like the datatype as string, do I strongly type it as 'Workspace' ?
TIA