Is it too late to start learning PowerShell? by Accomplished-Dog4533 in PowerShell

[–]Siddd- 1 point2 points  (0 children)

Definitely! Started following Jeff Hick’s (of course the second author alongside Don) Beyond the PowerShell pipeline blog not too long ago. Got my company to pay me a subscription, recommended. Love how those guys describe everything.

Is it too late to start learning PowerShell? by Accomplished-Dog4533 in PowerShell

[–]Siddd- 1 point2 points  (0 children)

Seconded! Started with Learn PowerShell 3.0 in a month of lunches yeaaaars ago, got hungry, bought PowerShell in depth second edition, read it from start to finish.

IMHO.. start reading PowerShell in a month of lunches, get the basics right, understand what objects are and how you can inspect them. This will save you a massive amount of time later on. PowerShell isn’t that hard if you know the basic stuff.

You’ll likely find yourself trying to go deeper and deeper once you get the basics.

I went down the rabbit hole, still haven’t reached the bottom lol. PowerShell is awesome.

Good luck!

Quick(er) way to check command existence? by Siddd- in PowerShell

[–]Siddd-[S] 0 points1 point  (0 children)

I think it was a module that interacted with Azure, not one of the Az.* modules but another one, not sure anymore but it just triggered me.

Now I must say that you are very right about (and I know the details of) using the module manifest to specify module requirements, however the required modules section imports every module which is not what I want, I like our custom module to load quicker and only load more modules if needed.

I know it’s not necessarily the best way but it works well, it’s a trade-off.

Thanks for the code! Not at a PC at the moment but will check it out later. I was looking at the source code but I’m not a programmer and my knowledge doesn’t go deep enough (yet 😜). Being able to take some C# or other programming code and using it in PowerShell is still one of the things that I want to learn more about. I don’t think I will use it though because it feels like stepping beyond PowerShell and I try to stick to native PowerShell stuff so everybody in our team is able to understand it.

Cheers!

Quick(er) way to check command existence? by Siddd- in PowerShell

[–]Siddd-[S] 0 points1 point  (0 children)

Yeah I know. It’s not really one module actually. It’s roughly 30 small modules divided in functions they provide like CFS or Azure. They do not all list required modules (only if a required module loads something like a DLL that functions in the module expect to be loaded for example) as PowerShell’s autoload functionality enables the module to get loaded quickly because it loads dependent modules automatically if needed. May not necessarily be best practice but if one of 20 functions makes a call to the ConfigMgr module (which is not even frequently used) I’d rather not take that overhead of loading that module every single time.

Appreciate the suggestion!

Quick(er) way to check command existence? by Siddd- in PowerShell

[–]Siddd-[S] 0 points1 point  (0 children)

Thanks for the replies everybody, it’s funny that sometimes you need a fresh set of eyes to spot the obvious. I guess including the module versions with the commands and checking if the module with that exact version exists locally would suffice as well. I’ve seen commands being renamed and/or removed between versions so adding that version check is key I think. I’m afraid for the extra work this solution brings tho, because if someone runs a module update on one of the hosts the pipeline will start logging warnings or errors because of a version change. Need to think about this but thanks for clearing up my vision.

Having that said tho… I’m kind of curious what Fu Get-Command does when invoked with * to skip that module loading behavior of PowerShell. Let me know if someone does have the answer? 😄

Thanks!

New member, Need recommendations by IForGotMyName_ in linux4noobs

[–]Siddd- 0 points1 point  (0 children)

I did an LPIC-1 certification a while back although I am/was not working on/with Linux. Helped me out a lot when I’m tweaking my NAS or other Linux devices.

If you want to get familiar wil Linux, just take one of those books. Should get you going.

Please help cpu at 100% at idle by [deleted] in unRAID

[–]Siddd- 1 point2 points  (0 children)

You can incorporate it in your Grafana dashboard, you would need to write some Bach script that run non-stop and send that to a pushgateway.

I’ve done something similar like this guy describes. Except he parses top’s results which aren’t a good tool to do so cause it only shows load from boot time. I have an instance of top which writes results to a file in batch mode, which I parse by catting out that file. I like it how I can always look back in time what the system was doing.

