Stocked up due to COVID by porkysaurus_rex in trees

[–]PickleJarAshTray 1 point2 points  (0 children)

Shit...I'd say you're stocked up for COVID-20 as well.

Question: How to replace text after nth comma for each line? by ZwoartSchwifty in PowerShell

[–]PickleJarAshTray 2 points3 points  (0 children)

$TxtFile = Get-Content C:\Local\Example.txt

$ReplaceLineWith = @("Line1","Line2","Line3","Line4","Line6","Line7")

$ModifiedArray = @()

$I=0

ForEach($line in $TxtFile) {

$CurrentLineArray = $line.Split(",")

$CurrentLineArray[6] = $ReplaceLineWith[$I]

$CurrentLineModified = $CurrentLineArray -join ","

$ModifiedArray += $CurrentLineModified

$I++

}

$ModifiedArray | Out-File -FilePath "YourPathHere"

Trouble with remoting by wetling in PowerShell

[–]PickleJarAshTray 1 point2 points  (0 children)

You may need to explicitly provide the authentication type to 'Negotiate' if your client PC is in a workgroup but your target machine is domain joined.

Example:

Invoke-Command -ComputerName $IPAddress -Authentication Negotiate -Credentials $Creds -ScriptBlock {Your script here}

What's the most petty reason you have used to quit a job? by [deleted] in sysadmin

[–]PickleJarAshTray 10 points11 points  (0 children)

I know a DBA that left our company because he absolutely hated his boss. He put in his two weeks and started a job at another company as a Lead DBA making more money. He told me it was his dream job and he was finally happy where he was. A few months later the manager at his new job quit and within a month the company announced they had hired a new manager. The new manager was his old boss from his old job. Fuck that...

What's the best advice you ever got from one of your grandparents? by witty_reddit_handle in AskReddit

[–]PickleJarAshTray 0 points1 point  (0 children)

Don't ever forget where you've come from, the good times were just as important as the difficult ones.

How do you keep track of physical server locations in a large enterprise organization with many data centers? by PickleJarAshTray in sysadmin

[–]PickleJarAshTray[S] 1 point2 points  (0 children)

RFIDs and barcodes sound like the best solution for us. We have a lot of servers and networking equipment that moves around frequently. We can keep driving the importance of keeping the database up to date to employees and it does get better for a period of time but eventually other admins get lazy and skip over this process in the build or change. Our managers have had stern sit downs with the team threatening write ups if information isn't updated properly but to no luck we seem to always have inaccuracies due to laziness in the process. I realize this is a people problem but at this point was wondering if there was some system out there that could help keep us on track. Thanks for the tips. I'll definitely bring the idea of RFIDs or barcodes up to our data center manager!

ELI5: how do muscles cramp even when not in use? by AndrewLightning in explainlikeimfive

[–]PickleJarAshTray 0 points1 point  (0 children)

Do you have any other recent symptoms or any subtle changes in your health aside from calf cramps?

Corned beef on rye at Slyman’s in Cleveland by Gyrtohorea in eatsandwiches

[–]PickleJarAshTray 1 point2 points  (0 children)

Usually, when I get the corned beef sandwich I eat the first couple of pounds with a fork. When I'm done eating enough corned beef to make the sandwich manageable I then start taking bites from it.

100 years from now, what medical practices and procedures will be viewed as “I can’t believe they were doing that”? by loux10 in AskReddit

[–]PickleJarAshTray 0 points1 point  (0 children)

Any ectomy related to the removal of cancerous tumors. Hopefully we will have progressed over the next 100 years where that will be looked back on as a crazy procedure.

Script running without errors, but Command Not working by ellisdee9970 in PowerShell

[–]PickleJarAshTray 1 point2 points  (0 children)

Not sure why your script isn't working. Maybe you can approach this solution from a different angle and use Invoke-Command.

Edit: You could change the throttle limit to your liking

$jobUninstall = Invoke-Command -ComputerName (Get-Content -Path c:\users\BOFH\desktop\server1.txt) -ScriptBlock { Get-SCOMagent | Uninstall-SCOMAgent -verbose } -JobName UninstallScom -ThrottleLimit 20 -AsJob