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

do you know the command for this ????


thanks


brian
LVL 1
NAMEWITHELD12Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

pjamCommented:
Get-ADDomain should work
Zephyr ICTCloud ArchitectCommented:
Or

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

thanks!
SD-WAN: Making It Work for You

As bandwidth requirements and Internet costs grow, businesses naturally want to manage budgets by reducing reliance on their most expensive connection types. Learn more about how to make SD-WAN work for your business in our on-demand webinar!

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.