5,660 reputation
1327
bio website ebgreen.wordpress.com
location St Louis, MO
age 46
visits member for 5 years, 4 months
seen 21 hours ago
Swiss army knife of the IT world. Jack of all trades and master of none.

Dec
9
comment What's the difference between Remove-WindowsFeature and Uninstall-WindowsFeature?
I voted to move this to ServerFault.com. I feel it is more likely that you will run into people that have used both methods there.
Dec
9
answered Loop through files and remove part of filename
Nov
13
comment Cannot change directory with cd in DOS using Win7
Not really. CD is not a native command in powershell. It is an alias to Set-Location which while similar to CMD's CD is not an exact replica and was never intended to be an exact replica.
Nov
12
comment Windows Script Host
So there is something in your code that causes something to happen. You want us to tell you what part of your code is doing it but not tell us what your code is. Like I said. I suspect that one of those environment variables has something in it that is causing WSH to pop. That is all that can be said based on what you posted. Basically if the environment variable just has text that you want to display you should use Echo. Otherwise cmd will try to execute it as a command.
Nov
12
comment Windows Script Host
I suspect that this is not all of your code because you are referencing environment variables that you don't define in the code. My suspicion is that one of your environment variables has something in it that is causing WSH to be called.
Nov
12
comment Windows Script Host
You can edit your question and add it
Nov
12
comment Windows Script Host
No. If the batch file is what is running that causes the behavior you see then we need to see that code
Nov
12
comment Windows Script Host
To tell you what your code is doing we need to actually see the code it turns out.
Nov
5
comment How to easily locate photo opened in Windows 8.1 Photo App
'My daughter is scrolling through all photo's we have...' Thoght this was going to go a completely different direction...
Nov
5
comment Restart-Computer and hold script
Yes, definitely split it into two separate files or put the pre reboot code and post reboot code into functions then call the proper function based on a command line parameter.
Nov
4
comment Restart-Computer and hold script
Unless you are doing something to cause it to restart, the script will not restart after the reboot anyway. So, just take all the code after the reboot out. If you are causing the script to restart the script after the reboot then you should be restarting it with a command line parameter that indicates it is post reboot and execute code based on the presence of that parameter.
Nov
3
comment PowerShell issues with spaces in directory names
Errors do not expand variables. So that error indicates that the path is in the code as a string literal. Put quotes around it in the code.
Oct
30
comment How do I open a command prompt as a regular user (not an adminstrator)?
So it sounds like you are logged into the machine with an account that has admin priveleges.
Oct
29
answered Is there any way to run an application as another currently logged user without needing its password?
Oct
29
comment GnuWin32 / sed unexpected behavior in Powershell
It is going to be an encoding issue in the environment. One way to avoid it would be to use Out-File to put the output into a file with whatever encoding works then read the file back out to sed.
Oct
29
comment GnuWin32 / sed unexpected behavior in Powershell
Why not just use powershell for the whole thing? What is the ultimate goal?
Oct
28
comment Benefits of Office 365 over free OneDrive
this question will have primarily opinion based answers and is off topic for superuser.
Oct
27
comment How many partitions in lan computer
Type this at a powershell prompt: Get-help Get-WMIObject -detail
Oct
27
comment How many partitions in lan computer
Just anywhere in a powershell prompt
Oct
27
comment How many partitions in lan computer
Edited it to let you do it remotely