Forum Discussion
NJKWork
Jun 15, 2021Copper Contributor
Join computer to domain with PowerShell 7
PowerShell 7 does not support the Add-Computer cmdlet and does not support WMI. I am assuming one needs to use CIM now to add a computer to a domain with PowerShell. Is that correct, or is there a new cmdlet we should be using that replaced Add-Computer? If CIM is required, does any have syntax used for doing this that works in both WPS 5.1 and PS 7.x? Would it involve using Invoke-CimMethod?
Thanks
NK
- Sometimes the simple things are over-looked:
Import-Module Microsoft.PowerShell.Management -UseWindowsPowerShell -WarningAction SilentlyContinue
1 Reply
- NJKWorkCopper ContributorSometimes the simple things are over-looked:
Import-Module Microsoft.PowerShell.Management -UseWindowsPowerShell -WarningAction SilentlyContinue