Thursday, August 22, 2024

Pulling local admin accounts on a windows system WITH POWERSHELL

 There’s a couple ways to get them, I’m sure you’ve been around the internet looking.

The Powershell scripts I use:

Get-LocalGroupMember -Group ‘Administrators’ | Where-Object ObjectClass -ne ‘Group’ | Select-Object Name -ExpandProperty Name

This will give you all the locally/directly provisioned admin accounts. Note this is only user accounts, not groups. I didn’t care about groups in this instance.

Sometimes you can get a Powershell error “Get-LocalGroupMember” something about a cmdlet not being there, or something about array comparison.

Well, there’s a script for that too, using CIMinstance

Get-CimInstance Win32_GroupUser | Where {$_.GroupComponent -like ‘*admini*’} | Where {$_.PartComponent -like ‘Win32_UserAccount*’} | Select-Object -ExpandProperty PartComponent | Select-Object -ExpandProperty Name


And there you go, pulling directly provisioned user accounts from the local admin group. This should work for any other group too. And you can if than else the results to look for specific accounts. I like to throw the script into a variable and then run the if than else against the variable.

I wrote this all on my phone, so I’m sure this is riddled with typos, but it should at least get you (me) going.

Wednesday, May 1, 2024

Samsung refrigerator not making ice

How I got my stupid fridge to work again.

Normally, I press/hold the blue button till it chimes.






Well that didn’t work this time. Darn. I read that the filter might be the issue. I'm using some cheap amazon ones, but I just swapped it not long ago. Either way, I swapped that and did the blue button reset.



Still nothing. I had an old fridge that the lines would freeze and I would have to hit them with a hair dryer for an hour, thawing out everything in the freezer. But as far as I could tell, this fridge had a better design. Another dead end.

Being a fan of the IT Crowd, I listened to Roy Trenneman and turned it off and back on again. Just the Ice Maker. I had to hold the Door Alarm button to unlock the Ice maker toggle.

That didn’t work.

At this point, I basically accepted defeat and I turned off the Ice Maker. After probably a day, maybe two, I had enough courage to try fixing it again and turned it back on. A day later it was full of ice!

So, as per usual, I have no idea what step actually fixed it.

Could have been the long turn off, could have been a combination of the filter and resets. For all I know, the fridge fairy came and fixed it!

Either way, its working again, so I'm not going to question it.

Thursday, June 29, 2023

Getting RTL8812au passed to Virtualbox VM (Ubuntu)

There are no guarantees, I just write these notes so I can come back to them.

First, get the dongle working on the host OS.
After going through a couple different drivers, the one that finally worked was this method:
  1. sudo apt install git build-essential libelf-dev linux-headers-`uname -r` debhelper dpkg-dev dkms bc
  2. git clone https://github.com/aircrack-ng/rtl8812au
  3. cd rtl8812au
  4. sudo make dkms_install
unplug usb wifi and plug it back in, it should be blinking now.

Click Wireless in the upper right, WiFi-Settings, click on the RealTek controller at the top of the screen, I'm doing this in ubuntu 20, it looks like internet tabs at the top, and connect it to your network. Additionally, disconnect the primary network adapter from the network so there's not confusion later. (Disabling it will disable both, at least it did on my system.)

On the VirtualBox Network settings, add a new network adapter. Bridged and allow promiscuous mode (Allow All)

Start the VM and it should be connected.

Thursday, September 15, 2022

Installing VMWare Workstation Pro on Ubuntu

 Environment: Ubuntu 20

Software File: VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle


Bundle files obviously don't do anything. To make the file executable, go to the terminal and type:

chmod u+x (filename)

then

sudo ./(filename)


In this case:

(Change to directory where the file is located)

chmod u+x VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle

sudo ./VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle


for VMWare,

sudo apt install gcc

sudo apt install make

sudo apt update

Monday, December 13, 2021

Updating DNS servers via command line

Problem: Updating DNS to a static address on a subset of users.
No VLANs
No network segmentation
Basically, can't be done via DHCP due to hardware and previous configuration limitations.

Using CMD, the DNS servers can be changed from DHCP to Static, if you have a remote tool (LogMeIn, Splashtop, etc) that can connect to the computers and run CMD line instructions, this could help. WMIC node: or powershell may allow you to run the same if your environment is compatible.

Find the name of the interface:

netsh interface ipv4 show config

Also, ipconfig/all will work

Update DNS to static:

netsh interface ipv4 set dns name="(InterfaceName)" static 1.1.1.1

Add second DNS server:

netsh interface ipv4 add dnsserver "(InterfaceName)" address=8.8.8.8

