Skip to content

Commit

Permalink
Merge pull request Azure#7946 from maddieclayton/resourcestrings
Browse files Browse the repository at this point in the history
Update resource strings for Az
  • Loading branch information
cormacpayne authored Nov 29, 2018
2 parents cc45f3a + 1de1f1a commit f3458a0
Show file tree
Hide file tree
Showing 329 changed files with 626 additions and 626 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If this issue is a bug report:
- You can also install the latest version from the Releases section
- https://github.com/Azure/azure-powershell/releases
- Ensure that you repro the issue with $DebugPreference = "Continue" to receive the debug stream
- If this bug involves an exception being thrown, please run Resolve-AzureRmError to receive extended information on the error
- If this bug involves an exception being thrown, please run Resolve-AzError to receive extended information on the error
- Fill out the below template
If this issue is not a bug report, please remove the below template
Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,53 +67,53 @@ For more detailed instructions on using Azure PowerShell, please refer to the [g

### Log in to Azure

To connect to Azure, use the [`Connect-AzureRmAccount`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/connect-azurermaccount) cmdlet.
To connect to Azure, use the [`Connect-AzAccount`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/connect-Azaccount) cmdlet.

```powershell
# Interactive login - you will get a dialog box asking for your Azure credentials
Connect-AzureRmAccount
Connect-AzAccount
# Non-interactive login - you will need to use a service principal
Connect-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $PSCredential -TenantId $TenantId
Connect-AzAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $PSCredential -TenantId $TenantId
```

To log into a specific cloud (_AzureChinaCloud_, _AzureCloud_, _AzureGermanCloud_, _AzureUSGovernment_), use the `Environment` parameter:

```powershell
# Log into a specific cloud - in this case, the Azure China cloud
Connect-AzureRmAccount -Environment AzureChinaCloud
Connect-AzAccount -Environment AzureChinaCloud
```

### Getting and setting your session context

To view the context you are using in the current session, which contains the subscription and tenant, use the [`Get-AzureRmContext`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermcontext) cmdlet:
To view the context you are using in the current session, which contains the subscription and tenant, use the [`Get-AzContext`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-Azcontext) cmdlet:

```powershell
# Get the context you are currently using
Get-AzureRmContext
Get-AzContext
# List all available contexts in the current session
Get-AzureRmContext -ListAvailable
Get-AzContext -ListAvailable
```

To get the subscriptions in a tenant, use the [`Get-AzureRmSubscription`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermsubscription) cmdlet:
To get the subscriptions in a tenant, use the [`Get-AzSubscription`](https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermsubscription) cmdlet:

```powershell
# Get all of the subscriptions in your current tenant
Get-AzureRmSubscription
Get-AzSubscription
# Get all of the subscriptions in a specific tenant
Get-AzureRmSubscription -TenantId $TenantId
Get-AzSubscription -TenantId $TenantId
```

To change the subscription that you are using for your current context, use the [`Set-AzureRmContext`]() cmdlet:
To change the subscription that you are using for your current context, use the [`Set-AzContext`]() cmdlet:

```powershell
# Set the context to a specific subscription
Set-AzureRmContext -Subscription $SubscriptionName -Name "MyContext"
Set-AzContext -Subscription $SubscriptionName -Name "MyContext"
# Set the context using piping
Get-AzureRmSubscription -SubscriptionName $SubscriptionName | Set-AzureRmContext -Name "MyContext"
Get-AzSubscription -SubscriptionName $SubscriptionName | Set-AzContext -Name "MyContext"
```

### Discovering cmdlets
Expand All @@ -136,17 +136,17 @@ Get-Command -Module AzureRM.Compute -Name "*VM*"
To view the help content for a cmdlet, use the `Get-Help` cmdlet:

```powershell
# View the basic help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription
# View the basic help content for Get-AzSubscription
Get-Help -Name Get-AzSubscription
# View the examples for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Examples
# View the examples for Get-AzSubscription
Get-Help -Name Get-AzSubscription -Examples
# View the full help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Full
# View the full help content for Get-AzSubscription
Get-Help -Name Get-AzSubscription -Full
# View the help content for Get-AzureRmSubscription on https://docs.microsoft.com
Get-Help -Name Get-AzureRmSubscription -Online
# View the help content for Get-AzSubscription on https://docs.microsoft.com
Get-Help -Name Get-AzSubscription -Online
```

## Reporting Issues and Feedback
Expand Down
4 changes: 2 additions & 2 deletions documentation/breaking-changes/breaking-changes-tool-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ To add an alias to the original cmdlet name, use the `Alias` attribute for the c
If you need to, you can add multiple aliases for cmdlets that need to be renamed twice.

```cs
[Cmdlet(VerbsCommunications.Connect, "AzureRmAccount")]
[Alias("Login-AzureRmAccount", "Login-AzAccount", "Add-AzureRmAccount")]
[Cmdlet(VerbsCommunications.Connect, "AzAccount")]
[Alias("Login-AzAccount", "Add-AzAccount")]
public class ConnectAzureRmAccount : Cmdlet
{
protected override void BeginProcessing()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Specified by the `OutputType` attribute, this piece of metadata lets the user kn

In most cases, cmdlets will be returning an object corresponding to a resource(s) that a user is performing an action on. Rather than returning the .NET SDK type for that resource (exposing .NET SDK types in PowerShell cmdlets is _strongly_ discouraged), we suggest creating a new class that wraps this .NET SDK type, allowing for breaking changes in the underlying type while avoiding breaking changes in the PowerShell type.

For example, the `Get-AzureRmVM` cmdlet uses the .NET SDK to retrieve objects of the `VirtualMachine` type, but a new class, `PSVirtualMachine`, was created to wrap the type from the .NET SDK, and is returned by the cmdlet. If, in the future, the `VirtualMachine` type in the .NET SDK has a property removed, that property can still be maintained in PowerShell by adding it to the `PSVirtualMachine` and recreating the value, thus avoiding a breaking change in the cmdlet(s).
For example, the `Get-AzVM` cmdlet uses the .NET SDK to retrieve objects of the `VirtualMachine` type, but a new class, `PSVirtualMachine`, was created to wrap the type from the .NET SDK, and is returned by the cmdlet. If, in the future, the `VirtualMachine` type in the .NET SDK has a property removed, that property can still be maintained in PowerShell by adding it to the `PSVirtualMachine` and recreating the value, thus avoiding a breaking change in the cmdlet(s).

#### Returning No Output

Expand Down Expand Up @@ -235,10 +235,10 @@ Below are the two main piping scenarios that should be applied in the cmdlets wi

### ResourceId

In this scenario, the user is able to pipe the result of a generic resources cmdlet into a cmdlet that accepts `ResourceId`. The below example shows how a user can use the generic resources cmdlet `Find-AzureRmResource` to get all resources of type `Foo` and remove them:
In this scenario, the user is able to pipe the result of a generic resources cmdlet into a cmdlet that accepts `ResourceId`. The below example shows how a user can use the generic resources cmdlet `Find-AzResource` to get all resources of type `Foo` and remove them:

```powershell
Find-AzureRmResource -ResourceType Microsoft.Foo/foo | Remove-AzureRmFoo
Find-AzResource -ResourceType Microsoft.Foo/foo | Remove-AzFoo
```

For more information on enabling the `ResourceId` piping scenario and more examples, please see the ["Using the `ResourceId` parameter"](./piping-in-powershell.md#using-the-resourceid-parameter) section of the _Piping in PowerShell_ document.
Expand All @@ -248,7 +248,7 @@ For more information on enabling the `ResourceId` piping scenario and more examp
In this scenario, the user is able to pipe the result of a cmdlet that returns a resource into a cmdlet that accepts that resource as an `InputObject`. The below example shows how a user can get a `Foo` object from one cmdlet and pipe it to a cmdlet that removes it:

```powershell
Get-AzureRmFoo -Name "FooName" -ResourceGroupName "RG" | Remove-AzureRmFoo
Get-AzFoo -Name "FooName" -ResourceGroupName "RG" | Remove-AzFoo
```

For more information on enabling the `InputObject` piping scenario and more examples, please see the ["Using the `InputObject` parameter"](./piping-in-powershell.md#using-the-inputobject-parameter) section of the _Piping in PowerShell_ document.
Expand All @@ -269,7 +269,7 @@ Once you add the parameter, please manually test that the job is created and suc
To ensure that `-AsJob` is not broken in future changes, please add a test for this parameter. To update tests to include this parameter, use the following pattern:

````powershell
$job = Get-AzureRmSubscription
$job = Get-AzSubscription
$job | Wait-Job
$subcriptions = $job | Receive-Job
````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Once you add the parameter, please manually test that the job is created and suc
To ensure that `-AsJob` is not broken in future changes, please add a test for this parameter. To update tests to include this parameter, use the following pattern:

````powershell
$job = Get-AzureRmSubscription
$job = Get-AzSubscription
$job | Wait-Job
$subcriptions = $job | Receive-Job
````
Expand Down
8 changes: 4 additions & 4 deletions documentation/development-docs/generate-format.ps1xml-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Our team trends to make the cmdlets output more convenient and consistent across

# How table view output works by default.

As an example let's consider [Get-AzureRmSubscription](https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs) cmdlet.
As an example let's consider [Get-AzSubscription](https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs) cmdlet.

The cmdlet class specifies the ```PSAzureSubscription``` class as an output type with the **OutputType attribute**:

Expand Down Expand Up @@ -86,7 +86,7 @@ namespace Microsoft.Azure.Commands.Profile.Models
PowerShell uses these properties for the cmdlet table formated output:

```PowerShell
PS C:\> Get-AzureRmSubscription | Format-Table
PS C:\> Get-AzSubscription | Format-Table

Id Name State SubscriptionId TenantId CurrentStorageAcc
ountName
Expand Down Expand Up @@ -340,7 +340,7 @@ d----- 4/25/2018 4:35 PM Storage
PS E:\git\azure-powershell> Import-Module E:\git\azure-powershell\tools\RepoTasks\RepoTasks.Cmdlets\bin\Debug\RepoTasks.Cmdlets.dll
```
3. Run the **New-FormatPs1Xml** cmdlet.
* The cmdlet has one required argument **-ModulePath** - a path to a module manifest (psd1) file. Since in our example we are using the Get-AzureRmSubscription cmdlet from the AzureRM.Profile module we need to specify path to the AzureRm.Profile module manifest which is
* The cmdlet has one required argument **-ModulePath** - a path to a module manifest (psd1) file. Since in our example we are using the Get-AzSubscription cmdlet from the AzureRM.Profile module we need to specify path to the AzureRm.Profile module manifest which is
```
E:\git\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1
```
Expand Down Expand Up @@ -394,7 +394,7 @@ PS C:\> Import-Module E:\git\azure-powershell\src\Package\Debug\ResourceManager\

4. Try your cmdlet out. In our example it is Get-AuzreRmSubsription:
```Powershell
PS C:\> Get-AzureRmSubscription
PS C:\> Get-AzSubscription

Subscription Id Subscription Name State Tenant Id
--------------- ----------------- ----- ---------
Expand Down
Loading

0 comments on commit f3458a0

Please sign in to comment.