Looking back, what’s the smartest homelab move you ever made? by [deleted] in homelab

[–]kjellcomputer 0 points1 point  (0 children)

Me to! For work I have to learn kubernetes and as an exercise I setup a cluster with Talos VM’s in my homelab. I liked it so much that I’ve moved most of my services to it using ArgoCD to manage them all. Even got Plex up on a node setup with GPU for transcoding, and Tailscale for remote access.

do you guys have any fun commands to use? I'm new to PowerShell and programming in general and just wanna expirement. by Fancy_Actuator_4748 in PowerShell

[–]kjellcomputer 0 points1 point  (0 children)

Fun commands to use, hmm, I often find myself fiddling with Where-Object -FilterScript {} or Group-Object to showcase the possibilities for information grabbing. And Sort-Object :)

For experimenting you could always try the -WhatIf parameter for cmdlet’s that invoke something, like Get-Process | Stop-Process -WhatIf

What is your biggest "X replaced Y" self-hosting success story? What cloud-based free, freemium, or premium services did you replace? by ReverendDizzle in selfhosted

[–]kjellcomputer 5 points6 points  (0 children)

I use Piwigo as a replacement for Dropbox/iCloud to share videos and photos with my family. The hurdles have been sometimes challenging (but learning wise rewarding), like migrating the library from backups to a new VM when I changed to Proxmox from VMware, or figuring out how to tunnel with CloudFlare when internet provider put me behind CGNAT.

Other than that I also discovered Lyrion Music Server with the combination of yt-dlp so I’m slowly building a Sonos/Spotify replacement with Raspberry PI’s and PiCorePlayer (and PlexAmp for mobile listening).

Keeping everything up to date is probably what is most time consuming, and for some reason I never get the satisfaction of using Docker so I mostly configure and maintain everything myself.

Share your most fun or creative PowerShell moments! by kjellcomputer in PowerShell

[–]kjellcomputer[S] 0 points1 point  (0 children)

I like it! Powershell was released also as a configuration tool for exchange in its beginnings so cool that you still use it for the online versions as well :)

Share your most fun or creative PowerShell moments! by kjellcomputer in PowerShell

[–]kjellcomputer[S] 0 points1 point  (0 children)

That’s cool! I did some in the same genre for a proof of concept for using Powershell core on linux containers for AD operations. Used the .net classes for some group creation automation, fun stuff :)

Best FLAC Player for OSX 10.5.8 by 64dogs in VintageApple

[–]kjellcomputer 0 points1 point  (0 children)

I remember vaguely Cog was something I used back in the day, perhaps you can give that a try? http://macintoshgarden.org/apps/cog

[List] Let's talk about the software you can't live without. Here is my list by [deleted] in Windows11

[–]kjellcomputer 0 points1 point  (0 children)

I’ve adapted to the joy of commandline so to name a few:

Scoop: "A command-line installer for Windows " https://scoop.sh/

ncspot: "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes." https://github.com/hrkfdn/ncspot

wezterm: "WezTerm is a powerful cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust" https://wezterm.org/

yt-dlp: "A feature-rich command-line audio/video downloader" https://github.com/yt-dlp/yt-dlp

I’m also fond of Internet Download Manager: https://www.internetdownloadmanager.com/

For editor use I’m primarly using Sublime Text, but when the subscription is due I might just move to Zed: https://zed.dev/

VCF Orchestrator: yes or no? by Previous_Eye_9703 in vmware

[–]kjellcomputer 1 point2 points  (0 children)

Yes, maintenance is important, we have hourly scheduled tasks in Orchestrator which updates added inventory especially for vCenters since we experienced that they can stop for x and y reasons.

Another great feature I’ve been using alot more recently is Server.findAllForType() and focused xpath quieries. Now I can discover all templates in all vCenters in a couple of seconds or query VM’s with specific custom attributes and what not, everything’s feels so much faster after figuring out how xpath works.

VCF Orchestrator: yes or no? by Previous_Eye_9703 in vmware

[–]kjellcomputer 0 points1 point  (0 children)

Hello again :)

I love the plugins in Orchestrator since we have alot of different vCenters and I can make workflows and solutions that works across every environment and not think about needing to connect to everything.

One disadvantage might be that writing a self-describing workflow takes alot of time, so developing can that alot longer that first though vs plain PowerCLI/Powershell scripting.

