How to check for success of Import-D365Bacpac #723
-
Hi, from the output section in the docs of the command Import-D365Bacpac, I couldn't find no standard response object. For other commands (like for instance Invoke-D365AzCopyTransfer) I have already successfully used their response objects for branching based on their values. But when I tried
I got the "failed" msg indicating the response obj is null even though the sqlpackage output indicates success. Output:
I am puzzling what is the shortest way to check in code for the success of that command. Executing this command is so timetaking I thought it's better to ask. Is there some parameter I overlooked in order to get a response obj? Or do I have to inspect the log file? Thanks in advance, Jakob |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The command originally was developed with human invocation and interaction in mind. So if the cmdlet doesn't fail - like hardcore throwing exceptions around and stuff like that - the import was successful 😉 |
Beta Was this translation helpful? Give feedback.
-
Ok I will take your answer as 'there will never be a response object for Import-D365BacPac'. I guess I will proceed by checking if I catch an exception from that command, having set the -EnableException parameter to true Thanks |
Beta Was this translation helpful? Give feedback.
The command originally was developed with human invocation and interaction in mind.
So if the cmdlet doesn't fail - like hardcore throwing exceptions around and stuff like that - the import was successful 😉