Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Jilano20396149d(The first problem doesn't sound like a PowerShell issue)
iAmNaN7814149dPowerShell can be run as admin, unless you don't have admin rights to your PC.
kurast266149dPowershell 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.
dontPanic11043149dSo what exactly is the purpose of powershell?
@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.
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”
@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
athlon17894149d@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)
asinglenoob208149dSo you have a slow computer and don’t understand how Windows security model works, remind me again what that has to do with PowerShell?
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
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job