6
athlon
5y

Christe on a bike, why would anyone sane use PowerShell? I can't even run my own fucking script, because "cannot be loaded because running scripts is disabled on this system". Even tho I used the same script file literally yesterday.

So I'm just gonna use single command to change it. Easy? Well fuck no! Because no one thought that implementing something like "sudo" would be a fantastic idea, so you have to jump between two separate instances of that piecie of shit. Not to mention it takes ages to even load it.

Comments
  • 0
    PowerShell can be run as admin, unless you don't have admin rights to your PC.
  • 1
    Powershell is very hard to deploy across machines you don't control as an admin.
    If an user wants to use PS to improve his workflow, he is usually barred from it.
  • 0
    So what exactly is the purpose of powershell?
  • 1
    @dontPanic A modern object oriented shell scripting language (sorry for the buzzwords).

    Basically it allows automating every Windows task in a sane way (e.g. not using the raw Windows API, vbscript or command line utilities in batch from year 2000 or older).
  • 2
    @sbiewald the problem is, CMD works much faster and doesn't get in the way that much like Power "whoops, can't run that script" Shell
  • 0
    @athlon Besides the initial startup time, what tasks do you do where the speed makes a difference?

    Have you set the execution policy correctly - as other said - from an admin prompt? This should probably eliminate those "not allowed" errors. There are also countless ways to circumvent the execution policy.
  • 3
    @athelon

    Try executing this from an administrative powershell terminal:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

    For those times you need to run something without worrying about the execution policy you can also run this the: bypass
    Option instead of remotesigned

    Sorry I meant to say if you are executing this command to run a ps1 file you can do this too:

    ps > powershell.exe -ExecutionPolicy Bypass -Path “c:\path\to\script.ps1”
  • 2
    @athlon I've been working with powershell a lot lately and have run into about every stupid fuckwit type issue you can imagine. I'd be happy to help out with anything that I've learned from banging my head against the wall if it can help prevent someone else from having to do the same thing. =D
  • 0
    @sbiewald I'm just complaining about initial start time. I admit it's a minor complain, but because of that small delay, I still prefer to use CMD - yes, it isn't as feature packed, yes it's not object oriented, but it is faster to open.

    @zymk yeah I did that today. The weird part is just that the exact same script worked literally yesterday without changing a single bit. On exact same Windows 10 version. On exact same machine. It's not a super complicated script. It's literally just packing 4 files into the .zip archive and removing one .txt file (if exists) and a single folder (if exists)
  • 0
    @athlon About the execution policy: The script location didn't change to a network drive? Windows behaves strangely from network shares sometimes...
  • 0
    So you have a slow computer and don’t understand how Windows security model works, remind me again what that has to do with PowerShell?
  • 0
    @athlon

    You might want to check out ‘profiles’ in powershell. There’s like 4-5 different profiles powershell can load and you may need/want to run:

    ps > $profile

    to get the location of your user profile and then you can update that userprofile with that ExecutionPolicy so everytime you load a new powershell window from your machine as your user you’ll be able to run the scripts without issue
Add Comment