Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
100644 126 lines (113 sloc) 7.364 kb
7c71b9d @markcowl Changed php link
markcowl authored
1 <h1>Windows Azure PowerShell</h1>
2 <p>This repo contains a set of PowerShell commandlets for developers and administrators to deploy and manage Windows Azure applications. It includes the following:
d6faa4d @glennblock updating with latest content
glennblock authored
4 <ul>
7c71b9d @markcowl Changed php link
markcowl authored
5 <li>Cmdlets for developers to deploy both node.js and PHP applications.</li>
6 <li>Cmdlets for IT Administrators to manage their Windows Azure environments.</li>
7 </p>
8 For documentation on how to build and deploy applications to Windows Azure please see the
9 <a href="">Windows Azure Developer Center</a>.</p>
11 For comprehensive documentation on the developer cmdlets see <a href="">here</a>.
13 For comprehensive documentation on the full set of Windows Azure cmdlets see
14 <a href="">Windows Azure Management Center</a>.</p>
16 <h1>Developer Cmdlets</h1>
17 <p>Help</p>
18 <ul>
19 <li><strong>help node-dev</strong> - List node.js development cmdlets</li>
20 <li><strong>help php-dev</strong> - List PHP development cmdlets</li>
21 </ul>
22 <p>Configure machines for publishing to the cloud.</p>
23 <ul>
24 <li><strong>Get-AzurePublishSettingsFile</strong> - Downloads a Windows Azure publish profile
25 to your local computer </li>
26 <li><strong>Import-AzurePublishSettingsFile</strong> - Imports the Publish Profile to enable
27 publishing to Azure and managing hosted services</li>
28 </ul>
29 <p>Create services and roles that are preconfigured to use Node.js.</p>
30 <ul>
31 <li><strong>New-AzureServiceProject</strong> - Creates scaffolding for a new service</li>
32 <li><strong>Add-AzureNodeWebRole</strong> - Creates scaffolding for a Node.js application using web role which will be hosted in the cloud via IIS</li>
33 <li><strong>Add-AzureNodeWorkerRole</strong> - Creates scaffolding for a Node.js application using worker role which will be hosted in the cloud via node.exe</li>
34 <li><strong>Add-AzurePHPWebRole</strong> - Creates scaffolding for a PHP application using web role which will be hosted in the cloud via IIS</li>
35 <li><strong>Add-AzurePHPWorkerRole</strong> - Creates scaffolding for a PHP application which will be hosted in the cloud via php.exe</li>
37 </ul>
38 <p>Debug your applications in the local compute and storage emulators</p>
39 <ul>
40 <li><strong>Start-AzureEmulator</strong> - Starts both the compute and storage emulators
41 and executes the service</li>
42 <li><strong>Stop-AzureEmulator</strong> - Stops the compute emulator</li>
43 </ul>
44 <p>Publish your service to the cloud and configure publish settings</p>
45 <ul>
46 <li><strong>Publish-AzureServiceProject</strong> - Publish the current service to the cloud</li>
47 <li><strong>Set-AzureServiceProject</strong> - Configure service name, deployment location and storage account to use for publishing the service to the cloud</li>
48 <li><strong>Set-AzureServiceProjectRole</strong> - Configure role instance count</li>
49 </ul>
50 <p>Manage your hosted services</p>
51 <ul>
52 <li><strong>Start-AzureService</strong> - Starts a hosted service.</li>
53 <li><strong>Stop-AzureService</strong> - Stops a hosted service</li>
54 <li><strong>Remove-AzureService</strong> - Removes a hosted service</li>
55 <li><strong>Get-AzureStorageAccount</strong> - Displays storage account details for the current Azure subscription.</li>
56 <li><strong>Get-AzureStorageKey</strong> - Displays storage account keys for the specified storage account name.
57 <li><strong>Enable-AzureServiceProjectRemoteDesktop</strong> - Enables remote desktop access to a hosted service</li>
58 <li><strong>Disable-AzureServiceProjectRemoteDesktop</strong> - Disables remote desktop access to a hosted service</li>
59 </ul>
61 <h1>Getting Started</h1>
62 <h2>Download Source Code</h2>
63 <p>To get the source code of the SDK via git just type:<br/>
64 <pre>git clone<br/>cd ./azure-sdk-tools</pre>
65 </p>
66 <h2>General Install Prerequisites</h2>
67 <ul>
68 <li><a href="">Windows Azure SDK</a></li>
69 <li><a href="">Windows PowerShell 2.0</a></li>
70 <li><a href="">WiX</a> (Only needed if you want to build the setup project)</li>
71 </ul>
72 <h2>Node.js Prerequisites (developer only)</h2>
73 <ul>
74 <li><a href="">Node.js</a></li>
75 <li><a href="">IISNode</a></li>
76 </ul>
77 <h2>PHP Prerequisites (developer only)</h2>
78 <ul>
79 <li><a href="">PHP</a></li>
80 </ul>
81 </h2>
83 <h2>Configure PowerShell to automatically load commandlets</h2>
84 <ol>
85 <li>Create a folder inside your user's Documents folder and name it <strong>WindowsPowerShell</strong></li>
86 <li>Inside that folder create a file called <strong>Microsoft.PowerShell_profile.ps1</strong></li>
87 <li>Edit the file in a text editor and add the following contents<br/>
88 <pre>Import-Module<br/>PATH_TO_AZURE-SDK-TOOLS_CLONE\Package\Release\Microsoft.WindowsAzure.Management.psd1</pre></li>
89 <li>After you build the commandlets project, you can then open a PowerShell window and you should be able to use the commandlets. Please note that if you want to rebuild the project, you have close the PowerShell window, and then reopen it.</li>
90 </ol>
92 <h1>Quick start</h1>
93 <ol>
94 <li>First, create an Azure hosted service called HelloWorld by typing<br/>
95 <pre>New-AzureServiceProject HelloWorld</pre></li>
96 <li>Inside the HelloWorld folder, add a new Web Role by typing<br/>
97 <pre>Add-AzureNodeWebRole or Add-AzurePHPWebRole</pre></li>
98 <li>Test out the application in the local emulator by typing<br/>
99 <pre>Start-AzureEmulator -Launch</pre></li>
100 <li>You are now ready to publish to the cloud service. Go ahead and register
101 for a Windows Azure account and make sure you have your credentials handy.</li>
102 <li>Get your account's publish settings and save them to a file<br/>
103 <pre>Get-AzurePublishSettingsFile</pre></li>
104 <li>Now import the settings<br/>
105 <pre>Import-AzurePublishSettingsFile PATH_TO_PUBLISH_SETTINGS_FILE</pre></li>
106 <li>You are now ready to publish to the cloud. Make sure you specify a
107 unique name for your application to ensure there aren't any conflicts during
108 the publish process<br/>
109 <pre>Publish-AzureService -ServiceName UNIQUE_NAME -Launch</pre></li>
110 </ol>
112 <h1>Need Help?</h1>
113 <p>Be sure to check out the Windows Azure <a href="">
114 Developer Forums on Stack Overflow</a> if you have trouble with the provided code.</p>
116 <h1>Contribute Code or Provide Feedback</h1>
117 <p>If you would like to become an active contributor to this project please follow the instructions provided in <a href="">Windows Azure Projects Contribution Guidelines</a>.</p>
118 <p>If you encounter any bugs with the library please file an issue in the <a href="">Issues</a> section of the project.</p>
121 <h1>Learn More</h1>
122 <ul>
123 <li><a href="">Windows Azure
124 Developer Center</a></li>
125 </ul>
Something went wrong with that request. Please try again.