|
Hello. I am attempting and failing to Mock the below command. I would really appreciate some guidance. The command is pulling back a list of Azure AD Group Members, in particular, Service Principal members.
My Mock is as follows: The error that I get back is: The error makes complete sense, it is expecting some input from the pipeline but I am unsure how I mock this required input data. |
Replies: 2 comments 2 replies
|
Run the real |
|
|
Invoke-AzRestMethodreturns an object with the json in theContentproperty, so the mock needs to return the same shape:-MockWith { @{ Content = 'your valid json here' } }.