Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

Windows Azure Powershell 0.6.10 is out and check out $DebugPreference feature to get Request and Response on PS console

Windows Azure Powershell 0.6.10 is out and check out $DebugPreference feature to get Request and Response on PS console

Rate This
  • Comments 1

Windows Azure Powershell 0.6.10 is out.Check out and you can get 0.6.10 installer from the direct link here. There are several new features are added to this release but the best I like is to setup debugging mode to see request and response data on console. A list of changes you can see here.

To enable debugging you just need to set $DebugPreference as below:

$DebugPreference ='Continue'
To disable debugging you just need to set $DebugPreference as below:
$DebugPreference ='SilentlyContinue'
Example:
PS> $DebugPreference ='Continue'
PS>Get-AzureService –ServiceName $tempServiceName
 
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.core.windows.net/****************************************/services/hostedservices/avkashwin8

Headers:
x-ms-version : 2012-03-01
User-Agent : Windows Azure Powershell/v.0.6.10

Body:


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
x-ms-request-id : 4ede3883c5e74513af7af675dbe6****
Content-Length : 623
Cache-Control : no-cache
Content-Type : application/xml; charset=utf-8
Date : Wed, 13 Feb 2013 07:38:19 GMT
Server : 33.0.6198.5 (rd_rdfe_stable.130128-1959) Microsoft-HTTPAPI/2.0

Body:
<HostedService xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<Url>https://management.core.windows.net/*************************/services/hostedservices/avkashwin8</Url>
<ServiceName>avkashwin8</ServiceName>
<HostedServiceProperties>
<Description>Implicitly created hosted service2013-01-17 19:00</Description>
<Location>West US</Location>
<Label>*********</Label>
<Status>Created</Status>
<DateCreated>2013-01-17T19:00:39Z</DateCreated>
<DateLastModified>2013-01-21T18:38:35Z</DateLastModified>
<ExtendedProperties />
</HostedServiceProperties>
</HostedService>

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.core.windows.net/********************************/operations/4ede3883c5e74513af7af675dbe6****

Headers:
x-ms-version : 2012-03-01
User-Agent : Windows Azure Powershell/v.0.6.10

Body:


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
x-ms-request-id : c15bbbcdd709451ca3699ec8e43957dc
Content-Length : 232
Cache-Control : no-cache
Content-Type : application/xml; charset=utf-8
Date : Wed, 13 Feb 2013 07:38:20 GMT
Server : 33.0.6198.5 (rd_rdfe_stable.130128-1959) Microsoft-HTTPAPI/2.0

Body:
<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ID>4ede3883-c5e7-4513-af7a-f675dbe6caf5</ID>
<Status>Succeeded</Status>
<HttpStatusCode>200</HttpStatusCode>
</Operation>

Label : avkashwin8
Description : Implicitly created hosted service2013-01-17 19:00
AffinityGroup :
Location : West US
Status : Created
DateModified : 2013-01-21T18:38:35Z
DateCreated : 2013-01-17T19:00:39Z
Url : https://management.core.windows.net/*************************/services/hostedservices/avkashwin8
ServiceName : avkashwin8
OperationDescription : Get-AzureService
OperationId : 4ede3883-c5e7-4513-af7a-f675dbe6caf5
OperationStatus : Succeeded
 
PS>help azure
 PS>help php-dev
PS>help node-dev
PS>help python-dev
Leave a Comment
  • Please add 6 and 8 and type the answer here:
  • Post
  • With PowerShell 3.0 the way you redirect everything to text including the debug output is to use the "*>" redirection.

    Example:

    ((Get-AzureService) | select -first 1 ) *> $env:TEMP\out.txt ; ii $env:TEMP\out.txt

    about_Redirection

    technet.microsoft.com/.../hh847746.aspx

Page 1 of 1 (1 items)