It will be a great feature to execute the option "analyze" of the K2 tool "Package and Deployment" from a Powershell script without deploying the package.
Currently there is no such option. It will always try to deploy. If it does detect an issue, it will stop and not deploy. But if no issues, it will deploy.
Can a OnlyCompare or NoDeploy be added?
This will compare and return results of comparison/analysis, but then skip the deploy step and not do the actual deployment.