Test-ComputerSecureChannel —- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/test-computersecurechannel?view=powershell-5.1
Test-ComputerSecureChannel -Verbose
Test-ComputerSecureChannel komutunun true dönmesi gerekmektedir. Bu komut çıktısı False dönüyorsa active directory ve ilgili client arasındaki trust ilişkisi bozulmuştur.
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
Get-Adcomputer -identity ComputerName -Properties PasswordLastSet
1 2 3 4 5 |
$LocalAdminCred <strong>=</strong> Get-Credential Remove-Computer -WorkgroupName TEMP -UnjoinDomainCredential $LocalAdminCred $DomainCred = Get-Credential Add-Computer -Credential $DomainCred -DomainName powershell.no |
1 2 3 4 5 6 7 |
Get-NetTCPConnection <strong>|</strong> Select LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess , @{n<strong>=</strong>"ProcessName";e<strong>=</strong>{(Get-Process -Id $_<strong>.OwningProcess</strong>)<strong>.ProcessName</strong>}} , @{n<strong>=</strong>"UserName";e<strong>=</strong>{(Get-Process -Id $_<strong>.OwningProcess</strong> -IncludeUserName)<strong>.UserName</strong>}}<strong>|</strong> Where {$_<strong>.State</strong> <strong>-eq</strong>"Established"} <strong>|</strong> Group-Object ProcessName -NoElement <strong>|</strong> Sort-Object -Property Count -Descending netdom resetpwd /s:server /ud:domain\User /pd:* to reset a machine password and nltest.exe /sc_verify:domain.local to verify the secure channel. Obviously, the syntax and discoverability of the PowerShell alternatives is much better and should be the preferred options. |