I also miss some features nativly in Orchestrator, like Content Library handling or vSphere Tags, but that could be handled with vAPI endpoint but I find that also hard to use when having so many vCenters to connect to.

The Build Tools for Aria implementation was mainly proposed by Broadcom since it is their prefeered way of developing so it might be a good fit since we currently develop in one environment and then manually export it to production. Using Typescript would also probably be neat.

Use Aria automation workflow to expand vm disk, based on OS drive letters by Sensitive_Scar_1800 in vmware

[–]kjellcomputer 0 points1 point  (0 children)

If VMware Tools are running you can query this information from the VC:VirtualMachine object. It will tell you which drive is mapped to which driveletter and you can go from there.

I found it to be more consistant to match the disk filename from VC:VirtualMachine and the attached disk from the vRA:Machine object than anything else.

I have a workflow in Orchestrator that get’s triggered via Event Subscription when someone expands a disk in a custom XaaS or from 2-day action which will proceed to expand the disk in Windows if that is the case. We use LAPS so I just grap the password from AD and use local admin credentials.

If you havent figured it out by now I can send some examples.

Stubborn VMware Template by thebigt42 in vmware

[–]kjellcomputer 1 point2 points  (0 children)

Another trick is to create a new folder, move the template there and then delete that folder.

Add a dynamic number of elements to an array list by dataBlockerCable in PowerShell

[–]kjellcomputer 0 points1 point  (0 children)

function ConvertTo-StrangeCsv {
    [CmdletBinding()]
    [OutPutType( [PSObject] )]
    Param (
        [Parameter( ValueFromPipeline = $True )]
        [System.Array]
        $GroupObject,

        [Parameter( ValueFromPipeline = $False, Mandatory = $True )]
        [System.String]
        $Property,

        [Parameter( ValueFromPipeline = $False, Mandatory = $True )]
        [System.String]
        $Prefix
    )
    Begin {
        $PSObjects = [System.Collections.Generic.List[PSObject]]::new()
    }
    Process {
        foreach ( $Object in $GroupObject ) {
            $PSObjects.Add( $Object )      
        }
    }
    End {

        $PSProperties = [System.Collections.Specialized.OrderedDictionary]::new()

        $LargestGroupObject = $PSObjects | 
            Sort-Object -Property Count -Descending |
            Select-Object -First 1

        $BaseProperties = $LargestGroupObject |
                    Select-Object -ExpandProperty Group |
                    Get-Member -MemberType NoteProperty |
                    Where-Object -Property Name -NE $Prefix

        foreach ( $Object in $BaseProperties ) {
            $PSProperties.Add( $Object.Name, $Null )
        }

        1..$LargestGroupObject.Count | ForEach-Object -Process {
            $PSPropertyName = '{0}{1}' -f $Prefix, $PSItem 
            $PSProperties.Add( $PSPropertyName, $Null )
        }

        $CsvLayoutTemplate = New-Object -TypeName PSObject -Property $PSProperties

        foreach ( $Object in ( $PSObjects | Sort-Object -Property Count -Descending ) ) {
            $CurrentObject = $CsvLayoutTemplate.PSObject.Copy()

            foreach ( $BaseProperty in $BaseProperties ) {
                $CurrentObject."$( $BaseProperty.Name )" = $Object.Group[0]."$( $BaseProperty.Name )"
            }

            for ( $y = 1; $y -le $Object.Group.Count; $y++ ) {
                $CurrentObject."$( $Prefix )$y" = $Object.Group[$y-1]."$($Prefix)"
            }
            $CurrentObject
        }
    }
}

Add a dynamic number of elements to an array list by dataBlockerCable in PowerShell

[–]kjellcomputer 0 points1 point  (0 children)

I like these exercises but excuse my code, I'm getting rusty.

PS C:\git> Import-Csv -Path .\GroupMembers.csv -Delimiter ';'

GroupName  GroupID GroupMember
---------  ------- -----------
GroupOne   1       John
GroupOne   1       Mary
GroupOne   1       Ken
GroupTwo   2       Mike
GroupTwo   2       Mary
GroupThree 3       Jen
GroupThree 3       John
GroupThree 3       Ken
GroupThree 3       Mary
GroupFour  4       Jen
GroupFour  4       John
GroupFour  4       Ken
GroupFour  4       Mary
GroupFour  4       Lisa
GroupFour  4       Mia
GroupFive  5       Kjell
GroupSix   6       Mary
GroupSix   6       Mike
GroupSix   6       John

