Open gnuhow opened 2 years ago
Looks like the "options" parameter is missing in my local code, but no on this Github. I think the file was not pushed to PSGallery in 8.5.0 somehow.
PS C:\Program Files\WindowsPowerShell\Modules\ComputerManagementDsc\8.5.0\DSCResources\DSC_Computer> gc .\DSC_Computer.psm1
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '', Scope = 'Function')]
param
(
)
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
# Import the ComputerManagementDsc Common Modules
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
-ChildPath 'ComputerManagementDsc.Common.psm1'))
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
# Import Localization Strings
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
$FailToRenameAfterJoinDomainErrorId = 'FailToRenameAfterJoinDomain,Microsoft.PowerShell.Commands.AddComputerCommand'
<#
.SYNOPSIS
Gets the current state of the computer.
.PARAMETER Name
The desired computer name.
.PARAMETER DomainName
The name of the domain to join.
.PARAMETER JoinOU
The distinguished name of the organizational unit that the computer
account will be created in.
.PARAMETER Credential
Credential to be used to join a domain.
.PARAMETER UnjoinCredential
Credential to be used to leave a domain.
.PARAMETER WorkGroupName
The name of the workgroup.
.PARAMETER Description
The value assigned here will be set as the local computer description.
.PARAMETER Server
The Active Directory Domain Controller to use to join the domain.
#>
You have to use the latest preview version on the Gallery. The wiki always reflect the latest release, preview or full release.
On the wiki Home it shows what the latest release is, in this case ComputerManagementDsc v8.6.0-preview0002.
Problem description
The Wiki currently lists and "option" Field that is available, but it is not available in the actual module on PSGallery.
Wiki:
Computer
Parameters
Parameter | Attribute | DataType | Description | Allowed Values -- | -- | -- | -- | -- Name | Key | String | The desired computer name. | DomainName | Write | String | The name of the domain to join. | JoinOU | Write | String | The distinguished name of the organizational unit that the computer account will be created in. | Credential | Write | PSCredential | Credential to be used to join a domain. | UnjoinCredential | Write | PSCredential | Credential to be used to leave a domain. | WorkGroupName | Write | String | The name of the workgroup. | Description | Write | String | The value assigned here will be set as the local computer description. | Server | Write | String | The Active Directory Domain Controller to use to join the domain | Options | Write | StringArray[] | Specifies advanced options for the Add-Computer join operation | AccountCreate, Win9XUpgrade, UnsecuredJoin, PasswordPass, JoinWithNewName, JoinReadOnly, InstallInvokeVerbose logs
DSC configuration
Suggested solution
Please commit and push the "options" parameter to Computer.
Operating system the target node is running
PowerShell version and build the target node is running
ComputerManagementDsc version