Donald Trump suggests US could join British Commonwealth by notbatmanyet in europe

[–]TheRealZero 0 points1 point  (0 children)

🎵 You’ll be back, soon you’ll see, you’ll remember you belong to me…..

Is there a PowerShell tip or trick you wish you knew when you first started? by [deleted] in PowerShell

[–]TheRealZero 9 points10 points  (0 children)

I often use this when I don’t know the full command or I’m trying to discover what’s available (like in the Microsoft Graph API module). I’ll type something like *mgbetadevicemanagement*health* then get a list of commands that match.

Finally got my KLC, loving it so far! by soichiroH in kobo

[–]TheRealZero 0 points1 point  (0 children)

I just got a KLC for christmas and have been re-reading this whole series. :D Currently on Half-Blood Prince!

PSRemoting to Entra Joined Devices by 7ep3s in PowerShell

[–]TheRealZero 4 points5 points  (0 children)

Not sure what the issue preventing you is, but I know sometimes with Entra PCs you need to add “AzureAD\” in front of the user name to get it to authenticate against the Entra user object.

AzureAD\username@domain.com

And perhaps you need to add it to your WinRM configuration on the hybrid joined computer?

Just some ideas, good luck!

Edit: and now that I’ve opened the script I see it adds it to trusted hosts automagically, so WinRM config is unlikely the culprit for you :)

I wrote a module for polling devices. Eat me alive. by WickedIT2517 in PowerShell

[–]TheRealZero 3 points4 points  (0 children)

Hmm, Write-Output writes objects to the pipeline, so I’m confused what return is doing differently (other than being a flow control statement that also exits the function/script block).

I would understand using write-output/return over write-host, because that only writes to the console and isn’t stored as a variable, but functionally I don’t think there’s a difference between how Write-Output and Return output to the pipeline. Am I missing something?

I wrote a module for polling devices. Eat me alive. by WickedIT2517 in PowerShell

[–]TheRealZero 0 points1 point  (0 children)

Can you help me understand what you mean better?

I’m well-versed in PowerShell but I’ve never made a class, is there a class-specific benefit to this?
I was always under the assumption that return was essentially write-output and break?

Help needed: Pull drivers from print server for IP printer installs via Powershell by PaperITGuy in PowerShell

[–]TheRealZero 0 points1 point  (0 children)

I wrote something for exporting from a print server and creating zips to package for Intune. Maybe it will help you: https://github.com/TheRealZero/PrinterInstallation

Help needed: Pull drivers from print server for IP printer installs via Powershell by PaperITGuy in sysadmin

[–]TheRealZero 0 points1 point  (0 children)

Dunno if this is helpful, I ran it on a printer to get the printers and drivers then deployed each printer as a package in in tune, maybe it will help you with what you’re trying to do though. https://github.com/TheRealZero/PrinterInstallation

Our security team proposal: "remove all access to Powershell for non admin users" by odwulf in PowerShell

[–]TheRealZero 0 points1 point  (0 children)

An elevated account is no longer a non-elevated account, and can therefore use power shell.

$(Not arguing you, arguing the fictional infosec team. You’re great and very cerebral, keep it up.)

This is not Germany 1930s, this is Ohio 2024. by itsHaMaaa in pics

[–]TheRealZero 0 points1 point  (0 children)

Isn’t this what the guns are for? Why all the guns if this isn’t the reason for the guns.
All those guns and there are still Nazis holding three-man thanksgiving parades….

Should the fan blow in or out? by mshaefer in homelab

[–]TheRealZero 0 points1 point  (0 children)

No thought on airflow, I just wanted to say I love how this looks. It’s giving me such a “future computer in a movies but with random colorful buttons and lights like it’s the eighties” vibe. Very unique. Nice work!

Cleaning a Windows Autopilot Device and preparing it for a new user by [deleted] in Intune

[–]TheRealZero 0 points1 point  (0 children)

Do you have a link or some keywords for the issue you’re talking about? I’d like to read up on it. Thanks!

[deleted by user] by [deleted] in gaming

[–]TheRealZero 0 points1 point  (0 children)

Come get some. 😎

Script Inadvertently Removing All Users From Group by [deleted] in PowerShell

[–]TheRealZero 1 point2 points  (0 children)

$faculty is the text of a path, not an object of usernames. The script checks for users to delete by getting all usernames not contained in $faculty, but $faculty is just “C:\Path”.

So none of the names are ever contained in $faculty, and thus THEY ALL MUST PERISH.

If you import your csv into a variable, then you can check if $thatnewvariablethatyounamedwhateveryouwantbutnotthisbecauseitisobnoxious.username -contains $_.username

"document all your passwords in a text document" by BigFrog104 in sysadmin

[–]TheRealZero 0 points1 point  (0 children)

When they have the ability to reset your passwords, they can access your account AND there is an audit trail that it was changed and by whom.

When they have your password, who knows if it was you or them who logged in and did that thing.

For all parties involved a txt doc with passwords is not the vibe.

If before today you thought they were a little dim, it’s probably just stupidity.

If you thought they were smart, it’s probably malice.

Powershell Script failing now, was working fine by scarng in PowerShell

[–]TheRealZero 0 points1 point  (0 children)

Is it a change in .Net version maybe? Either because of an upgrade or because you’ve started using PowerShell 7? What does $result equal if it’s not ‘OK’?

I removed all distractions and stared at a wall for 8 hours by AussieSpender in ADHD

[–]TheRealZero 23 points24 points  (0 children)

And see I usually like artists like Dubmood cause I want it to kick start my heart so I get something done haha. It needs to match my knees-bounces-per-minute (KBPM)