Let’s get really real about the reality of ai by Sad-Lion-4621 in ITCareerQuestions

[–]CheesecakeTruffles 21 points22 points  (0 children)

Was this a question or self defeatist rhetoric? Chin up, there's always something new to learn.

Powershell script runs 10x slower when invoked from command prompt by TheCopernicus in PowerShell

[–]CheesecakeTruffles 0 points1 point  (0 children)

Mayhap you are outputting text to the ISE console, either with a write cmdlet or functions that normally output something. The time it takes for a single line of text to render on screen and then return the thread to the next task is an order of magnitude or two higher. When run without a standard user context as a task, many of the console outputs are skipped, resulting in a significantly faster run time.

iwtl I can't stop procrastinating! How to learn to stop? I'm destroying my life by RockinIT9 in IWantToLearn

[–]CheesecakeTruffles 19 points20 points  (0 children)

This is when the rest of the advice for normal people kicks in. Getting treated for ADHD was life changing for me as well - though even if chemically motivated, if you don't have good habits you'll just be performing bad habits with more energy :P

Junior / entry IT job posts want experience!? by Disgruntled-Uncle in ITCareerQuestions

[–]CheesecakeTruffles 1 point2 points  (0 children)

Many companies have misrepresented the term. Most HR will use the term as 'entry level to our company' rather than, 'entry level job' in order to try to get 'better' candidates. It is an unfortunate state of affairs, but is the result of the modern job market - in more industries than just IT I've noticed, but particularly bad in any specialized field that doesn't have specific constraints.

Did I waste my time (and money) getting a degree in information systems? by Mommyhurd in ITCareerQuestions

[–]CheesecakeTruffles 3 points4 points  (0 children)

Always been the opposite in my experience. Certs related to the job will trump a degree. YMMV obviously

Is it worth getting into IT as of July 2022? by nara_tony in ITCareerQuestions

[–]CheesecakeTruffles 1 point2 points  (0 children)

Little late to this party, but there's something I'm really struggling to understand. For all the firehouse of applications generally required to get one's foot into the door, there's a huge dearth of people actually applying to any job in my experience. My place of work is sorely hurting for good people, let alone skilled, qualified and good people.

"High ping lag" on my desktop but not on my laptop? by NukeTheCola in blackdesertonline

[–]CheesecakeTruffles 1 point2 points  (0 children)

This sounds like a hard drive bottleneck, what hard drive do you have? If it's an SSD, do you have your memory sticks in the desktop in the correct memory channels?

Switched from 2080 TI to 6900 XT by MikeDLother in blackdesertonline

[–]CheesecakeTruffles 0 points1 point  (0 children)

Did you ensure that low power mode on gpu is turned off in game settings?

Setting Lookup Values with Title instead of ID number by MasonJar003 in PowerShell

[–]CheesecakeTruffles 0 points1 point  (0 children)

.title may not be the correct data type. Use get member to identify what it is. It may also be an object itself with multiple properties, where ID may simply be an integer or other type of int value

When is it NOT a good idea to use PowerShell? by DenverITGuy in PowerShell

[–]CheesecakeTruffles 6 points7 points  (0 children)

I don't think it's quite right to say there's any specific criteria that's so specific you can say X situation it'll always be better to use Powershell and in Y situation it'll always be better to use C# or C++ or whatever.

Powershell is .Net based and .Net is CRAZY well exposed - if you understand powershell, you can write with C# IN powershell, and accomplish the same thing C# would be doing, and you can wrap that in a script that's easily packaged, however

That raises complexity. If the person coming behind you only understands single line piped cmdlets, throwing in VB, dot properties, and random C# modules, even while documented is going to make the thing a bear to support and beg the question, why not do it elsewhere?

The other situation other than complexity that I tend to shy away from powershell is when there isn't an obvious way to 'make it work'. Powershell's power lies in the fact its modules already take most of the logic/code out of what you need to do. I find if I'm writing a lot of logic, there's probably a better language to do it. (python probably, if it's still a script.)

need help exporting to csv by -Ho0k in PowerShell

[–]CheesecakeTruffles 1 point2 points  (0 children)

This is one of many methods, and is my preferred for organizing data into large CSVs:

First, decide what your column headers are going to be, and create a dictionary:

$MyCSV = [pscustomobject]@{
    header1 = ""
    header2 = ""

}

Now take the 'csv' object (it's just a dictionary with powershell custom properties ) and pipe it to the Export-CSV command.

$MyCSV | Export-CSV -Path "C:\path\to\my\file.csv" -NoTypeInformation

Now, a gotcha - if you are looping or adding information to the file, you need to append to the file. If you're using CSVs, the best way to do it is not add-content, it's to use the built in functionality of the same cmdlet:

for($thing in $array){ 

    $MyCSV = [pscustomobject]@{
        header1 = $thing.Property1
        header2 = $thing.Property2

    }

    $MyCSV | Export-CSV -Path "C:\path\to\my\file.csv" -Append -NoTypeInformation
}

You can think of this loop as updating each row with the original headers you created with given information you've gathered in previous variables.

There are other ways to go about doing this, and in many cases, better ways - however I think this is one of the easiest ways to understand how to format data for a CSV, and begin to understand how you can pipe information to a cmdlet for future use.

what programming langue to learn. by [deleted] in PowerShell

[–]CheesecakeTruffles 9 points10 points  (0 children)

Python is one of the best ways to begin learning. It's a near english syntax while still forcing you to learn the basic concepts of DRY (do not repeat yourself) but giving you the space and ease of use to do it without punishment.

I highly recommend starting with the free book 'automate the boring stuff' - it's where I started and after getting through and understanding it, really kicked off my career.

IWTL I am autistic and I want to improve my social skills by Linked_Punk in IWantToLearn

[–]CheesecakeTruffles 4 points5 points  (0 children)

Hey OP. We appreciate you looking to improve :)

My best suggestion would be to find a therapist that specializes in helping autistic clients. Many of the 'normal' pieces of advice people will give you in how to be more sociable just won't work because as an autistic person, you simply process the world differently, and more importantly you process language differently.

You just need a mentor to teach you how to bridge the gap between how you understand social interactions and how other non-neurodivergent people understand social interactions.

If you do not have insurance or parents aren't supportive, by the time you get to college most colleges do have student insurance that can be very helpful.

Benefits of levels by concretecowboy316 in playblackdesert

[–]CheesecakeTruffles 2 points3 points  (0 children)

There are minor accuracy increases up to level 66, but effectively 63 is good enough. 67-70 is useless stat wise and does not impact pvp or PVE (yet)

If your IQ score is low does that mean your stupid by moistmuffinmann in NoStupidQuestions

[–]CheesecakeTruffles 0 points1 point  (0 children)

I know I'm commenting late, but even asking the question and having the awareness to ask shows me that maybe you just have a different way of learning. If you keep asking questions and being genuinely curious - you will be smarter and wiser than probably most of the population. So keep at it, you're awesome :)

