This is simply for my personal reference since I keep searching for this. I usually use to check from AWS Systems Manager Session Manager. The answer is to run the command query user /server:$SERVER. The answer is from this StackOverflow question.
Tag: windows
How to find the LDAP connection string of an AD User / Group with Powershell
This is simply for my personal reference as I am always confused on finding it as part of my projects, and I always forget what to search. So the answer is just a copy from Server Fault Type dsquery /? in a command prompt.
Rename Windows and Linux EC2 instances based on tag
If you need to rename your EC2 instances based on the tags set, you can use the below code snippets. This can be particularly useful if you use a hardened AMI with a name already set in. To apply them, you can just use a cron job or a Task Scheduler job, or even cloudwatch […]
Windows Server 2016 Update issues with WSUS
In case if you configured a new WSUS server, but your Windows Server 2016 servers without internet access are throwing errors like “We couldn’t connect to the update service. We’ll try again later, or you can check now. If it still doesn’t work, make sure you’re connected to the Internet.“, you can fix it by […]
How to send IM in teams from Outlook
So if your employer migrated from Skype for Business to teams, it is going to be an annoying change because by default you will not be able to send IMs to Teams from outlook unlike Skype used to be. But with a small change in Teams it is possible. – Open Teams – Click on […]
How to use sudo in powershell
Well this is not exactly same as sudo. However it is very annoying when I want to run something in powershell and it gives me access denied. And then I need to go to start menu, or task bar, right click, select run as administrator etc just to run one command. As someone who likes […]
TIL how to disable the timeout of mapped drives in Windows
I was trying to copy some big files over the network to another server, and I mapped the destination drives in the local server for easy copying. However I kept getting errors in my script, which I suspected because the drives getting disconnected. Here is how to set it to not disconnect. Run as administrator […]
TIL how to check the bandwidth between 2 servers
We subscribed for a dedicated line between 2 datacenters, and when we were trying to copy some files over, it was really slow. We were supposed to get few MB/s transfer rate, but were getting only 20KB/s which was unacceptable. We needed to make a clear case with the service provider to get their support […]
How to fix the error “an authentication error has occurred(code 0x80004005)” when connecting through RDP.
Ever since the policy to disable TLS 1.0 was pushed down to the local machines, we started getting the error “an authentication error has occurred(code 0x80004005)” when accessing few of our Windows 2008 R2 servers. It was interesting because we have a bunch of other servers with no problems accessing. This seems to be a […]
Fix “Failed to open Group Policy Object. You might not have the appropriate rights” error
I was facing this error in one of my servers while trying to open gpedit, with additional message “The volume for a file has been externally altered so that the opened file is no longer valid”. Here is how I fixed it. 1) Enable view hidden files from explorer. 2) Navigate to C:\Windows\System32\GroupPolicy\Machine 3)Rename the […]