|
Michael Blumenthal's BlumenthalIT.NET > Blogging about SharePoint > Posts > Another PowerShell sample - Did my WSP deployment succeed?
|
5/2/2008 $wspfile = "mysolution.wsp" $sollist = stsadm -o enumsolutions $xmldoc = [xml]$sollist $xmlnode = [System.Xml.XmlNode]$xmldoc #$xmlnode.SelectSingleNode("Solutions/Solution[File='$wspfile']") $resultElement = $xmlnode.SelectSingleNode("Solutions/Solution[File='$wspfile']/LastOperationResult") $result = $resultElement.get_InnerXml() "Deployment Result: " + $result if ("DeploymentSucceeded" -ne $result) {exit 1} This script will extract the deployment result string from the XML returned by stsadm for the wsp of interest. The last line is useful if you are using this in a build script. If you are using this interactively, you probably want to change the then clause to something other than an exit statement. Michael |
|
|
|
|
|
|