This message was deleted.
# _general
s
This message was deleted.
t
I was able to PSremote onto the W10 devices as a test as well as using psexec, it seems to be yes.
w
Good. I use the PoSH cmdlet to fix this persistent (unfortunately) issue
I wonder if @Guy Leech has turned this one liner into a CUP SBA?
g
My preferred way of doing it is Test-ComputerSecureChannel -Repair
t
Yeah that's the one I was trying to use but had some permission type errors will post tomorrow as it's late here - anyway will try this one "Invoke-Command -ComputerName thecomputer -ScriptBlock {Test-ComputerSecureChannel} True" - or possibly -
Copy code
Test-ComputerSecureChannel -Repair -Verbose
w
Now do it remotely
t
Got it working had to use the Credentials twice one to PS-session onto the compute and then again to run the securechannel -repair cmdlet!
hmm after I have run this cmd I can't ping it anymore I can see in AD the computer has been modified at teh exact time I ran the SecureChannel -repair, which also means I can't rdp or PS-session back onto the machine how weird
m
@Marco Zimmermann was on something similar... Maybe he can share his results 🙂
v
I'm banging my head on trusts issues as well. But my fun error is below.
w
Is that run as a admin or elevated?
t
can you run the Test-ComputerSecureChannel cmdlet ? or nltest /sc_verify:TypeMyDomainhere.com
ah you probably need to add -credential (get-credentials) then enter your domain admin account - scroll a 2/3rds down lots of good stuff here also he has a script to remove and rejoin via powershell remotely a machine to the domain, I will try this on Monday - https://adamtheautomator.com/trust-relationship-between-this-workstation-and-the-primary-domain-failed/
v
Carl yes the commands are bing run with elevated rights but you did give me an idea of trying to login with an elevated account. Not sure if anyone has attempted that.. Test-ComputerSecureChannel returns true. Did not try nltest. I found that blog post and passed credentials and it looks like it takes but then the machine trust is lost.
t
Determine the status of the WinRM service on a remote computer PowerShell Y
Copy code
PS C:\> Test-WSMan -ComputerName "server01"
also what about using invoke-command in conjunction with psexec heard they do that now
v
Test-WsMan came back OK. This morning I tried a different strategy of using my account to login instead of elevation within a user session. At least doing that I was able to get Reset-ComputerMachinePassword to complete. Monitoring.
t
Can you still ping the machine ? I've had issues when I reset the machine in AD or via cmdlet, weirdly enough.
w
You shouldn't have to, but sometimes I've had to restart the computer/VM to get access back.
v
Ping continues outside of the normal issue of having to flush the dns cache on my workstation.
t
ok cool - just I had this issue here - https://github.com/adbertram/Random-PowerShell-Work/blob/f88241b7942e343eeef08ab583212e682df89eb3/ActiveDirectory/Rejoin-Computer.ps1 looks like a remote remove/rejoin script - will try later
v
On 3 PCs, I was able to elevate the Reset-ComputerMachinePassword. None of the users called me back to say it stopped working. Will contact them tomorrow. Hopeful.
t
nice
v
1 of the 3 users I was working with reported an issue after leaving the workstation on overnight. Monitoring continues.
Update on things I'm about to reimage these devices. I have yet to figure out the issue.
t
yeah I had my first trust relationship ticket user couldn't login with local account or cached account, the machine was moved from and disable OU back into the normal OU, but after a reboot I can only ping it , I can't PS-remote or psexec onto it , infact can't do squat. might try again tomorrow though.
v
Wanted to circle back and mention the workstations beat me. I got to the point that the workstation would not see the trust issue for a few days and then it would appear again. User would restart the PC and then things would work for a few more days. I even went so far as to disable the workstation password function and it still did not solve it.
😃 1
g
I always pass a PScredential object when I use Test-ComputerSecureChannel. Very occasionally doesn't work on the first -repair but never had to do more than 3 (one after another, same credential)
w
Hmmm, I had heard you always passed gas. Maybe that was a different conversation? 🙂