Skip to content

Commit 770e689

Browse files
authored
Merge pull request #194 from jpogran/powershell-readme-updates
Update PowerShell install instructions
2 parents 07cd40c + 3a2e08b commit 770e689

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,47 @@ A CLI to facilitate easy, unified development workflows for Puppet modules. `pdk
55

66
## Installation
77

8-
Download and install the newest package matching your platform from [here](https://drive.google.com/drive/folders/0Bz0tCHSb1u41alR4MmZfRHBTV1k?usp=sharing).
8+
Download and install the newest package matching your platform from [here](https://drive.google.com/drive/folders/0Bz0tCHSb1u41alR4MmZfRHBTV1k?usp=sharing). If you are using Windows, please remember to close any open PowerShell windows.
99

10-
On Windows you should run PDK from PowerShell and `pdk` will be in your path after installation. Also set your script execution policy to [RemoteSigned](https://technet.microsoft.com/en-us/library/ee176961.aspx), to allow the PowerShell integration to work.
10+
### Windows
11+
12+
On Windows you should run PDK from PowerShell and `pdk` will be available in your PowerShell prompt after installation.
13+
14+
If the `pdk` command does not appear, check that the `PuppetDevelopmentKit` PowerShell module is loaded in your PowerShell prompt:
15+
16+
```
17+
Get-Module -Name PuppetDevelopmentKit
18+
```
19+
20+
If no output is returned, load the `PuppetDevelopmentKit` module by running the following command:
21+
22+
```
23+
Import-Module -Name PuppetDevelopmentKit
24+
```
25+
26+
> Note: On PowerShell version 3 and above, PowerShell modules are loaded automatically so this step shouldn't be necessary.
27+
28+
You should set your script execution policy to at least [RemoteSigned](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy), if it's not already, to allow the PowerShell integration to work.
29+
30+
You can check your ExecutionPolicy by running the following command from a PowerShell prompt:
31+
32+
```
33+
Get-ExecutionPolicy
34+
```
35+
36+
To set the `ExecutionPolicy`, run the following command:
37+
38+
```
39+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
40+
```
41+
42+
If you can't change the system `ExecutionPolicy`, you can change the `ExecutionPolicy` for just the current session by using the `Scope` paramter:
43+
44+
```
45+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
46+
```
47+
48+
For more information about PowerShell `ExecutionPolicies` or how to change them, see [about_Execution_Policies](http://go.microsoft.com/fwlink/?LinkID=135170).
1149

1250
## Usage
1351

0 commit comments

Comments
 (0)