PowerShell PackageManagement (OneGet) - Install Apps from Command Line
-
You have not installed Chocolatey repositories?
Do this, list numbers referring to screenshot below:
- Check that you have Unrestricted script execution policy, cmdlet is Get-Executionpolicy. If not use Set-Executionpolicy Unrestricted to change it if working on an elevated PS, or Set-Executionpolicy Unrestricted -Scope CurrentUser if working with non-elevated PS
- Add Chocolatey provider with Get-PackageProvider Chocolatey, accept it by clicking Yes in dialog which will be shown
- Check that Chocolatey and NuGet providers were added (adding Chocolatey automatically adds NuGet)
- Now you should be able to see all package sources
I was following the tut and chocolatey is suppose to come later in the process. I will give it another go tonight. Will let you know. Thanks!
-
-
I was following the tut and chocolatey is suppose to come later in the process. I will give it another go tonight. Will let you know. Thanks!
That must mean that I have explained things in tutorial in wrong order, will fix it tonight when finished with what I am doing now. Thanks for pointing that out.
On a lighter note, I know you have been thinking that I am perfect but as you can see, although as perfect as possible for a human being, even I make mistakes . This now is the fifth mistake I have made, the four first ones being my ex-wives.
-
Hahaha... good one Kari....
I never made that mistake with my wife. It took us 8 years before we decided to get married despite her parents' disapproval. I had plenty of time to decide. :)
Anyway, I got stuck in Part 2. Chocolatey is Part 3. :)
-
Hahaha... good one Kari....
It was not a joke...
It took us 8 years before we decided to get married despite her parents' disapproval. I had plenty of time to decide. :)
I was 22 when I divorced first time, our kids being then 2 years the older son and 6 months the younger son. You have to start early to learn how to do it!
Anyway, I got stuck in Part 2. Chocolatey is Part 3. :)
I'm from Finland, we count as 1, 3, 2, 4, 5, and so on.
-
-
@badrobot, once more thanks for pointing out an error in the tutorial. I have now edited the step 2.3 by adding a note:
2.3) Some cmdlets can be used without parameters or piping their output to other cmdlets. For instance to check which repositories we have available we can use the OneGet cmdlet
Get-Packagesource (
#2 in screenshot above in step 2.2).
Note
Notice that as you have not installed any package providers yet, the cmdlet
Get-Packagesource might give an error if given now. Install the provider
Chocolatey as told in
Part Three before using this cmdlet.
Anyway, did you get OneGet working?
-
@
badrobot, once more thanks for pointing out an error in the tutorial. I have now edited the step 2.3 by adding a note:
Anyway, did you get OneGet working?
You're welcome Kari. I didn't get the chance to do it again yet. But I will definitely get back to it. Will let you know.
EDIT
@Kari ,
Yeah, I got OneGet to work but some packages were not found like putty, handbrake, etc. But basically I got it to work. I just need to find the right packages that work.
Thanks for your assistance. Much appreciated.
Thanks for the rep, too! :)
Last edited by badrobot; 12 Apr 2015 at 14:26.
-
Kari, Need Help Again
If I try Find-Package with 10-12 packages I get the following as indicated in attachment. If I reduce the number of package items to 7-8, no errors and then I can install those items. Any work arounds or am I stuck with just installing fewer packages at a time?
Rich
-
That is a very rare error message, I have ever only seen it before when trying to use PowerShell to run a set of commands on several virtual machines running on a VMWare vSphere ESXi host. I will set up a test machine later tonight and test this further.
Only help I can find from the Internet involves some coding. I will take this up in the next OneGet community meeting, in the mean time please do not install more than 8 apps at the time, if this amount can be installed without an error as you mentioned.
-
@Rich, I tested it on a test rig. I get the Find-Package and Install-Package commands to work with 10 apps, the 11th causes the WaitHandler error.
-
-
@
Rich, I tested it on a test rig. I get the Find-Package and Install-Package commands to work with 10 apps, the 11th causes the WaitHandler error.
Thanks very much for your testing and help. I'll keep watch for further developments.
Rich
Tutorial Categories