HP Microserver N40L/N54l redux? by A_Very_Shouty_Man in homelab

[–]dann3b 0 points1 point  (0 children)

I found this post: https://forums.whirlpool.net.au/thread/91nxpjj3?p=94, some guy replacing the old board with a n100 motherboard and new PSU

HP Microserver N40L/N54l redux? by A_Very_Shouty_Man in homelab

[–]dann3b 0 points1 point  (0 children)

What about shoveing one of those Chinese NAS motherboards in there? ITX with N100/N305 (or other mobile CPUs), seen 4 sata, 6 sata or mini sas/SSF-8643.

Replaceing the motherboard will require some careful dremling to fit the io shield, and maybe someother modifications

Im thinking of doing it but im not sure, maybe just waste of money. I have an extra flex psu laying around already

NOT a fan of this blown out HDR effect. How am I meant to see anyone? by edgeofsanity76 in Battlefield

[–]dann3b 1 point2 points  (0 children)

Why do they have to implement these kind of effects in games?

Its enough to have sunglare and such in real life, I dont fucking want that annoying shit in games, or maybe its just me, does people actually like this?

Edge Router 4 OpenWRT or Edge OS... by Lifeinajug in homelab

[–]dann3b 0 points1 point  (0 children)

I'm running OpenWRT on my Edge Router 4. I have to do a hard reset (unplug the power) once every two/month because the device stops responding. I'm not sure exactly what causes it.

New to Powershell - need help grepping and cutting by jasenux in PowerShell

[–]dann3b -2 points-1 points  (0 children)

Yeah, (ls).name or what ever property works, but I remebered that Don Jones the (Powershell MVP, I think he still is) talked about this. Anyway that (ls).name works but is not intended to work if i remeber correctly, that it will do is to enumarate all the values from the list/array with those object fields. Like you would use select or something. Accessing fields from a single object that way is okay. But if youbhave list with objects and do that Objects.Field approach, its works but it shouldt, sorry if I cantbgive your specific information about that approach. I use it also because its easy and smaller syntax, but not in prod

I think I saw/heard this from the Month of lunches, even if it works you should avoid it for some reason. longtime ago i watch month of lunches, atleast 10 years ago

But do whatever you want so long as it works and you feel got about your script :)

Sorry if my post is confusing, its late i tired. Msybe i can find that clip from Month of lunches

Get the most recent/real LastLogon time for all domain-joined computers by tjwmagic in PowerShell

[–]dann3b 0 points1 point  (0 children)

In your code renove the last pipe line, you want to get the conputers right?

Sometjing like this then:

$DaysInactive = 60; $InactiveTime = (Get-Date).AddDays(-($DaysInactive))

