Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Computer names longer than 15 are blocked, but the limit is 63

未關閉
#379 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
powershell

研究方向

從 DSC_Computer 資源開始,並使用超過 15 個字元的名稱重現 RenamePC 設定。檢視現有 Name 屬性如何驗證並套用電腦名稱;完成標準是由個別屬性支援最長 63 個字元的名稱,同時不變更現有行為。

由索引模型根據 Issue 內容生成。

描述

discussion enhancement help wanted
Details of the scenario you tried and the problem that is occurring

Renaming a PC with a name that is more than 15 characters will fail. However if you rename the same PC through right-click Start, System, "Rename this PC" you can use up to 63 characters (I understand the 15 character limit comes from NetBIOS).

Verbose logs showing the problem

PowerShell DSC resource DSC_Computer failed to execute Test-TargetResource functionality with error message: Cannot validate argument on parameter 'Name'. The character length of the 16 argument is too long. Shorten the character length of the argument so it is fewer
than or equal to "15" characters, and then try the command again.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

Suggested solution to the issue

To avoid breaking existing behaviour, add a new property that supports the 63 character limit.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Computer RenamePC
{
	Name = "1234567890123456"
}
The operating system the target node is running

OsName : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.17763.2183
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.2183
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

Latest as installed by PS (8.5.0)

主要語言
PowerShell
星號
338
分支
80
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

dsccommunity/ComputerManagementDsc 的其他 Issue

查看 dsccommunity/ComputerManagementDsc 的全部 Issue

相似的 Issue

更多 Operating Systems Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。