- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to install DSC resources using PowerShell?
To install the DSC resource using PowerShell, we can use the same command to install modules in PowerShell (Install-Module).
The Find-DscResource command would get all the available DSC resources. To search the specific DSC resource, you can provide the -Name parameter in the Find-DscReource command. For example, we need to search for the FilesAndFolder DSC resource
Find-DSCResource -Name filesandfolders
Output
Name Version ModuleName Repository ---- ------- ---------- ---------- FilesAndFolders 0.3.212 CommonTasks PSGallery
To install this module, we can pipeline the Install-Module command.
Find-DSCResource -Name filesandfolders | Install-Module -Force -Verbose
Once the module is installed, we can use the Get-DSCResource command to check if the module is installed properly.
Get-DscResource -Name FilesAndFolders
Output
To check the properties of the installed module, we can use the below command.
Get-DscResource -Name FilesAndFolders | Select -ExpandProperty Properties
Output
Name PropertyType IsMandatory Values ---- ------------ ----------- ------ DependsOn [String[]] False {} PsDscRunAsCredential [PSCredential] False {} Items [Hashtable[]] True {}
- Related Articles
- How to install the MSI package using PowerShell DSC?
- Azure DSC node configuration using PowerShell
- How to install the Nuget Package using PowerShell?
- How to install the MSI file using PowerShell?
- How to resolve - Relative path is not supported in PowerShell DSC?
- How to install PowerShell Module?
- How to Install the Azure CLI on Windows using PowerShell?
- How to install MSI file using batch file in PowerShell?
- How to install a certificate to the certificate store using PowerShell?
- How to install MSI file to the custom directory using PowerShell?
- How to Install Azure PowerShell Cmdlets?
- How to get the azure resources from the resource group using PowerShell?
- How to Install Windows Features with PowerShell?
- How to install the latest PowerShell module version?
- How to install the PowerShell Active Directory module?

Advertisements