I'm trying to execute some scripts that utilizes DSC and it seems to be failing pretty hard. From all the documentation I've found, I believe I'm following the right steps and installing it, but clearly I've missed something. This is being executed in the Powershell ISE on Windows.
PS C:\windows\system32> Get-DscConfigurationStatus
Get-DscConfigurationStatus : Invalid namespace
At line:1 char:1
+ Get-DscConfigurationStatus
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfigurationSt
atus], CimException
+ FullyQualifiedErrorId : HRESULT 0x8004100e,Get-DscConfigurationStatus
I have both Powershell ISE and Powershell 7 (both are installed), and I understand DSC is different between Powershell versions as indicated here: https://learn.microsoft.com/en-us/powershell/dsc/overview?view=dsc-2.0
I was attempting to follow this but something is really messed up with my DSC https://learn.microsoft.com/en-us/powershell/dsc/getting-started/wingettingstarted?view=dsc-1.1
Install-Module 'PSDscResources' -Verbose
This installs fine and I have version 2.12.0.0 installed.
PS C:\windows\system32> Get-InstalledModule PSDscResources
Version Name Repository Description
------- ---- ---------- -----------
2.12.0.0 PSDscResources PSGallery This module contains the standard DSC resources.
I feel like this mismatch of versions is very correlated, but I'm pretty confused on what I should be using.
PS C:\windows\system32> Install-Module -Name PSDesiredStateConfiguration
WARNING: Version '1.1' of module 'PSDesiredStateConfiguration' is already installed at 'C:\windows\system32\WindowsPowerShell\v1.0\Modules\P
SDesiredStateConfiguration'. To install version '2.0.7', run Install-Module and add the -Force parameter, this command will install version
'2.0.7' side-by-side with version '1.1'.
What am I setting up incorrectly here?