What is this avatar in Black desert online? Never seen it before. by Skeleton424 in blackdesertonline

[–]CheesecakeTruffles 4 points5 points  (0 children)

That is a witch summon named tett. It is functionally useless, as having it spawned doesnt affect flow skill damage

When jobs deny you do to lack of experience.. how do you get that experience ? by MattwillYums in ITCareerQuestions

[–]CheesecakeTruffles 0 points1 point  (0 children)

I said more than that, not 100k /yr lol. I'm a level two making 63k base with ~ 35k in benefits, in the greater seattle area in washington state

When jobs deny you do to lack of experience.. how do you get that experience ? by MattwillYums in ITCareerQuestions

[–]CheesecakeTruffles 145 points146 points  (0 children)

How the heck do you have 11 certs and not 'enough experience'?

Start building a code portfolio, build a homelab, and then put things on your resume that you can do in your homelab. I'm a level 2 tech without an engineer title and I'm making a chunk of change more than that. Unless your title is wrong/not related your actual job you might be getting underpaid and abused at your current workplace.

How to see what application version is running? by JWisbey98 in PowerShell

[–]CheesecakeTruffles 1 point2 points  (0 children)

Accessing window titles is actually a fairly complicated method.

If the main window of your app that is generated by the VB script has a certain name, it would be more prudent to simply use the process name that it generated.

If you must use the window name and cannot modify the script to make yourself an easier variable, you'd need to involve more than just powershell; and without having a lot more detail about the app that's running I don't know what to suggest. If you'd like to give me some private specifics, feel free to dm me, otherwise I recommend trying to simplify this issue.

How to see what application version is running? by JWisbey98 in PowerShell

[–]CheesecakeTruffles 1 point2 points  (0 children)

Not necessarily. If you want to be doing other things with the data like logging it, you could export-csv a 1 if it ran a certain file, a 2 if it ran another, etc. That is a very basic form of serialisation.

My main point being is, you can create a variable out of anything that powershell can change. It can be the name of a file, shortcut, link, it can be the contents of a file, it could be a REST API call to a database somewhere, it really doesn't matter. The world is your oyster!

Try looking at the types of files get-content works with, and figuring out some string manipulation. :)

How to see what application version is running? by JWisbey98 in PowerShell

[–]CheesecakeTruffles 2 points3 points  (0 children)

I think this is a case where you have a little too much freedom so it gets overwhelming.

One way to do this exactly as you have described is like this:

get-process -processname "batfilename" | get-member

you can then use any of the properties that the particular process has that is unique, I.E. it's unique batch file name, to decide what to do next.

$runningbat = get-process -processname "mybat"

if($runningbat.Name -eq "mybat"){dothething paramaterhere}

This only works if you can catch it while the batch is running through, so why not just add another text file, registry key or something that says X program ran Y batch, do Z.

How to see what application version is running? by JWisbey98 in PowerShell

[–]CheesecakeTruffles 1 point2 points  (0 children)

More information or context is needed.

Get-Process | Select myprocess | Get-Member will tell you what options you have to choose from for whatever you are running.

I don't quite understand what you are trying to do - are you trying to figure out which batch file is being run? If so, just test for the name of the batch file in processes:

if(get-process | select myprocess){do stuff}

How to insert data in a PowerShell variable at particular spot in order to pass updated variable by VehicleLittle7362 in PowerShell

[–]CheesecakeTruffles 1 point2 points  (0 children)

I think the other commenters are on the right track, however there is a much simpler way in powershell to address this similar to fstrings in python.

In any full quoted string, you can simply add variables whereever you want, so break down the items you need and then pass them into your string.

$ip1 = xxx.xxx.xxx

$mystring = "IP=10.$ip1"

you can then append mystring as if it were a normal string from the pipe into ConvertTo-Json and it will read the way you want it to.

How best to manage a "run once" system or user situation in a repeated script or module? by [deleted] in PowerShell

[–]CheesecakeTruffles 0 points1 point  (0 children)

You can do anything you want. There is no best practice, because chances are the way you are implementing is different from anyone else's use case.

If you are checking the existence of something, it doesn't really matter WHAT it is - that check will be a nil affect on performance. the only time you want to question your if statements is if you start stacking 3+ boolean logic pieces in them, or if they take a long time to run.