Function Get-PCType(){
If ((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 1){
Write-Host "This is a Workstation"
}ElseIf((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 2){
Write-Host "This is a Domain Controller"
}ElseIf((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 3){
Write-Host "This is a Server (But NOT a DC)"
}Else{Write-Host "Unknown PC Type"}
}
Function Get-ZoneIdent($1){
If ((Get-Item $1 -Stream Zone.Identifier) -eq 0){
Write-Host "$1 Came from Zone 'My Computer'"
}ElseIf((Get-Item $1 -Stream Zone.Identifier) -eq 1){
Write-Host "$1 came from Zone 'Local Intranet Zone'"
}ElseIf((Get-Item $1 -Stream Zone.Identifier) -eq 2){
Write-Host "$1 came from Zone 'Trusted Sites Zone'"
}ElseIf((Get-Item $1 -Stream Zone.Identifier) -eq 3){
Write-Host "$1 came from Zone 'Internet Zone'"
}ElseIf((Get-Item $1 -Stream Zone.Identifier) -eq 4){
Write-Host "$1 came from Zone 'Restricted Sites Zone'"
}Else{Write-Host "Unknown Zone Info"}
}