Sunday, August 16, 2020

Mac Tip: Full screen browser

 I accidentally found out that Control+Command+F makes the browser full screen. The same as F11 in Windows.


The more you know.

Tuesday, June 16, 2020

You no longer have access to Planner

I had a fun one recently, I was looking through the different things I could do to a Planner (Microsoft Tasks) and accidentally Left the plan. This resulted in me being kicked from the Team (one where I was the owner) and with me, came the files... All the files started to be deleted one by one, they went to the recycle bin so they were easy enough to be restored, but weird anyway.

So, you accidentally left a Plan and now that you're part of the Team again, you get the following message


Going through planner online gives you the option to request to join the Plan, but those requests go no where.
No one that is currently part of the plan can add you, and once leaving and rejoining the plan, it says you're part of the plan, even though you can access.

How I fixed it:

Go to the Sharepoint of the Team.
Go to Conversations, this will open the Outlook Web App for the Team.
Click the 3 dots and go to Planner


For me, this opened up Planner web and restored my access.
I was also able to access the Planner tab in the Team.

Thursday, May 21, 2020

You can't add planner to a private channel in teams! Or can you?

Spoiler alert: you can.

Once the planner/tasks group is created, get a link to the planner/tasks and make a website link in the private channel.

Elegant? no
Effective? yes?

Control Private Channel Creation in Microsoft Teams

Well, private channels can get out of hand.
I had some employees make private channels, leave them, and it resulted in orphaned channels that no one could access. Microsoft will probably come out with powershells to take ownership, but as of now, I can't find anything.
So...
Like all admin solutions, I want to take it away.
The hammer approach is to remove employees from team ownership.
But what if you (IT) don't want to manage every teams members? Which is a PITA.
Teams Policies!
In the MS Teams admin center
Teams>Teams Policies
There it is! Create Private channels. I'll just turn that off. I'm an admin, so I should still be able to make private channels.
Turned it off, tested making a private channel, good to go.

BUT WAIT... there's more.

Any O365 change takes 24hours to do anything. In 24 hours I couldn't make private channels either. DOH!

So I can create a new one, but then I'd have to add EVERY PERSON TO THE POLICY...
Or...

What worked for me:
I left the Global policy as follows
Custom policy:no
Discover private teams:Off
Create private channels:Off

Then I created a new policy
Custom:yes
Discover private teams:Off
Create private channels:On

Then I added myself and the other admins to the new policy, 24 long hours later everything is working well.
I can create private channels, and no one else can, unless I say they can. Because I am the admin, and that's how it works.

If you're reading this, I assume you have already completed this step, but if not, here is the document to restrict group creation:
https://docs.microsoft.com/en-us/microsoft-365/admin/create-groups/manage-creation-of-groups?view=o365-worldwide

Monday, March 16, 2020

Slow NAS with Ubuntu and mapping a sabma share to fix it

Installed TerraMaster F4-210 with Refurb Hitachi 7k4000 drives in Raid 0, so it should have been pretty fast.
When connecting to the drive and moving files, I was sitting at about 50MB/sec, a few spikes to 60, and some drops to 40. While disappointed, I saw people getting more like 30MB/sec, so I figured that's all I'd get.
Moving on, I knew that I needed to have the NAS mount on boot for my Plex server, so I looked into that. I used a Samba share, using this website's directions:
https://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/
sudo mkdir /[name]
 

My fstab entry:

(remember, sudo gedit to get to the graphical text editor to edit this file)
//[SAMBA IP/FOLDER] /{DIRECTORY] cifs credentials=/[PATH TO CREDENTIAL FILE],uid=1000,gid=1000 0

for the credential file, create a doc with:
username=[USERNAME]
password=[PASSWORD]

Note:
Install cifs with sudo apt install cifs-utils

Cool, this works.

BUT...

When I went to transfer files to my NAS, I jumped to 75MB/sec steady. Some spikes to 88MB/sec as well.

Friday, January 24, 2020

Windows update on Windows Terminal server (Powershell)

This is done on a core server 2016
in powershell

Install print services:

install-windowsfeature print-services

enable the print spooler:

set-service spooler -startuptype automatic

start the print spooler:
net start spooler

if you can't pint the print server, you may have to tweak the domain firewall. Or turn it off with:

set-netfirewallprofile -profile domain -enabled false

Then manage the printers through another server that runs a GUI because you're not a complete masochist.

Pulling local admin accounts on a windows system WITH POWERSHELL

 There’s a couple ways to get them, I’m sure you’ve been around the internet looking. The Powershell scripts I use: Get-LocalGroupMember -Gr...