You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can install modules from the PowerShell Gallery by default once the [setup instructions](#Setup) have been followed. You do not need to specify the `PSGallery` with the `psrepository` type.
72
70
73
71
```puppet
74
72
package { 'Pester':
@@ -100,11 +98,46 @@ package { 'PSExcel-psc':
100
98
}
101
99
```
102
100
101
+
### The provider
102
+
103
+
The provider to use will either be `windowspowershell` or `powershellcore`. Nodes using `powershell.exe` will use `windowspowershell`, and nodes that have PowerShell core (`pwsh.exe`) will use the `powershellcore` provider with both the `psrepository` and `package` types.
104
+
103
105
## Limitations
104
106
105
107
Note that PowerShell modules can be installed side by side so installing a newer
106
108
version of a module will not remove any previous versions.
107
109
110
+
## Reference
111
+
112
+
### Types
113
+
114
+
### psrepository
115
+
116
+
Allows you to specify and configure a repository. The type expects a valid OneGet package provider source over an HTTP or HTTPS url.
117
+
118
+
#### Properties/Parameters
119
+
120
+
#### `name`
121
+
122
+
The name of the gallery to register on the computer. Must be unique. Cannot use `PSGallery` as the value for this property.
123
+
124
+
#### `source_location`
125
+
126
+
The url to the repository that you would like to register. Must be a valid HTTP or HTTPS url. This url will be used for the underlying `SourceLocation` property and will be used as the base url for `PublishLocation`, `ScriptSourceLocation`, `ScriptPublishLocation`. Cannot use the same url as the default gallery, PSGallery.
127
+
128
+
#### `installation_policy`
129
+
130
+
Manages the installation policy used for the PSRepository. Valid values are `trusted` or `untrusted`
131
+
132
+
### Providers
133
+
#### `windowspowershell`
134
+
135
+
The provider for systems that have `powershell.exe` (PowerShell versions less than 6).
136
+
137
+
#### `powershellcore`
138
+
139
+
The provider for systems that use PowerShell core via `pwsh.exe`.
0 commit comments