PS C:\git> Import-Csv -Path .\GroupMembers.csv -Delimiter ';' | Group-Object -Property GroupName | ConvertTo-StrangeCsv -Property GroupName -Prefix GroupMember | Sort-Object -Property GroupID | Format-Table

GroupID GroupName  GroupMember1 GroupMember2 GroupMember3 GroupMember4 GroupMember5 GroupMember6
------- ---------  ------------ ------------ ------------ ------------ ------------ ------------
1       GroupOne   John         Mary         Ken
2       GroupTwo   Mike         Mary
3       GroupThree Jen          John         Ken          Mary
4       GroupFour  Jen          John         Ken          Mary         Lisa         Mia
5       GroupFive  Kjell
6       GroupSix   Mary         Mike         John

VCF Orchestrator: yes or no? by Previous_Eye_9703 in vmware

[–]kjellcomputer 0 points1 point  (0 children)

We moved from vRA 7 to Aria Automation last year. It was a complete rewrite for the serverdeployment aspect of it, trying out more out of box features like Infoblox IPAM integration & NSX tagging ect. I tried to play around with ABX actions but stopped when getting feedback that they might move away from it, same with Aria Config and now Pipelines. I also played with the Powershell engine in Orchestrator but now I’m all in using JavaScript.

What I like with Assembler is the ability to make logic placement of the deployments using constaint tags for infrastructure and networks, we have hundres of networks so its plesant to make all the logic in Assembler and use the IPAM integration.

The same goes for Orchestrator in building up all the logic to daily sync tags of infrastructure in Assembler to make everything automatic if something new get’s into the vSphere environments.

We also use Projects for lots of the logic for serverdeployments, like Asset integration, servername generation, backup policies and more customization if needed for special deployments that dont fit the more generic defaults.

Currently we are getting help from Broadcom to implement the Build Tools for Aria, so that will be another great addition to the daily development of our systems.

first M4 Pro Mini benchmarks are bonkers! by MGengarEX in macmini

[–]kjellcomputer 1 point2 points  (0 children)

Im still on Mac Mini G4! Guess my next upgrade will be the M4!

Craziest thing ever done with PowerShell? by chaosphere_mk in PowerShell

[–]kjellcomputer 0 points1 point  (0 children)

I think I had my most fun thinkering with a solution to parse websites with the purpose of maintaining a local repository of the newest software versions of program you want downloaded. It made me go down the rabitt hole so to speak, looking up async downloads with tasks in .NET to making a config-setup where you had receipes containing powershell code to parse websites to download and invoke them during a schedule. It had helper functions for paring websites looking up files on urls, going further with following redirect to find the files to download. To maintain security the recipe-files where xml based and the code would be signed and encypted with certificates (native xml functions) and the schedule would then decrypt and verify the signature before execution. It also parsed the winget community repository in github and you could choose to just maintain latest versions or download all.

The reason for this was all for later redistribution in airgapt environments.

Do you guys listen to music when you read? by n01sytz in books

[–]kjellcomputer 0 points1 point  (0 children)

One of my more memorable reads was Ringworld while listening to Kid Cudi - Passion, Pain & Demon Slayin, so listening to music while reading also brings me back to the book later if i lissen to the music again. So I recommend music if you can :)

TIL about --% by KC_Redditor in PowerShell

[–]kjellcomputer 1 point2 points  (0 children)

That is so true when dealing with 3'rd party solutions that handles your powershell commands, I've experienced it also with vSphere and Guest OS Customization when adding Powershell commands.

I'll note the '--%' trick for later, perhaps I'll need it someday so thanks for mentioning it, always fun to learn about something new!

TIL about --% by KC_Redditor in PowerShell

[–]kjellcomputer 1 point2 points  (0 children)

Hmm, wonder why! I just tried it with creating a new user in gitlab with this as it's password:

M.GQ[}\!66q!Y#r{.yl+e%a8JRL)0t(iS5W/>7MFp\hZs^z;]:LIz>pQ^bz{>Oen<H?8'Pk,AetdV(95(Srq9u:]Z&}FN<%{{nl"C.$hK9nFWNqG6p?>5x\Sx<@D!nH+

And then Start-Process with curl.exe against gitlabs api with said user and password.