ps/Modules/Cole.PowerShell.Developer/Public/Get-CurrentDomainName.ps1
2023-05-30 22:51:22 -07:00

15 lines
274 B
PowerShell

function Get-CurrentDomainName {
<#
.SYNOPSIS
Get the current domain name of the machine
#>
[CmdletBinding()]
param (
)
if (Test-IsWindowsPlatform) {
return (Get-CimInstance Win32_ComputerSystem -Property Domain).Domain
}
return $null
}