Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to automate the installation of Zend Server 6.1. I've found that for Windows the ZS CLI tools are unavailable. I've found there is a Web API with a "bootstrap" method available. http://files.zend.com/help/Zend-Server-6/content/the_bootstrapsingleserver_method.htm

I'm trying to write a powershell script to use this method.

$url = "http://localhost:10081/ZendServer/Api/bootstrapSingleServer" 
$postData = "adminPassword=abc123&acceptEula=true" 
$wc = new-object system.net.WebClient 
[byte[]]$byteArray = [System.Text.Encoding]::ASCII.GetBytes($postData) 
$webpage = $wc.UploadData($url,"POST",$byteArray); 
$response = [System.Text.Encoding]::ASCII.GetString($webpage) 

Currently I get a 404 error. I'm not certain if it's the scripts fault or some issue with Zend. http://files.zend.com/help/Zend-Server-6/zend-server.htm#request_format.htm Contains more information on formatting the HTTP request, I'm not certain I'm meeting all the requirements of the method.

share|improve this question
What PowerShell version are you on? Also, Fiddler is a nice program to troubleshoot REST trouble. –  Trondh Sep 3 '13 at 10:21
From the Zend documentation: All HTTP requests must include the following HTTP headers: ■Date - Contains the current date and time ■User-agent - The user agent string is logged by the server and used for message authenticity verification. It cannot be empty. ■Host - The HTTP host header is expected to be present and is used for message authenticity verification. ■X-Zend-Signature –  Trondh Sep 3 '13 at 10:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.