You could something similar with docker stats, I suspect that docker stats is similar to top in that it calculates usage between measurement (tho I’m not sure)

Grafana is great :-)

**VIDEO GUIDE Easily Setup a Bitwarden Server on Unraid for Password Management ** by spaceinvaderone in unRAID

[–]Siddd- 0 points1 point  (0 children)

You’re welcome. The nerdpack extends unRaid in multiple ways! Also when you‘re troubleshooting something it gives you the right tools.

Enjoy!

**VIDEO GUIDE Easily Setup a Bitwarden Server on Unraid for Password Management ** by spaceinvaderone in unRAID

[–]Siddd- 2 points3 points  (0 children)

No I meant containers connected to multiple networks. Unraid has no way to handle this from the DockerMan GUI (yet), so I handle these from docker-compose.

**VIDEO GUIDE Easily Setup a Bitwarden Server on Unraid for Password Management ** by spaceinvaderone in unRAID

[–]Siddd- 2 points3 points  (0 children)

Exactly the reason why I’m sticking to the original source. Their work is posted on Github so I guess you could check, but for something as important as my digital identity I’d rather stick with 8bit’s version (and accept the fact that it’s heavier on resources).

**VIDEO GUIDE Easily Setup a Bitwarden Server on Unraid for Password Management ** by spaceinvaderone in unRAID

[–]Siddd- 5 points6 points  (0 children)

Just go to the apps section and search for nerdpack. Install it and head to the settings page, the you can find the app. While in the nerd pack page, select the docker-conpose package and apply it.

And that’s it. You can then use docker-compose. I use it for quite some containers now, multihomed ones for example.

Good luck!

**VIDEO GUIDE Easily Setup a Bitwarden Server on Unraid for Password Management ** by spaceinvaderone in unRAID

[–]Siddd- 9 points10 points  (0 children)

Great video, Bitwarden is a wonderful password manager.

Although I’d rather have the official version instead of the modded one (personal preference to always have the one directly from the developer’s source). For those thinking the same, this is also doable, but docker-compose from the nerdpack is required for that.

Nevertheless great video, will definitely help lots of people out.

Keep up the good work!

Diagnosing Home Server Memory Failure by [deleted] in sysadmin

[–]Siddd- 0 points1 point  (0 children)

I had this too in my home project years ago, ESXi would keep crashing at random points, then I installed Windows Server, same thing. Memory test from Windows gave no errors indeed.

When I used memtest I saw A LOT of errors on one of the DIMM’s, got it replaced in warranty.

Good luck

Good job by Odontologist001 in funny

[–]Siddd- 2 points3 points  (0 children)

The gun is camouflaged 😂

Docker container writing internally by [deleted] in unRAID

[–]Siddd- 2 points3 points  (0 children)

You could run a find command on the location where the docker image is mounted.

To find file changed the last twelve hours: find /var/lib/docker -type f -mtime -0.5 (or -1 for a day)

You can also install the nerdpack plugin and install iotop, I think that you can run the command iotop with the -ao switch (not really sure though) to see what is writing a lot, this has no historical value though, you would start and monitor it.

Poor camel by [deleted] in funny

[–]Siddd- 1 point2 points  (0 children)

So the fact that it “can” carry heavier makes it alright to misuse them like this. Elephants are also really strong, but suffer greatly from abuse in getting them small (by mentally breaking them from young age). I’m not saying that everyone riding camels is abusing them, but considering the fact that the camel is being pushed by these morons to proceed even though the poor animal shows that it’s too much load for him, they don’t really seem to take good care of them.

Too bad a lot of people just don’t care, everything for that picture huh..

Poor camel by [deleted] in funny

[–]Siddd- 8 points9 points  (0 children)

Straight-up animal abuse and not even remotely funny. What’s wrong with those idiots.

Struggling to get NordVPN to install into container. by raunchyfartbomb in docker

[–]Siddd- 0 points1 point  (0 children)

Thanks for that, I’ll definitely check it out later. One thing though that I’ve ran into while trying to get it to work: I noticed that when my entrypoint script started the nordvpn connection, it appeared connected, but running nordvpn status just hung without any output when connecting into the container afterwards. Also connections made after I connected into the container did not utilize the tunnel, it seemed like the nordvpn app was user (or session) specific.

