Skip to content

Commit 2f5f42c

Browse files
committed
Merge pull request #243 from Azure/clu
Update clu-getstart.md
2 parents ffc1b23 + 4d2452f commit 2f5f42c

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

clu-getstart.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,25 @@ CLUPackages require some additional files to direct generation of indexing, and
2525
| NounPrefix | ‘AzureRm’ The part of the cmdlet noun to remove in clu commands|
2626
| NounFirst | if true, the verb comes at the end of the command (e.g. azure resource get)|
2727

28-
* Tools\Azure.Bat: contains the batch file command for running cmdlets in the clu. Do not change
29-
* \<modulename\>.nuspec.template, which contains nuspec format metadata about the package – the base temaplate is in tools\clu\Microsoft.Azure.Commands.nuspec.template.
28+
* \<modulename\>.nuspec.template, which contains nuspec format metadata about the package – the base temaplate is in tools\clu\Microsoft.Azure.Commands.nuspec.template. Here are the special fields defined in this template:
3029
* %PackageId% - replace with the module name (Microsoft.Azure.Commands.\<rp-name\>)
31-
* %PackageTitle% Title of the cmdlet package in nuget
30+
* %PackageTitle% Title of the cmdlet package in nuget, replace with the title that should show up in nuget ui
3231
* %PackageVersion%, %ReferenceFiles%,%SourceFiles%,%ContentFiles% - Filled in by build tool
33-
* %PackageSummary% - Summary field in nuget ui
34-
* %PackageDescription% - Log description in package ui
32+
* %PackageSummary% - Summary field in nuget ui, replace with the summary data for your package
33+
* %PackageDescription% - Long description in package ui, replace with the long description for your package.
3534
* Almost all cmdlets packages should add a dependency to Microsoft.Azure.Commands.Profile package
3635

3736
* Ensure that project.json is set to expose a command entrypoint: `"compilationOptions": {"emitEntryPoint": true}`
3837
* Ensure that the project implements at least one console entry point
39-
```c#
38+
```c#
4039
public class EntryStub
4140
{
4241
public static void Main(string[] args)
4342
{
4443
// empty entry point
4544
}
4645
}
47-
48-
```
46+
```
4947

5048
### Package Creation and Testing
5149
2 options
@@ -67,3 +65,16 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, you should se
6765
* login interactively using device flow, this is the only option for msa account or any org-id with 2fa enforced, example: `azure account add`
6866
* login with user and password, this works on org-id w/o 2fa enforced, example: `azure account add --Username [email protected] --Password password1`
6967
* login as service principal. Example: `azure account add --ServicePrincipal --TenantId <tenant> --ApplicationId <id> --Secret <secret>`
68+
* Piping between cmdlets should work the same way that Powerhell piping works
69+
```azure subscription get --SubscriptionName | azure context set```
70+
* You can capture piped output using redirection to a file - the result will be the json serialization of the output object.
71+
```azure subscription get > subscriptions.json```
72+
* You can use file input tu aparameter using '@' notation:
73+
```azure command --param1 @file1.json```
74+
Reads input from file1.json and attempts to deserialize the .net object that is the Parameter type for ```param1```
75+
```azure command --param1 @@file1.json```
76+
Does the same thing, but treats the input from ```file1.json``` as if it come from the pipeline, so that multiple objects will result in multiple invocations of ```ProcessRecord()``` for the target cmdlet.
77+
* There are some known issues with the current approach to sessions, which can cause session variables to not be propagated when running cmdlets in a pipeline, to work around this, set the 'CmdletSessionId' environment variable to a numeric value - all cmdlets running from the shell will use that session id, and sessions will work with pipelining
78+
79+
```set CmdletSessionId=1010 ```
80+

0 commit comments

Comments
 (0)