life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
its okay when I was testing the fix I kept running against the local copy of the script my admin account could access
while editing the copy of my script in my normal account's onedrive
I was all, "what, why aren't these changes doing anything????"
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
It returns the hours twice for every user with configured login hours. I had to dump it into notepad++ instead of excel to see what the hell was going on, but I was getting way more 1s and 0s than I was day/hour columns. Initially it was because copy/paste couldn't handle the length of the line, but it turned out there were just twice as many 1s and 0s as there should have been, and the first set wasn't separated from the second set by a comma.
This is how it dumped raw out of the CSV, username changed
So it actually does finish properly without that superfluous comma you had to remove, then it dumps all the days and hours out again, but WITH the comma. The two are separated by a carriage return as well.
EDIT Hey lets change that from code to spoiler so it's actually legible.
its okay when I was testing the fix I kept running against the local copy of the script my admin account could access
while editing the copy of my script in my normal account's onedrive
I was all, "what, why aren't these changes doing anything????"
This is sorta what I was doing. Local copy on my laptop, copy on the server i'm using on the physical console next to me, had them open in notepad++ and in the ISE, forgetting which I was changing where and if it was open or not and was overwriting by saving on the other machine...
#replace
$Hours -replace ".$" #some hacky bullshit to get rid of that last comma
#with
$Hours = $Hours -replace ".$" #some hacky bullshit to get rid of that last comma
I (for some reason) thought the replace operator modifies the string in the variable, but it doesn't, it just outputs a new string
so it was outputting the string without the trailing comma unexpectedly, then when it did the actual output it spat out the original unmodified string >_<
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Its no big deal at this point, I got my output, converted the text to columns and just manually chopped off the repeat columns from the resulting excel sheet. Prettied it up with some table formatting, gave it to the manager who wanted it and told them that was as good as it gets.
It is kinda funny and frustrating when those seemingly innocuous requests turn into a pretty fair pain in the ass. Like, in an enterprise sized environment, there's legitimately no way to get this sort of report in a digestible format. Even in this environment (like 100accounts, about half of which are actually configured for login hours) it's still an unwieldy bitch. Usually dumping info out of AD isn't a big deal, but this specific function is really messy.
0
KakodaimonosCode fondlerHelping the 1% get richerRegistered Userregular
Well, one of our DBAs just managed to run this on a production database.
DELETE FROM transactions WHERE transactionID IN (SELECT transactionID FROM transactions)
Why is it that when a file server is running out of space, it's always the fault of like 3 people.
TWENTY THREE FUCKING GIGABYTES OF PST FILES???
yeah c'mon people
put that shit up in your O365 account
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
So uh.
Had a client (a legacy one, a Catholic school) get an odd version of ransomware on their mail server.
I say odd because it didn't propagate across the entire network.
So, we blow out the entire thing by removing the infected drives, put in some clean ones, and right in the middle of me installing Exchange server, I get booted.
I log back in immediately and apparently interrupted someone copy/pasting a thing called "vpn.exe"
None of the other tech companies they deal with were logging in that day, neither was anyone at the school.
So, yeah, passed that shit on up the ladder to a security company. That's outside of my wheelhouse.
in case you were wondering how my morning was going I just spent 10 minutes making a bunch of edits to a backup job then accidentally hit cancel instead of ok.
I have 13GB across....10 files but they are all local. I've been disciplined by old Outlook issues/concerns not to keep *anything* in my Inbox anymore. Of course now it's a non-issue wrt Inbox size, but I've already been conditioned to move things.
I know for certain that I'm one of the more disciplined people about this practice, as coworkers that sit near me typically have over 2000 emails in their inbox. If mine goes above 200, I get OCD ticks.
Had a client (a legacy one, a Catholic school) get an odd version of ransomware on their mail server.
I say odd because it didn't propagate across the entire network.
So, we blow out the entire thing by removing the infected drives, put in some clean ones, and right in the middle of me installing Exchange server, I get booted.
I log back in immediately and apparently interrupted someone copy/pasting a thing called "vpn.exe"
None of the other tech companies they deal with were logging in that day, neither was anyone at the school.
So, yeah, passed that shit on up the ladder to a security company. That's outside of my wheelhouse.
Windows servers by default allow 2 RDP sessions, so being kicked out and/or connecting back to an existing session means someone else was using your exact same credentials. AKA, your account has been compromised.
Just remember that half the people you meet are below average intelligence.
I have 13GB across....10 files but they are all local. I've been disciplined by old Outlook issues/concerns not to keep *anything* in my Inbox anymore. Of course now it's a non-issue wrt Inbox size, but I've already been conditioned to move things.
I know for certain that I'm one of the more disciplined people about this practice, as coworkers that sit near me typically have over 2000 emails in their inbox. If mine goes above 200, I get OCD ticks.
I have more shit to do than manage my inbox I guess. Alternately: I'm too lazy. This is more likely. It's the fucking wild west in there. 4000 items. Most of the automata gets shunted off to sub folders and ignored, but everything that came from someone with a pulse typing it out just kinda hangs out in a big-ol' fuckpile.
Oh you're not wrong, and I'm certain you deal with a higher volume of messages than I do. I'd say about 10GB of those files is stuff I will honestly never look at again.
Which reminds me, I can probably delete all those Sent files I have from before 2015.
yeah I only sort things out of my generic inbox folder if they're either various spam i'm filtering out with a rule (ticket notifications, fedex updates, etc), or they're emails with specific instructions I think i'll go back to someday and will be hard to search for*
everything else stays in my inbox
they aren't unread at least!
*those go into a folder under my account level named "Cabinet", an homage to my very first job, where they had Groupwise
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
yeah I only sort things out of my generic inbox folder if they're either various spam i'm filtering out with a rule (ticket notifications, fedex updates, etc), or they're emails with specific instructions I think i'll go back to someday and will be hard to search for*
everything else stays in my inbox
they aren't unread at least!
*those go into a folder under my account level named "Cabinet", an homage to my very first job, where they had Groupwise
There may be 300 unread items in my inbox.
There would probably be more but sometimes I get tired of looking at the number and I right click and mark all as read.
I've had to block a lot of domains recently, somehow people are getting ahold of my email and asking me to buy shit.
It's all local too, like none of it is random nigerian princes. It's all companies that exist in syracuse and they want me to buy their garbage they're selling. And I can find the sales person on linkedin working for them too.
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
We've been seeing those too, lots of dev companies email our support all the time and some of our clients are getting random emails about advertisement space. Very easy way to get yourself blocked or blacklisted.
Because if you're going to attempt to squeeze that big black monster into your slot you will need to be able to take at least 12 inches or else you're going to have a bad time...
I'm a big fan of security, but there comes a point where you've locked yourself down so much that basic program functions can't basically function programs anymore because you're up every single network packet's asshole with two hands and a flashlight.
I'm a big fan of security, but there comes a point where you've locked yourself down so much that basic program functions can't basically function programs anymore because you're up every single network packet's asshole with two hands and a flashlight.
I apologize for nothing.
every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.
I've had to block a lot of domains recently, somehow people are getting ahold of my email and asking me to buy shit.
It's all local too, like none of it is random nigerian princes. It's all companies that exist in syracuse and they want me to buy their garbage they're selling. And I can find the sales person on linkedin working for them too.
Sounds like your email got onto a business registry somewhere!
Posts
I added a conditonal in the last block:
$Users | ForEach-Object { $FullName = $_.Name $UserName = $_.SAMAccountName $line = "" $line += "`"$FullName`"," $line += "`"$UserName`"," if ($_.LogonHours) { $line += (OctetToHours $_.LogonHours) } else {$line += "no hours found"} $line | Out-File $CSVpath -Append }fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
EDIT: Hang on I might have fucked something up.
EDIT THE SECOND: I did fuck something up. It worked fine.
:bro:
while editing the copy of my script in my normal account's onedrive
I was all, "what, why aren't these changes doing anything????"
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
@Aioua
It returns the hours twice for every user with configured login hours. I had to dump it into notepad++ instead of excel to see what the hell was going on, but I was getting way more 1s and 0s than I was day/hour columns. Initially it was because copy/paste couldn't handle the length of the line, but it turned out there were just twice as many 1s and 0s as there should have been, and the first set wasn't separated from the second set by a comma.
This is how it dumped raw out of the CSV, username changed
So it actually does finish properly without that superfluous comma you had to remove, then it dumps all the days and hours out again, but WITH the comma. The two are separated by a carriage return as well.
EDIT Hey lets change that from code to spoiler so it's actually legible.
This is sorta what I was doing. Local copy on my laptop, copy on the server i'm using on the physical console next to me, had them open in notepad++ and in the ISE, forgetting which I was changing where and if it was open or not and was overwriting by saving on the other machine...
fukkin d'oh
I (for some reason) thought the replace operator modifies the string in the variable, but it doesn't, it just outputs a new string
so it was outputting the string without the trailing comma unexpectedly, then when it did the actual output it spat out the original unmodified string >_<
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
It is kinda funny and frustrating when those seemingly innocuous requests turn into a pretty fair pain in the ass. Like, in an enterprise sized environment, there's legitimately no way to get this sort of report in a digestible format. Even in this environment (like 100accounts, about half of which are actually configured for login hours) it's still an unwieldy bitch. Usually dumping info out of AD isn't a big deal, but this specific function is really messy.
:bigfrown:
oh no
EDIT: Also you typo'd and he's an ex-DBA, right?
TWENTY THREE FUCKING GIGABYTES OF PST FILES???
yeah c'mon people
put that shit up in your O365 account
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Planescape Torment was a classic, man.
Get a bigger file server, obviously.
I have the storage to give but just throwing disk at it doesn't teach them anything.
It does if you have good aim and a good arm.
Not with that attitude it doesn't!
Had a client (a legacy one, a Catholic school) get an odd version of ransomware on their mail server.
I say odd because it didn't propagate across the entire network.
So, we blow out the entire thing by removing the infected drives, put in some clean ones, and right in the middle of me installing Exchange server, I get booted.
I log back in immediately and apparently interrupted someone copy/pasting a thing called "vpn.exe"
None of the other tech companies they deal with were logging in that day, neither was anyone at the school.
So, yeah, passed that shit on up the ladder to a security company. That's outside of my wheelhouse.
I know for certain that I'm one of the more disciplined people about this practice, as coworkers that sit near me typically have over 2000 emails in their inbox. If mine goes above 200, I get OCD ticks.
Windows servers by default allow 2 RDP sessions, so being kicked out and/or connecting back to an existing session means someone else was using your exact same credentials. AKA, your account has been compromised.
I have more shit to do than manage my inbox I guess. Alternately: I'm too lazy. This is more likely. It's the fucking wild west in there. 4000 items. Most of the automata gets shunted off to sub folders and ignored, but everything that came from someone with a pulse typing it out just kinda hangs out in a big-ol' fuckpile.
Screw it. There's a search feature.
Which reminds me, I can probably delete all those Sent files I have from before 2015.
everything else stays in my inbox
they aren't unread at least!
*those go into a folder under my account level named "Cabinet", an homage to my very first job, where they had Groupwise
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
There may be 300 unread items in my inbox.
There would probably be more but sometimes I get tired of looking at the number and I right click and mark all as read.
the "no true scotch man" fallacy.
It's all local too, like none of it is random nigerian princes. It's all companies that exist in syracuse and they want me to buy their garbage they're selling. And I can find the sales person on linkedin working for them too.
Look.
I'm a big fan of security, but there comes a point where you've locked yourself down so much that basic program functions can't basically function programs anymore because you're up every single network packet's asshole with two hands and a flashlight.
I apologize for nothing.
the "no true scotch man" fallacy.
Sounds like your email got onto a business registry somewhere!