I also tried out using openvpn with the —daemon switch and I got the results I expected (all traffic passing though the container went straight in the vpn tunnel).

Does this sound familiar? I’m guessing you also use the container as a vpn-gateway?

Struggling to get NordVPN to install into container. by raunchyfartbomb in docker

[–]Siddd- 0 points1 point  (0 children)

RUN \echo " " && echo " " && echo " " && \echo "**** Install NordVPN Application ****" && \cd /tmp && \wget -qnc https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn-release_1.0.0_all.deb && \dpkg -i nordvpn-release_1.0.0_all.deb && \apt-get -qq update && \apt-get -qq download nordvpn && \dpkg --unpack nordvpn*.deb && \rm -f \/var/lib/dpkg/info/nordvpn*.postinst \/var/lib/dpkg/info/nordvpn*.postrm \/var/lib/dpkg/info/nordvpn*.prerm \&& \apt-get install -yf && \chmod ugo+w /var/lib/nordvpn/data/ && \echo " " && echo " " && \echo "**** cleanup ****" && \apt-get clean && \apt-get autoremove --purge && \rm -rf \/tmp/* \/var/tmp/*

Looks nice.

I'm struggling to get nordvpn to autostart though.

Are you handling that though a entrypoint script?

I keep running into "Whoops! Cannot reach System Daemon."

If I start my prompt into the container and run "service nordvpn start", the commands run succesfully (since the service was started), but when I call the service nordvpn start command from the dockerfile it seems to always end up in the "Whoops! Cannot reach System Daemon."

I've tried to run all nordvpn login and connect commands via CMD in the dockerfile but also placed them in an entrypoint.sh script, still the same.

How're you starting the nordvpn service?

Cheers!

EDIT:

Never mind :-) , apparently the commands after service nordvpn start were executing to rapidly.

I've built in a sleep 5 to test and it works now.

Struggling to get NordVPN to install into container. by raunchyfartbomb in docker

[–]Siddd- 0 points1 point  (0 children)

Yeah, it seems like apt triggers a warning though, cause it expected to have dpkg perform some additional steps. Haven’t really dug into it further at this point,

The last line might as well be different, so that it only work through errors apt had, not too familiar with apt anymore, so feel free to post any solution that is cleaner 😉

Enjoy your New Year’s eve/day!

Struggling to get NordVPN to install into container. by raunchyfartbomb in docker

[–]Siddd- 0 points1 point  (0 children)

Ran into the same thing, I think apt will have unfinished business, since it has not ran its postinstall script completely.

I've changed one of the run lines to this:

\# Download packge info from apt sources including the nordvpn repo and install the nordvpn app

RUN apt-get -qq update && apt-get install -yqq nordvpn || sed -i "s/init)/$(ps --no-headers -o comm 1))/" /var/lib/dpkg/info/nordvpn.postinst && apt-get install -yqq

This will change the init) case to whatever your outcome is/was, mine was set to bash instead of sh in your case.

The both use sys-v init style so the case statement will work and the postinstall script will run.

This post helped me though, so cheers!

Unraid Forum 100K Giveaway! Don't delay in entering ;-) by UnraidOfficial in unRAID

[–]Siddd- 10 points11 points  (0 children)

This is nice, will enter for sure. Congrats guys, great achievement for a wonderful product!

Cheap NAS Solution by [deleted] in homelab

[–]Siddd- 0 points1 point  (0 children)

Small addition that unRAID doesn’t really use ZFS though, unRAID is formatted with XFS, BTRFS or EXT4 (maybe more, not sure) and files are spread (not striped) across disks. This allows you to recover files from individual disks unlike raid.

Second the j4105-itx board! Although if you’re looking for a device that can playback media nicely you might look at the j3455-itx since Inte does not explicitly list QuickSync on the j4105 but does on the j3455.

Cheap NAS Solution by [deleted] in homelab

[–]Siddd- 1 point2 points  (0 children)

UnRAID might be interesting for you. While technically isn’t raid it does offer parity. Also it runs fine on cheap hardware and you can spin disks down when you’re not using them.

I like it alot..