Windows 10: How to have a command run when opening PowerShell?

Discus and support How to have a command run when opening PowerShell? in Windows 10 Software and Apps to solve the problem; Hi there everyone. I did a quick search of the forums but didn't see anything covering this. I recently found this program called winfetch that... Discussion in 'Windows 10 Software and Apps' started by RebornJumpman, Feb 23, 2021.

  1. How to have a command run when opening PowerShell?


    Hi there everyone. I did a quick search of the forums but didn't see anything covering this. I recently found this program called winfetch that displays the Windows logo in ASCII along with system info. It's a single command to run, and I was wanting to configure PS 7 to run it automatically when first opened. In Linux and WSL you can do this by editing the bashrc file in the home directory, but I'm new to PowerShell and am not sure of how to get this to work. Any help would be greatly appreciated!

    :)
     
    RebornJumpman, Feb 23, 2021
    #1
Thema:

How to have a command run when opening PowerShell?

Loading...
  1. How to have a command run when opening PowerShell? - Similar Threads - command run opening

  2. When I run powershell as an admin I'm getting the following when running commands.

    in Windows 10 Gaming
    When I run powershell as an admin I'm getting the following when running commands.: PS C:\windows\system32> dism/online/cleanup-image/checkhealth dism/online/cleanup-image/checkhealth : The term 'dism/online/cleanup-image/checkhealth' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if...
  3. When I run powershell as an admin I'm getting the following when running commands.

    in Windows 10 Software and Apps
    When I run powershell as an admin I'm getting the following when running commands.: PS C:\windows\system32> dism/online/cleanup-image/checkhealth dism/online/cleanup-image/checkhealth : The term 'dism/online/cleanup-image/checkhealth' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if...
  4. Powershell can't run appx commands

    in Windows 10 BSOD Crashes and Debugging
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  5. Powershell can't run appx commands

    in Windows 10 Gaming
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  6. Powershell can't run appx commands

    in Windows 10 Software and Apps
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  7. How to always run Command Prompt and PowerShell as Administrator

    in Windows 10 News
    How to always run Command Prompt and PowerShell as Administrator: [ATTACH]How often do you need to run the Command Prompt or PowerShell as administrator on your Windows 10? For me what happens is, I often forget to right-click and select Run as administrator and I know it only when I get the error in running any command as shown in the...
  8. Command Prompt, Powershell and run command not opening from search function in Start.

    in Windows 10 Ask Insider
    Command Prompt, Powershell and run command not opening from search function in Start.: So, Today when I was trying to open command prompt to check battery report. It didn't open. At first-class I thought this was due to booting lag. But even after some time it didn't work. I googled and tried some fixes- 1. Changed environment variables(C:\Windows\SysWow64) 2....
  9. Run Multiple Commands In Powershell?

    in Windows 10 Performance & Maintenance
    Run Multiple Commands In Powershell?: Hi, I have three drives in my PC. Two of them are SSD's and the third one is a mechanical HDD. I like to optimize them using Powershell. However, as it stands now. I'm running the commands separately for each of my drive, i.e. 1.) Optimize-Volume -DriveLetter C -ReTrim...
  10. Run Multiple Commands In Powershell?

    in Windows 10 Performance & Maintenance
    Run Multiple Commands In Powershell?: Good job, @lx07. Of course, you had the benefit of knowing the OP wanted to run the same command on 3 targets. Had I been armed with that same information, I might have made that same suggestion, too. That's why we're better working together than working individually. --Ed--