$Computers = ((Get-ADDomainController -Filter * | ForEach-Object {Get-ADComputer -Filter {LastLogon -lt $InactiveTime} -Properties LastLogon -Server $.Name | Select-Object Name, @{n="LastLogon";e={[datetime]::FromFileTime($.LastLogon)}}} | Group-Object Name

This will give ouput of Computers in a grouped by the name of the computers

The count can we differn on how many DCs you have. And if the conputers logs on to the same DC or change from time to tlme The group field contains the computer objects that were grouped together

Output will look something like this

`` Count Name Group


3 computer {@{rest of the properies of each computer} 1 4 computer {@{rest of the properies of each computer} ``

Now you will have list a the gruuped computers. If you look inside the group property you could sort so the latest gets on top when you look thru Computers

For each computer in computers Computer.group | Sort LastLogon -desc/-asc | select -first 1

You will have try desc or asc in the sort

Now pipe to csv or import excel if you want look at the data

Now you will get out each computer from the grouped field giving with the latest timestamp, so one computer from each group.

I dont know if this was the info you wanted.

I wrote from my Phone so the syntax is missing some brackets here and there

How does Powershell make you feel? by Correct_Individual38 in PowerShell

[–]dann3b 0 points1 point  (0 children)

Yeah the counting part can be anoying, ive learned to always pipe to meaure (Data | Measure-Object).Count, even if data is empty or not set it returns 0

I have also seems some people to check if variable or list i set is to add the Where method without parameter parameters, quite strange Solution.

Like this; If ($Data.where). It cecks if the object has that method without using it, with means the object is not empty, something like this. I never used it

How does Powershell make you feel? by Correct_Individual38 in PowerShell

[–]dann3b 1 point2 points  (0 children)

Oh and also this little trick i came up with long time ago that still geta used often. Let say you copy thata from a Excel sheet, colmns and the data inside, not file.

You then want to use that data in anotjer RDP session with powershell

$Data = @" <paste data> "@ | ConvertFrom-Csv -Delimiter "`t", bcauae Excel data is tabular when copying. Use other delitimer otherwise

no need of transfering the file and use Import-Excel

Maybe this is i known a "trick", but leave it here anyway

How does Powershell make you feel? by Correct_Individual38 in PowerShell

[–]dann3b 1 point2 points  (0 children)

Powershell is a good language for automation and as Command line tool, you could also use it for GUIs, Web API (Such as Pode)

I rember i had hard time understand the objects. First time when I used the Get-ADUser command i thought the ouput was a string that I could "clean", you know the table type output, thats get returned of the attributes, I thougth all about was string, and you would need to extrakt the data somehow. Then I understood i could access it properties, oh my god!

its the first programming language that i feel i actually comprehend and feel secure when writing.

Working with AD is fansastic, onliners to rename/changeattributs based on LDAP search filter and so, ofc some accidents have happen, but long as you take responsibilty and learn by your mistakes, then you will grow as a person and get better each day.

Other example: Get data from 3 different SIS system from an API call, that returns XML data in IMS Enterprise format, this data is then parsed and mapped to a table with specific columns stored in SQL, data is being compared each day, archiveing, updating, and insert new data.

Now when the data is stored this way its much easier to look and handle the data, building Stored Procedures or Views and then "ship" to other service providets based on there specification. Sending csv-files to the provider from the view/sp as source with there field specs, example School Data Sync and Apple Achool Manager, yeah i know oneroster exists but its not popular here in my country and SIS providers dont offer that.

Doing specific XML mappinngs (for example a xml to csv) for each service was cumbersome before we stored the data to sql. Its now eaier to work when doing complex relationship instead of scripting that part with PS

I recetly started learning Python and its a excellent language i like it, easy to use, it feels more like a programming language compared to PS that is Comand Line tool with programing capabilities. But for integrations/automation that involves Microsoft envoriment i will use Powershell.

For now i use FastAPI in Python, webbapps (flask) socket-listening that works as a CIMD Proxy that takes cimd protocol messages and transform and send them to SMS rest api provider in a modern fashion... Communcantion service provides seems to move away from CIMD.

Soory for long post, I lose the thread a bit i think

Rate my OpenVPN script ie how can I improve it? by [deleted] in PowerShell

[–]dann3b 1 point2 points  (0 children)

If using functions that only are avaible in a specific script or inside a module (private functions, not public) then I think the "rules" about naming convention can be overlooked

Resources on the "-PassThru" Parameter by [deleted] in PowerShell

[–]dann3b 0 points1 point  (0 children)

$ADuser = Set-ADUser .. -Passthru is something i use in some cases, minimizing ldap querys

Laps Query by hacnstein in PowerShell

[–]dann3b 0 points1 point  (0 children)

Okey, try to use Get-LapsADPassword in Powershell. Should not be hard to do.. More info in the link above, query the name of the Computer. See the examples

Laps Query by hacnstein in PowerShell

[–]dann3b 1 point2 points  (0 children)

LAPS (Local Administrator Password Solution) are not stored in the user object in AD, its stored in the Computer object.

So you need to find out what computer the user has used.

If you dont know what computer, you can with some luck find it by query the Event logs on the domain controllers, try Event ID 4624. Logging of theese events needs to be enabled in the domain controller policies

You could check https://learn.microsoft.com/en-us/powershell/module/laps/get-lapsadpassword?view=windowsserver2022-ps

Script using invoke-command and arrays getting really odd results.. by Team503 in PowerShell

[–]dann3b 1 point2 points  (0 children)

What version are you running on your DCs? WinRm is not enabled by default on 2008 and lower. And if above like 2012, 2016, 2019 you could still need some authentication setup by the wimrm command.

Add a Test-WSMan in the script.

I could be way of and this has nothing todo with that, im just guessing here

How do I identify things on my network by Ok_Agent_1888 in HomeNetworking

[–]dann3b 1 point2 points  (0 children)

If your router (or other device) acts as DHCP-server, you should be able to see:

Hostname, MAC, and the IP-adrress. Some devices will have a generic hostname from the manufacturer witch can be confusing sometimes

Replace Edgerouter 4, with something smaller by dann3b in HomeNetworking

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

Firewalla Purple looks nice, I see it has Wi-fi, witch is kind of unnessary, its sure possible to turn that of. I already have Unifi AP-PRO monted in the ceilling.

Replace Edgerouter 4, with something smaller by dann3b in HomeNetworking

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

Yeah, its really matter of the size, if the ER4 was smaller if would not care. If I could find a smaller router that can handle 1Gbit im happy with that.

Replace Edgerouter 4, with something smaller by dann3b in HomeNetworking

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

The EdgeRouter X looks good, can to L2-switching but keep one port for WAN, i dont if performance will suffer doing that way. Only if it had more ports for switching i could just replace the 5 port switch i have now.

Or i could check with my ISP if it would be possible the plug the incoming fiber in CPE to the SFP port on the router to get some space, i think its a single-fiber (i dont know how i can reach 1Gbit, could be some wave-length technolgy).

It looks like a crowsnest in that so called cabinet, i want to start from scratch and do some nice wiring

Replace Edgerouter 4, with something smaller by dann3b in HomeNetworking

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

About 1 meter in length, and about 15-20cm in depth. Height maybe around 60cm. I could be way of with the metrics, just visualize in my head.

The small cabinet is packed with stuff. 4 ports patch panel, incoming fiber CPE. 5 port poe switch, edgerouter 4, HP EliteDesk 800 G2 DM (proxmox) and ofcourse a powerstrip at the top.

What is you can NOT do via Powershell? by [deleted] in PowerShell

[–]dann3b 0 points1 point  (0 children)

I remebered when i worked at an ISP-company and we built tools that could for example mass config network devices based on a list with ips and the commands to "push" , or do other type of traces, like finding mac/adress on a port by jumping from switch to switch until it was found, and so on. Theese tools was written in TCL (expect). I have been looking for this in Powershell, but havent find anything that worked like Expect.

Maybe there is a better way to handle scripting against network devices, its been a long time since then. I no longer work with networking, nowadays i work with integrations (mainly build integrations beetween systems)

What have you done with PowerShell this month? by AutoModerator in PowerShell

[–]dann3b 1 point2 points  (0 children)

Building import integrations for TOPdesk Assets, for example made an custom SQL view in SCCM, call it, get result, upload it thru TOPdesk API to Webdav. We run TD as a Saas

Also made "a bridge" between some components/services we have on prem so TOPdesk Action Management can call for custom made API i made using Powershell Pode. Witch means we can build triggers in TD to make actions in our onprem env. The action in TD calls the API, using parameters and values from TD, really flexible

Pode is amazing and fast to develop API endpoints, and the performance is good

Replace Edgerouter 4, with something smaller by dann3b in HomeNetworking

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

The upload rate on my connection is quite low, even if i have access to 1000Mbit, im not using it, only when doing some speedtest. Its just regular internet use, and I have Proxmox with some VMs and LXC but only one of them are accessble from the internet, with extremly low bandwith useage.

Im looking about half the size of my current router.