windows 2012 how to tell if a server is a member of a domain with powershell?

do you know the command for this ????


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Get-ADDomain should work
Zephyr ICTCloud ArchitectCommented:

Get-WmiObject Win32_ComputerSystem | select Domain

Open in new window

It should either show WORKGROUP or the name of the domain ... That could work maybe...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NAMEWITHELD12Author Commented:
I am getting commandnotfound on this

i am very new to power shell maybe i am doing something wrong

How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

NAMEWITHELD12Author Commented:
thanks man , i appreciate it!!!!!!!!!!!!!!!!!!!1
Zephyr ICTCloud ArchitectCommented:
An easier one still:

(gwmi win32_computersystem).partofdomain

Open in new window

Seth SimmonsSr. Systems AdministratorCommented:
it won't work with regular powershell unless you load the AD module or run AD Module with powershell in administrative tools

for regular powershell, do Import-Module ActiveDirectory then try that command
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.