-
Notifications
You must be signed in to change notification settings - Fork 107
Installing the module
When working on Windows Server 2012R2 or any server without PowerShell 5.0. It's recommended to first upgrade PowerShell to v5.1.
If PowerShell is not regularly used or not connected to the internet like in many secure environments or servers you may need to switch PowerShell from using TLS 1.0 to TLS 1.2, so it can download the modules. More information is published by the PowerShell Product Group in this TLS1.2 and PowerShell support article. Line 16 shows how to install a new version of Powershell Get.
To mitigate this chance we have released a minor update to PowerShellGet which will allow you to continue to interact with the PowerShell Gallery.
To install SharePointDsc, run the following commands:
- Open PowerShell as Administrator
- Run
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Run
Register-PSRepository -Default
- Run
Install-Module -Name SharePointDSC
- Run
Install-Module ReverseDsc
(only if you want to export configurations)
If you followed steps above and received no errors you now have SharePoint DSC installed on your Machine and you can skip the next 2 steps.
- If your server is not connected to the internet you should have received an error in the previous steps.
- Run
Save-Module -Name SharePointDSC,ReverseDsc -Path C:\Temp
on the machine connected to the Internet. This will download the modules to the specified folder. - Alternatively you can also install the module on the local machine, but this is not necessary:
Install-Module -Name SharePointDSC,ReverseDsc
on the machine connected to the Internet. Type[A]
for All. - Manually copy the SharePointDsc and ReverseDsc folders from
C:\Temp
(from step 2) orC:\Program Files\WindowsPowerShell\Modules
(from step 3) folders. You can optionally zip the folders. - Copy / Unzip the folders to the target machine into the Modules folder at
C:\Program Files\WindowsPowerShell
You can use the Verb Get-InstalledModule
to see All modules you have installed.
You can also use this block specifically.
Get-InstalledModule SharePointDSC ,ReverseDSC
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations