Skip to content

Commit c611992

Browse files
authored
Help updates for Preview 13 release (#651)
1 parent 07952ca commit c611992

8 files changed

+2175
-2165
lines changed

help/Find-PSResource.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ PS C:\> Find-PSResource -DscResourceName "SystemLocale" -Repository PSGallery
118118

119119
This examples searches for all module resources with `-DscResourceName` "SystemLocale" from the `-Repository` PSGallery. It returns all the module resources which include a DSC resource named "SystemLocale" and also lists the following information for each module resource: version, name (displayed under ModuleName) and repository. To access the rest of the properties of the parent module resource, you can access the `$_.ParentResource` of the PSIncludedResourceInfo object returned from the DSCResourceName parameter set.
120120

121+
### Example 7
122+
```powershell
123+
PS C:\> Find-PSResource -Name *
124+
```
125+
126+
This will search all PSResources from registered PSResourceRepositories.
127+
121128
## PARAMETERS
122129

123130
### -Credential
@@ -268,7 +275,7 @@ Required: False
268275
Position: Named
269276
Default value: None
270277
Accept pipeline input: False
271-
Accept wildcard characters: False
278+
Accept wildcard characters: True
272279
```
273280

274281
### -Confirm

help/Get-PSResource.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Returns resources (modules and scripts) installed on the machine via PowerShellG
1313
## SYNTAX
1414

1515
```
16-
Get-PSResource [[-Name] <String[]>] [-Version <String>] [-Path <String>] [<CommonParameters>]
16+
Get-PSResource [[-Name] <String[]>] [-Version <String>] [-Path <String>] [-Scope <ScopeType>] [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
@@ -125,6 +125,21 @@ Type: System.String
125125
Parameter Sets: NameParameterSet
126126
Aliases:
127127
128+
Required: False
129+
Position: Named
130+
Default value: None
131+
Accept pipeline input: False
132+
Accept wildcard characters: False
133+
```
134+
### -Scope
135+
Specifies the scope of the resource.
136+
137+
```yaml
138+
Type: Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
139+
Parameter Sets: (All)
140+
Aliases:
141+
Accepted values: CurrentUser, AllUsers
142+
128143
Required: False
129144
Position: Named
130145
Default value: None

help/Install-PSResource.md

Lines changed: 139 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ Installs resources (modules and scripts) from a registered repository onto the m
1414

1515
### NameParameterSet
1616
```
17-
Install-PSResource [-Name] <String[]> [-Version <String>] [-Prerelease]
17+
Install-PSResource [-Name <String[]>] [-Version <String>] [-Prerelease]
1818
[-Repository <String[]>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
1919
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### InputObjectParameterSet
2323
```
2424
Install-PSResource [-InputObject <PSResourceInfo>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
25-
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
25+
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
```
27+
28+
### RequiredResourceParameterSet
29+
```
30+
Install-PSResource [-RequiredResource <RequiredResource>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
31+
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
32+
```
33+
34+
### RequiredResourceFileParameterSet
35+
```
36+
Install-PSResource [-RequiredResourceFile <ResourceFile>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
37+
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
2638
```
2739

2840
## DESCRIPTION
@@ -59,6 +71,33 @@ PS C:\> Install-PSResource Az -Reinstall
5971
```
6072

6173
Installs the Az module and will write over any previously installed version if it is already installed.
74+
75+
### Example 4
76+
```powershell
77+
PS C:\> Install-PSResource -RequiredResourceFile myRequiredModules.psd1
78+
```
79+
80+
Installs the PSResources specified in the psd1 file.
81+
82+
### Example 5
83+
```powershell
84+
PS C:\> Install-PSResource -RequiredResource @{
85+
TestModule = @{
86+
version = "[0.0.1,1.3.0]"
87+
repository = "PSGallery"
88+
}
89+
90+
TestModulePrerelease = @{
91+
version = "[0.0.0,0.0.5]"
92+
repository = "PSGallery"
93+
prerelease = "true"
94+
}
95+
96+
TestModule99 = @{}
97+
}
98+
```
99+
100+
Installs the PSResources specified in the hashtable.
62101

63102
## PARAMETERS
64103

@@ -131,6 +170,102 @@ Default value: None
131170
Accept pipeline input: False
132171
Accept wildcard characters: False
133172
```
173+
### -RequiredResource
174+
A hashtable or json string which specifies resources to install. Does not accept wildcard characters or a null value.
175+
176+
The hashtable will take a format with the module attributes like the following example
177+
```Powershell
178+
@{
179+
TestModule = @{
180+
version = "[0.0.1,1.3.0]"
181+
repository = "PSGallery"
182+
}
183+
184+
TestModulePrerelease = @{
185+
version = "[0.0.0,0.0.5]"
186+
repository = "PSGallery"
187+
prerelease = "true"
188+
}
189+
190+
TestModule99 = @{}
191+
}
192+
```
193+
A json string will take the following example format
194+
```json
195+
{
196+
"TestModule": {
197+
"version": "[0.0.1,1.3.0)",
198+
"repository": "PSGallery"
199+
},
200+
"TestModulePrerelease": {
201+
"version": "[0.0.0,0.0.5]",
202+
"repository": "PSGallery",
203+
"prerelease": "true"
204+
},
205+
"TestModule99": {}
206+
}
207+
```
208+
209+
```yaml
210+
Type: RequiredResource
211+
Parameter Sets: RequiredResource
212+
Aliases:
213+
214+
Required: True
215+
Position: 0
216+
Default value: None
217+
Accept pipeline input: True (ByValue)
218+
Accept wildcard characters: False
219+
```
220+
221+
### -RequiredResourceFile
222+
Path to a psd1 or json which specifies resources to install. Does not accept wildcard characters or a null value.
223+
224+
The psd1 will take a hashtable format with the module attributes like the following example
225+
```Powershell
226+
@{
227+
TestModule = @{
228+
version = "[0.0.1,1.3.0]"
229+
repository = "PSGallery"
230+
}
231+
232+
TestModulePrerelease = @{
233+
version = "[0.0.0,0.0.5]"
234+
repository = "PSGallery"
235+
prerelease = "true"
236+
}
237+
238+
TestModule99 = @{}
239+
}
240+
```
241+
json files will take the following example format
242+
```json
243+
{
244+
"TestModule": {
245+
"version": "[0.0.1,1.3.0)",
246+
"repository": "PSGallery"
247+
},
248+
"TestModulePrerelease": {
249+
"version": "[0.0.0,0.0.5]",
250+
"repository": "PSGallery",
251+
"prerelease": "true"
252+
},
253+
"TestModule99": {}
254+
}
255+
```
256+
257+
```yaml
258+
Type: System.String[]
259+
Parameter Sets: RequiredResourceFileParameterSet
260+
Aliases:
261+
262+
Required: True
263+
Position: 0
264+
Default value: None
265+
Accept pipeline input: True (ByValue)
266+
Accept wildcard characters: False
267+
```
268+
134269

135270
### -Credential
136271
Optional credentials to be used when accessing a repository.
@@ -252,7 +387,7 @@ Default value: None
252387
Accept pipeline input: False
253388
Accept wildcard characters: False
254389
```
255-
390+
256391
### -PassThru
257392
Passes the resource installed to the console.
258393

@@ -322,4 +457,4 @@ None
322457

323458
## NOTES
324459

325-
## RELATED LINKS
460+
## RELATED LINKS

help/Register-PSResourceRepository.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Registers a repository for PowerShell resources.
1414

1515
### NameParameterSet (Default)
1616
```
17-
Register-PSResourceRepository [-Name] <String> [-Uri] <String> [-Trusted] [-Priority <Int32>] [-PassThru]
17+
Register-PSResourceRepository [-Name <String>] [-Uri <String>] [CredentialInfo <PSCredentialInfo>] [-Trusted] [-Priority <Int32>] [-PassThru]
1818
[-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

@@ -164,6 +164,24 @@ Default value: None
164164
Accept pipeline input: False
165165
Accept wildcard characters: False
166166
```
167+
### -CredentialInfo
168+
Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands.
169+
Takes a PSCredentialInfo Objects which takes in a vault name and secret name.
170+
This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
171+
172+
`New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
173+
174+
```yaml
175+
Type: PSCredentialInfo
176+
Parameter Sets: NameParameterSet
177+
Aliases:
178+
179+
Required: False
180+
Position: Named
181+
Default value: None
182+
Accept pipeline input: False
183+
Accept wildcard characters: False
184+
```
167185

168186
### -Confirm
169187
Prompts you for confirmation before running the cmdlet.

help/Save-PSResource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Default value: None
199199
Accept pipeline input: False
200200
Accept wildcard characters: False
201201
```
202-
202+
203203
### -PassThru
204204
Passes the resource saved to the console.
205205

help/Set-PSResourceRepository.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Sets information for a registered repository.
1414

1515
### NameParameterSet (Default)
1616
```
17-
Set-PSResourceRepository [-Name] <String> [-Uri <String>] [-Trusted] [-Priority <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
17+
Set-PSResourceRepository [-Name] <String> [-Uri <String>][CredentialInfo <PSCredentialInfo>] [-Trusted] [-Priority <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

2020
### RepositoriesParameterSet
@@ -129,6 +129,24 @@ Type: String
129129
Parameter Sets: NameParameterSet
130130
Aliases:
131131

132+
Required: False
133+
Position: Named
134+
Default value: None
135+
Accept pipeline input: False
136+
Accept wildcard characters: False
137+
```
138+
### -CredentialInfo
139+
Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands.
140+
Takes a PSCredentialInfo Objects which takes in a vault name and secret name.
141+
This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.
142+
143+
`New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`
144+
145+
```yaml
146+
Type: PSCredentialInfo
147+
Parameter Sets: NameParameterSet
148+
Aliases:
149+
132150
Required: False
133151
Position: Named
134152
Default value: None

help/Uninstall-PSResource.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Uninstalls a resource (module or script) that has been installed on the machine
1414

1515
### NameParameterSet
1616
```
17-
Uninstall-PSResource [-Name] <String[]> [-Version <String>] [-SkipDependencyCheck] [-WhatIf] [<CommonParameters>]
17+
Uninstall-PSResource [-Name] <String[]> [-Version <String>] [-Scope <ScopeType>] [-SkipDependencyCheck] [-WhatIf] [<CommonParameters>]
1818
```
1919

2020
### InputObjectParameterSet
@@ -98,6 +98,21 @@ Accept pipeline input: True
9898
Accept wildcard characters: False
9999
```
100100
101+
### -Scope
102+
Specifies the scope of the resource to uninstall.
103+
104+
```yaml
105+
Type: Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
106+
Parameter Sets: (All)
107+
Aliases:
108+
Accepted values: CurrentUser, AllUsers
109+
110+
Required: False
111+
Position: Named
112+
Default value: None
113+
Accept pipeline input: False
114+
Accept wildcard characters: False
115+
101116
### -SkipDependencyCheck
102117
Skips check to see if other resources are dependent on the resource being uninstalled.
103118

0 commit comments

Comments
 (0)