Skip to content

Commit 4575ee6

Browse files
Merge pull request #2 from sergey-shandar/sergey-compute-class
Sergey compute class
2 parents d32bee0 + e89a548 commit 4575ee6

File tree

5 files changed

+180
-8
lines changed

5 files changed

+180
-8
lines changed

experiments/Compute.Experiments/AzureRM.Compute.Experiments.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $vmCredential = New-Object System.Management.Automation.PSCredential ($vmCompute
1717

1818
# $vm = New-AzVm
1919
# $vm = New-AzVm -Credential $vmCredential
20-
$vm = New-AzVm -Credential $vmCredential
20+
$vm = New-AzVm -Name MyVM -Credential $vmCredential
2121

2222
$vm
2323

experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = ".\AzureRM.Compute.Experiments.psm1"
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.0.1'
15+
ModuleVersion = '1.0.4'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

experiments/Compute.Experiments/AzureRM.Compute.Experiments.psm1

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
<#
2+
.ExternalHelp AzureRM.Compute.Experiments-help.xml
3+
#>
14
function New-AzVm {
25
[CmdletBinding()]
36
param (
7+
[Parameter(Mandatory=$true)][string] $Name = "VM",
48
[Parameter()][PSCredential] $Credential,
5-
[Parameter()][string] $Name = "VM",
69
[Parameter()][string] $ImageName = "Win2012R2Datacenter",
710
[Parameter()][string] $ResourceGroupName,
8-
[Parameter()][string] $Location = "eastus",
11+
[Parameter()][string] $Location,
912
[Parameter()][string] $VirtualNetworkName,
1013
[Parameter()][string] $PublicIpAddressName,
11-
[Parameter()][string] $SecurityGroupName,
12-
[Parameter()][string] $NetworkInterfaceName
14+
[Parameter()][string] $SecurityGroupName
15+
# [Parameter()][string] $NetworkInterfaceName
1316
)
1417

1518
PROCESS {
@@ -18,7 +21,7 @@ function New-AzVm {
1821
$piai = [PublicIpAddress]::new($PublicIpAddressName);
1922
$sgi = [SecurityGroup]::new($SecurityGroupName);
2023
$nii = [NetworkInterface]::new(
21-
$NetworkInterfaceName,
24+
$null, # $NetworkInterfaceName,
2225
$vni,
2326
$piai,
2427
$sgi);
@@ -39,7 +42,7 @@ function New-AzVm {
3942

4043
New-PsObject @{
4144
ResourceId = $resourceGroup.ResourceId;
42-
Response = $vmResponse
45+
Response = $vmResponse;
4346
}
4447
}
4548
}
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
external help file: AzureRM.Compute.Experiments-help.xml
3+
Module Name: AzureRM.Compute.Experiments
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# New-AzVm
9+
10+
## SYNOPSIS
11+
{{Fill in the Synopsis}}
12+
13+
## SYNTAX
14+
15+
```
16+
New-AzVm [-Name] <String> [[-Credential] <PSCredential>] [[-ImageName] <String>]
17+
[[-ResourceGroupName] <String>] [[-Location] <String>] [[-VirtualNetworkName] <String>]
18+
[[-PublicIpAddressName] <String>] [[-SecurityGroupName] <String>]
19+
```
20+
21+
## DESCRIPTION
22+
{{Fill in the Description}}
23+
24+
## EXAMPLES
25+
26+
### Example 1
27+
```
28+
PS C:\> {{ Add example code here }}
29+
```
30+
31+
{{ Add example description here }}
32+
33+
## PARAMETERS
34+
35+
### -Credential
36+
{{Fill Credential Description}}
37+
38+
```yaml
39+
Type: PSCredential
40+
Parameter Sets: (All)
41+
Aliases:
42+
43+
Required: False
44+
Position: 1
45+
Default value: None
46+
Accept pipeline input: False
47+
Accept wildcard characters: False
48+
```
49+
50+
### -ImageName
51+
{{Fill ImageName Description}}
52+
53+
```yaml
54+
Type: String
55+
Parameter Sets: (All)
56+
Aliases:
57+
58+
Required: False
59+
Position: 2
60+
Default value: None
61+
Accept pipeline input: False
62+
Accept wildcard characters: False
63+
```
64+
65+
### -Location
66+
{{Fill Location Description}}
67+
68+
```yaml
69+
Type: String
70+
Parameter Sets: (All)
71+
Aliases:
72+
73+
Required: False
74+
Position: 4
75+
Default value: None
76+
Accept pipeline input: False
77+
Accept wildcard characters: False
78+
```
79+
80+
### -Name
81+
{{Fill Name Description}}
82+
83+
```yaml
84+
Type: String
85+
Parameter Sets: (All)
86+
Aliases:
87+
88+
Required: True
89+
Position: 0
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### -PublicIpAddressName
96+
{{Fill PublicIpAddressName Description}}
97+
98+
```yaml
99+
Type: String
100+
Parameter Sets: (All)
101+
Aliases:
102+
103+
Required: False
104+
Position: 6
105+
Default value: None
106+
Accept pipeline input: False
107+
Accept wildcard characters: False
108+
```
109+
110+
### -ResourceGroupName
111+
{{Fill ResourceGroupName Description}}
112+
113+
```yaml
114+
Type: String
115+
Parameter Sets: (All)
116+
Aliases:
117+
118+
Required: False
119+
Position: 3
120+
Default value: None
121+
Accept pipeline input: False
122+
Accept wildcard characters: False
123+
```
124+
125+
### -SecurityGroupName
126+
{{Fill SecurityGroupName Description}}
127+
128+
```yaml
129+
Type: String
130+
Parameter Sets: (All)
131+
Aliases:
132+
133+
Required: False
134+
Position: 7
135+
Default value: None
136+
Accept pipeline input: False
137+
Accept wildcard characters: False
138+
```
139+
140+
### -VirtualNetworkName
141+
{{Fill VirtualNetworkName Description}}
142+
143+
```yaml
144+
Type: String
145+
Parameter Sets: (All)
146+
Aliases:
147+
148+
Required: False
149+
Position: 5
150+
Default value: None
151+
Accept pipeline input: False
152+
Accept wildcard characters: False
153+
```
154+
155+
## INPUTS
156+
157+
### None
158+
159+
160+
## OUTPUTS
161+
162+
### System.Object
163+
164+
## NOTES
165+
166+
## RELATED LINKS
167+

experiments/Compute.Experiments/publish-dev.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
$out = "..\build\AzureRM.Compute.Experiments\"
22
$repository = "sergey"
33
$dep = @("AzureRM.Resources", "AzureRM.Network", "AzureRM.Compute")
4+
Remove-Item $out -Recurse
45
mkdir $out
56
Copy-Item .\AzureRM.Compute.Experiments.psd1 $out
67
Copy-Item .\AzureRM.Compute.Experiments.psm1 $out
8+
New-ExternalHelp -Path .\docs\ -OutputPath $out
79
foreach ($d in $dep) {
810
Install-Module $d -Repository $repository
911
}

0 commit comments

Comments
 (0)