Skip to content

Help updates for Preview 13 release #651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion help/Find-PSResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ PS C:\> Find-PSResource -DscResourceName "SystemLocale" -Repository PSGallery

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.

### Example 7
```powershell
PS C:\> Find-PSResource -Name *
```

This will search all PSResources from registered PSResourceRepositories.

## PARAMETERS

### -Credential
Expand Down Expand Up @@ -268,7 +275,7 @@ Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Accept wildcard characters: True
```

### -Confirm
Expand Down
17 changes: 16 additions & 1 deletion help/Get-PSResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Returns resources (modules and scripts) installed on the machine via PowerShellG
## SYNTAX

```
Get-PSResource [[-Name] <String[]>] [-Version <String>] [-Path <String>] [<CommonParameters>]
Get-PSResource [[-Name] <String[]>] [-Version <String>] [-Path <String>] [-Scope <ScopeType>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -125,6 +125,21 @@ Type: System.String
Parameter Sets: NameParameterSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Scope
Specifies the scope of the resource.

```yaml
Type: Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
Parameter Sets: (All)
Aliases:
Accepted values: CurrentUser, AllUsers

Required: False
Position: Named
Default value: None
Expand Down
143 changes: 139 additions & 4 deletions help/Install-PSResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,27 @@ Installs resources (modules and scripts) from a registered repository onto the m

### NameParameterSet
```
Install-PSResource [-Name] <String[]> [-Version <String>] [-Prerelease]
Install-PSResource [-Name <String[]>] [-Version <String>] [-Prerelease]
[-Repository <String[]>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### InputObjectParameterSet
```
Install-PSResource [-InputObject <PSResourceInfo>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### RequiredResourceParameterSet
```
Install-PSResource [-RequiredResource <RequiredResource>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### RequiredResourceFileParameterSet
```
Install-PSResource [-RequiredResourceFile <ResourceFile>] [-Credential <PSCredential>] [-Scope <ScopeType>] [-TrustRepository]
[-Reinstall] [-Quiet] [-AcceptLicense] [-NoClobber] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -59,6 +71,33 @@ PS C:\> Install-PSResource Az -Reinstall
```

Installs the Az module and will write over any previously installed version if it is already installed.

### Example 4
```powershell
PS C:\> Install-PSResource -RequiredResourceFile myRequiredModules.psd1
```

Installs the PSResources specified in the psd1 file.

### Example 5
```powershell
PS C:\> Install-PSResource -RequiredResource @{
TestModule = @{
version = "[0.0.1,1.3.0]"
repository = "PSGallery"
}

TestModulePrerelease = @{
version = "[0.0.0,0.0.5]"
repository = "PSGallery"
prerelease = "true"
}

TestModule99 = @{}
}
```

Installs the PSResources specified in the hashtable.

## PARAMETERS

Expand Down Expand Up @@ -131,6 +170,102 @@ Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RequiredResource
A hashtable or json string which specifies resources to install. Does not accept wildcard characters or a null value.

The hashtable will take a format with the module attributes like the following example
```Powershell
@{
TestModule = @{
version = "[0.0.1,1.3.0]"
repository = "PSGallery"
}

TestModulePrerelease = @{
version = "[0.0.0,0.0.5]"
repository = "PSGallery"
prerelease = "true"
}

TestModule99 = @{}
}
```
A json string will take the following example format
```json
{
"TestModule": {
"version": "[0.0.1,1.3.0)",
"repository": "PSGallery"
},
"TestModulePrerelease": {
"version": "[0.0.0,0.0.5]",
"repository": "PSGallery",
"prerelease": "true"
},
"TestModule99": {}
}
```

```yaml
Type: RequiredResource
Parameter Sets: RequiredResource
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -RequiredResourceFile
Path to a psd1 or json which specifies resources to install. Does not accept wildcard characters or a null value.

The psd1 will take a hashtable format with the module attributes like the following example
```Powershell
@{
TestModule = @{
version = "[0.0.1,1.3.0]"
repository = "PSGallery"
}

TestModulePrerelease = @{
version = "[0.0.0,0.0.5]"
repository = "PSGallery"
prerelease = "true"
}

TestModule99 = @{}
}
```
json files will take the following example format
```json
{
"TestModule": {
"version": "[0.0.1,1.3.0)",
"repository": "PSGallery"
},
"TestModulePrerelease": {
"version": "[0.0.0,0.0.5]",
"repository": "PSGallery",
"prerelease": "true"
},
"TestModule99": {}
}
```

```yaml
Type: System.String[]
Parameter Sets: RequiredResourceFileParameterSet
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```


### -Credential
Optional credentials to be used when accessing a repository.
Expand Down Expand Up @@ -252,7 +387,7 @@ Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PassThru
Passes the resource installed to the console.

Expand Down Expand Up @@ -322,4 +457,4 @@ None

## NOTES

## RELATED LINKS
## RELATED LINKS
20 changes: 19 additions & 1 deletion help/Register-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Registers a repository for PowerShell resources.

### NameParameterSet (Default)
```
Register-PSResourceRepository [-Name] <String> [-Uri] <String> [-Trusted] [-Priority <Int32>] [-PassThru]
Register-PSResourceRepository [-Name <String>] [-Uri <String>] [CredentialInfo <PSCredentialInfo>] [-Trusted] [-Priority <Int32>] [-PassThru]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -164,6 +164,24 @@ Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -CredentialInfo
Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands.
Takes a PSCredentialInfo Objects which takes in a vault name and secret name.
This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.

`New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`

```yaml
Type: PSCredentialInfo
Parameter Sets: NameParameterSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.
Expand Down
2 changes: 1 addition & 1 deletion help/Save-PSResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PassThru
Passes the resource saved to the console.

Expand Down
20 changes: 19 additions & 1 deletion help/Set-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sets information for a registered repository.

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

### RepositoriesParameterSet
Expand Down Expand Up @@ -129,6 +129,24 @@ Type: String
Parameter Sets: NameParameterSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -CredentialInfo
Specifies where a credential is stored to access the PSResourceRepository for Find/Install/Update commands.
Takes a PSCredentialInfo Objects which takes in a vault name and secret name.
This parameter utilizes the Microsoft.PowerShell.SecretManagement module for interfacing with the stored credential.

`New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("VaultName", "SecretName")`

```yaml
Type: PSCredentialInfo
Parameter Sets: NameParameterSet
Aliases:

Required: False
Position: Named
Default value: None
Expand Down
17 changes: 16 additions & 1 deletion help/Uninstall-PSResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Uninstalls a resource (module or script) that has been installed on the machine

### NameParameterSet
```
Uninstall-PSResource [-Name] <String[]> [-Version <String>] [-SkipDependencyCheck] [-WhatIf] [<CommonParameters>]
Uninstall-PSResource [-Name] <String[]> [-Version <String>] [-Scope <ScopeType>] [-SkipDependencyCheck] [-WhatIf] [<CommonParameters>]
```

### InputObjectParameterSet
Expand Down Expand Up @@ -98,6 +98,21 @@ Accept pipeline input: True
Accept wildcard characters: False
```

### -Scope
Specifies the scope of the resource to uninstall.

```yaml
Type: Microsoft.PowerShell.PowerShellGet.UtilClasses.ScopeType
Parameter Sets: (All)
Aliases:
Accepted values: CurrentUser, AllUsers

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

### -SkipDependencyCheck
Skips check to see if other resources are dependent on the resource being uninstalled.

Expand Down
Loading