DMT Powershell Help

(Calvin Krusen) #41

It might not show on Nancy’s post (does show clearer in the screen shot)

But the inner quotes need t be escaped with a grave

$SourcePath ="`"C:\Users\NHoyt.CHEMPUMP\Desktop\Ready to Attach1\DMTSNAtts.txt`""

(Rick Bird) #42

@Banderson Just curious, what version of Windows and PowerShell are you using?
I ask because I have a client on WS 2008R2 and they were having all kinds of inconsistencies with the code I posted on my blog and it ended up being that their PowerShell was an older version and somethings either did not work at all or some parsing functions did not exist.
In most cases we found workarounds to fit that version.

(Rick Bird) #43

Just saw this, not tested or anything, just thought it might be applicable some how:

Now this is at the PowerShell prompt but notice how they have to deal with the space by using a backtick right before the space? Maybe that’s all you need to do?

Another example:

(Mark Wonsil) #44

Quick security note: encourage PowerShell users to upgrade. Older versions of PowerShell have security issues.

(Brandon Anderson) #45

version: whatever comes with windows 10. I don’t see how to check the version (I’m a newbie to powershell)

I’ll try the backtics when I get a chance. Thanks.

(Brandon Anderson) #46

does this mean I’m on version 1? Is that bad? Looks like I will have to get the new version.


(Brandon Anderson) #47

This did it. I was just having a really hard time keeping a single quote and a backtick straight. Once I got that it worked.

(fyi The backtick in front of the space did not work, on the version I am on anyways)

(Mark Wonsil) #48

At the prompt, type:


(Brandon Anderson) #49

ok, Mine is the same as yours, so I guess I’m good. :relieved: (off topic, these emojis are crap…)

(Nancy Hoyt) #50

This is mine… (them’s alotta versions)

(Mark Wonsil) #51

Hi Nancy,

You may want upgrade that 2.0 version. Here’s a nice security review for PowerShell.

Mark W.

(Rick Bird) #52

Or upgrade to that latest version of PowerShell… 5.1 … or is 6 out by now?