Windows

GPO – WMI FILTER

Windows 10 64-BIT

root\CIMv2
SELECT * FROM Win32_OperatingSystem WHERE Version LIKE „10.0.1%” AND ProductType = „1” AND OSArchitecture LIKE „64%”

Windows 11
root\CIMv2
SELECT * FROM Win32_OperatingSystem WHERE Version LIKE „10.0.2%” AND ProductType = „1”

 

PRTG – CPU Temperature HP EliteDesk 800 G5 SFF

Skrypt PS, króry dla komputerów HP zwraca np. CPU Temperature do PRTG

$CpuTemperature = (Get-CimInstance -Namespace root\HP\InstrumentedBIOS -ClassName HPBIOS_BIOSNumericSensor | Where-Object {$_.Name -like „*CPU Temperature”}).CurrentReading
$FanSpeed = (Get-CimInstance -Namespace root\HP\InstrumentedBIOS -ClassName HPBIOS_BIOSNumericSensor | Where-Object {$_.Name -like „*CPU Fan Speed”}).CurrentReading
$PowerSupplySpeed = (Get-CimInstance -Namespace root\HP\InstrumentedBIOS -ClassName HPBIOS_BIOSNumericSensor | Where-Object {$_.Name -like „*Power Supply Fan Speed”}).CurrentReading
$ChassisTemperature = (Get-CimInstance -Namespace root\HP\InstrumentedBIOS -ClassName HPBIOS_BIOSNumericSensor | Where-Object {$_.Name -like „*Chassis Temperature”}).CurrentReading
Write-Host „<prtg>”
Write-Host „<result>”
Write-Host(„<channel>CPU Temperature</channel>”)
Write-Host(„<value>$CpuTemperature</value>”)
Write-Host(„<unit>Temperature</unit>”)
Write-Host „</result>”
Write-Host „<result>”
Write-Host(„<channel>Chassis Temperature</channel>”)
Write-Host(„<value>$ChassisTemperature</value>”)
Write-Host(„<unit>Temperature</unit>”)
Write-Host „</result>”
Write-Host „<result>”
Write-Host(„<channel>CPU Fan Speed</channel>”)
Write-Host(„<value>$FanSpeed</value>”)
Write-Host(„<unit>RPM</unit>”)
Write-Host „</result>”
Write-Host „<result>”
Write-Host(„<channel>Power Supply Fan Speed</channel>”)
Write-Host(„<value>$PowerSupplySpeed</value>”)
Write-Host(„<unit>RPM</unit>”)
Write-Host „</result>”
Write-Host „</prtg>”

ADFS i NPS TLS

Po zainstalowaniu ADFS przestała działać komunikacja (EAP-TLS) z NTP.
ADFS wyłączył prawdopodobnie TLS 1.0 1.1 1.2
Link jak włączyć:
https://community.spiceworks.com/topic/2195158-enable-tls1-2-in-windows-server-nps

Automatic Virtual Machine Activation (AVMA)

Automatic Virtual Machine Activation (AVMA)

Pobranie iso evalcenter:

https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2

przerobienie na standard i automatyczna aktywacja:

np.

DISM /online /Set-Edition:ServerStandard /ProductKey:DBGBW-NPF86-BJVTX-K3WKJ-MTB6V /AcceptEula

Klucze dostępne na stronie MS:

  • Server Standard – DBGBW-NPF86-BJVTX-K3WKJ-MTB6V
  • Server Datacenter – Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
  • Server Essentials – K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

SQLWriter

Writer Name: SqlServerWriter
Writer State: 8
Failure Result: 800423F4
Application Result: 1
Application Message: (null)

 

Rozwiązanie:

Zmiana uruchamiania SQLWriter z „Local System” na „Local Service”

sc config ServiceName obj= "NT AUTHORITY\Local Service" password= "

LISTA nazw services:
https://support.arcserve.com/s/article/209606286?language=en_US

DNS – Blokowanie odpowiedzi dla zewnętrznych zapytań

Dla domena i ip 192.168.32.156 będzie to wyglądało tak:

Add-DnsServerClientSubnet -Name "BlokowanePC" -IPv4Subnet 192.168.32.156/32 -PassThru
Add-DnsServerQueryResolutionPolicy -Name "TylkoWewnetrzneZapytania" -Action IGNORE -ClientSubnet "EQ,BlokowanePC" –FQDN “NE,*.domena.local” -PassThru

 

kasowanie:

Remove-DnsServerQueryResolutionPolicy -Name "TylkoWewnetrzneZapytania"
Remove-DnsServerClientSubnet -Name "BlokowanePC"

 

Informacja, jeśli mamy ustawione w konfiguracji (DHCP, STATYCZNIE) 2 dns-y to jak nie dostanie odpowiedzi z pierwszego to pyta drugiego pomimo że oba działają (testowane pod Windows 7)

Źródło: https://serverfault.com/questions/916165/configure-dns-policy-to-only-handle-internal-zone-for-one-client

Exchange 2010 zmiana InternalURL

Wyświetlenie obecnych url:

[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

Identity : SERVER\EWS (Default Web Site)
InternalUrl : https://server.domena.local/EWS/Exchange.asmx
ExternalUrl : https://mail.domena.com/ews/exchange.asmx

Zmiana:

[PS] C:\Windows\system32>Set-WebServicesVirtualDirectory -Identity "SERVER\EWS (Default Web Site)" -InternalUrl https://mail.domena.com/EWS/Exchange.asmx BasicAuthentication:$true

ponowne sprawdzenie:

[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

Identity : SERVER\EWS (Default Web Site)
InternalUrl : https://mail.domena.com/EWS/Exchange.asmx
ExternalUrl : https://mail.domena.com/ews/exchange.asmx

Sprawdzenie autodiscovera:

[PS] C:\Windows\system32>Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

Identity : SERVER
AutoDiscoverServiceInternalUri : https://server.domena.local/Autodiscover/Autodiscover.xml

ustawienie nowego:

[PS] C:\Windows\system32>Set-ClientAccessServer -Identity SERVER -AutoDiscoverServiceInternalUri https://mail.domena.com/Autodiscover/Autodiscover.xml

Sprawdzenie:

[PS] C:\Windows\system32>Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

Identity : SERVER
AutoDiscoverServiceInternalUri : https://mail.domena.com/Autodiscover/Autodiscover.xml

Restart IIS

[PS] C:\Windows\system32>iisreset /restart

Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted