Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Validate-NDESConfiguration.ps1 #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jack-Ed
Copy link

@Jack-Ed Jack-Ed commented Aug 19, 2024

Get-WmiObject is depracated
(https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1)

This caused an issue when running with PowerShell 7 as a I received: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Replaced:
(Get-WmiObject Win32_ComputerSystem).domain

With:
(Get-ADDomain).DNSRoot

Get-WmiObject is depracated 
(https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1)

This caused an issue when running with PowerShell 7 as a I received:
The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 

Replaced:
(Get-WmiObject Win32_ComputerSystem).domain

With:
(Get-ADDomain).DNSRoot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant