F5F Stay Refreshed Software Operating Systems Various questions about the PowerShell

Various questions about the PowerShell

Various questions about the PowerShell

H
HudsonNZ
Member
63
07-02-2016, 10:00 AM
#1
I acknowledge being delayed at the start. My experience with COMMAND.COM and later cmd has grown solid over the years. I expanded cmd by adding wrappers such as ConEmu and PyCmd, yet it remained rooted in cmd functionality. I experimented with Microsoft's Monad (later PowerShell) but didn't appreciate its benefits for my needs, so it slipped from my memory. Recently, PyCmd experienced frequent crashes, prompting me to seek a more stable replacement. While exploring alternatives—avoiding the oddities of Cygwin—I discovered PowerShell has seen significant improvements, particularly when integrated with ConEmu, which supports it natively. Testing PowerShell alongside Hamilton C shell revealed several drawbacks I still face. Perhaps some of you can assist? Is there a method to bypass typing . before any file operation in the current folder? For instance, if I'm in a directory with dostuff.cmd, PowerShell insists on using .dostuff.cmd instead of the original, which worked smoothly with cmd. Every time I launch PowerShell, it displays execution times for my config files. Can I turn that off? Is there a way to speed up PowerShell’s startup? Even without a new machine, I’d prefer not to wait several seconds before typing commands. A final question for those who tried both: Are there features in PowerShell that outperform Hamilton C shell (except its free status)?
H
HudsonNZ
07-02-2016, 10:00 AM #1

I acknowledge being delayed at the start. My experience with COMMAND.COM and later cmd has grown solid over the years. I expanded cmd by adding wrappers such as ConEmu and PyCmd, yet it remained rooted in cmd functionality. I experimented with Microsoft's Monad (later PowerShell) but didn't appreciate its benefits for my needs, so it slipped from my memory. Recently, PyCmd experienced frequent crashes, prompting me to seek a more stable replacement. While exploring alternatives—avoiding the oddities of Cygwin—I discovered PowerShell has seen significant improvements, particularly when integrated with ConEmu, which supports it natively. Testing PowerShell alongside Hamilton C shell revealed several drawbacks I still face. Perhaps some of you can assist? Is there a method to bypass typing . before any file operation in the current folder? For instance, if I'm in a directory with dostuff.cmd, PowerShell insists on using .dostuff.cmd instead of the original, which worked smoothly with cmd. Every time I launch PowerShell, it displays execution times for my config files. Can I turn that off? Is there a way to speed up PowerShell’s startup? Even without a new machine, I’d prefer not to wait several seconds before typing commands. A final question for those who tried both: Are there features in PowerShell that outperform Hamilton C shell (except its free status)?

J
jaefrh
Member
180
07-04-2016, 06:47 AM
#2
The path indicates execution from the local directory. If you don’t prefer using ".\", it should be included in the ENVIRONMENT variable. I haven’t run a PowerShell terminal for this purpose before. Is this a particular script you’re executing? Does it contain Measure-Command or a StopWatch feature? Here’s a simple ping script I wrote—no detailed timing output. PowerShell works instantly, similar to cmd. You might have timers in your script. I’ve never worked with hcsh before.
J
jaefrh
07-04-2016, 06:47 AM #2

The path indicates execution from the local directory. If you don’t prefer using ".\", it should be included in the ENVIRONMENT variable. I haven’t run a PowerShell terminal for this purpose before. Is this a particular script you’re executing? Does it contain Measure-Command or a StopWatch feature? Here’s a simple ping script I wrote—no detailed timing output. PowerShell works instantly, similar to cmd. You might have timers in your script. I’ve never worked with hcsh before.

L
lavamonster530
Junior Member
7
07-05-2016, 03:24 AM
#3
Is there a method to mimic cmd actions for this? Uncertain. All content from your Profile file (Microsoft.PowerShell_profile.ps1, the other one isn’t present) is treated as the standard Chocolatey script. Removing everything doesn’t fix the problem—it still runs slowly and shows load times. I didn’t realize that. Don’t worry, I assumed someone would know.
L
lavamonster530
07-05-2016, 03:24 AM #3

Is there a method to mimic cmd actions for this? Uncertain. All content from your Profile file (Microsoft.PowerShell_profile.ps1, the other one isn’t present) is treated as the standard Chocolatey script. Removing everything doesn’t fix the problem—it still runs slowly and shows load times. I didn’t realize that. Don’t worry, I assumed someone would know.

T
timo_1892
Senior Member
715
07-09-2016, 01:37 PM
#4
They usually store scripts in a directory included in your system environment variables, such as C:\Windows\System32 or adding a folder like D:\Scripts. It seems related to Chocolatey, which does display execution durations. You don’t need to test it locally right now.
T
timo_1892
07-09-2016, 01:37 PM #4

They usually store scripts in a directory included in your system environment variables, such as C:\Windows\System32 or adding a folder like D:\Scripts. It seems related to Chocolatey, which does display execution durations. You don’t need to test it locally right now.

T
TjardaR
Junior Member
38
07-09-2016, 05:34 PM
#5
It's frustrating. However, I appreciate your effort. Perhaps adjustments won't work unless we remove the Chocolatey entries from the Profile file.
T
TjardaR
07-09-2016, 05:34 PM #5

It's frustrating. However, I appreciate your effort. Perhaps adjustments won't work unless we remove the Chocolatey entries from the Profile file.