PowerShell PackageManagement (OneGet) - Install Apps from Command Line  

Page 3 of 14 FirstFirst 1234513 ... LastLast

  1. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #20

    My OneGet community meeting this week was cut short and no audio because of the combined forces of Lync 2013 and Win10 Build 9926. Here's the "big catch" from tonight:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2015-02-27_19h26_46.pngPowerShell PackageManagement (OneGet) - Install Apps from Command Line-2015-02-27_19h32_03.png
    I was prepared to discuss these two IMO important modules (Update & Uninstall) more but participating in an audio - video meeting without audio and video is a bit dull so I gave up.

    Next OneGet community meeting on Friday 13th of March at 10 AM PST / 19:00 (7 PM) CET. Meeting link always about 10 minutes in advance at https://twitter.com/PSOneGet.

    Kari
      My Computer


  2. Posts : 803
    10 Pro Preview x64
       #21

    I was thinking of making a PS1 script like this for when the next build comes

    Attachment 13626

    I've made a shortcut to run this Setup.ps1 script as administrator with the target:
    Code:
    %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\adam\OneDrive\Documents\Scripts\Setup.ps1"
    but EMET still prompts for UAC (the others are silent).

    Any ideas? Is this the correct method to install lots of programs in an automated fashion or is there a better way? The -verbose flag and the final "Press Enter" prompt are only temporary to see what is happening.
      My Computer


  3. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #22

    You seem already have the -Force switch so that's not it. Might be that the only way to get EMET installed without the UAC is to disable UAC before the script is run, then enable it later again.

    Other than that you are doing it in a correct way. The use of Grave Accent is a visually pleasing way to divide the command structure to multiple lines, in order to make it easier to read.
      My Computer


  4. Posts : 803
    10 Pro Preview x64
       #23

    Kari said:
    The use of Grave Accent is a visually pleasing way to divide the command structure to multiple lines, in order to make it easier to read.
    I got that from your tutorial actually :) I'm going to stick this on the end of the script and I'll be done.
    PHP Code:
    Enable-WindowsOptionalFeature -FeatureName `
    Microsoft-Hyper-V-All, 
    `
    TelnetClient `
    -Online -All -NoRestart 
      My Computer


  5. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #24

    Good addition. I think I might write a PowerShell scripting tut next, it's a powerful tool.

    BTW, one practical way to make it really automatic without UAC is to boot to Audit Mode (install Windows normally, when it arrives to "Sign in to your MS Account" page after last reboot, press CTRL+SHIFT+F3). Do your customizations in Audit Mode, including app install with OneGet, then end with sysprep /generalize /oobe /reboot /unattend:Z:\YourAnswerFile.xml

    The answer file only needs to contain the CopyProfile tags:

    Code:
    <?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <CopyProfile>true</CopyProfile>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:X:\Sources\install.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> 
    </unattend>
    Installation picks now up where you left it with entering Audit Mode and finalizes the install. Doing it this way has two benefits: first, the apps will be installed for all users as they are copied to Default Profile, and second as the Audit Mode uses the built-in admin account there's no UAC, the rights are granted automatically whatever you install.

    Only problem is that sysprep is "broken" in build 9926 (see my warning about this), hopefully MS get it fixed in the next build.

    Kari
      My Computer


  6. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #25

    For those interested, the PowerShell OneGet Community Meeting starting just now:



    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2015-03-20_18h00_24.png
      My Computer


  7. Posts : 803
    10 Pro Preview x64
       #26

    Kari said:
    For those interested, the PowerShell OneGet Community Meeting starting just now:
    Seems I only get to sit in the virtual lobby

    Let us know if they say anything interesting.
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #27

    It was today mainly about creating own package providers. About dozen or so participants, not very much. Anyway, from a Windows user's point of view nothing special today.

    I just hope Garret would announce these meetings a bit earlier. Today the notification was "Meeting starts now!", instead of the usual 15 minutes warning :). I have him and PS OneGet in TweetDeck, alarm set every Friday for 5 PM Central European time to start watching TweetDeck for meeting notifications, otherwise I would miss each and everyone.

    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2015-03-20_18h12_42.png
      My Computer


  9. Posts : 1,557
    W10 32 bit, XUbuntu 18.xx 64 bit
       #28

    Can this work for windows 7 home premium?

    I have this on
    Windows Powershell
    Windows Powershell ISE
    Windows Powershell (x86)
    Windows Powershell Modules.
      My Computer


  10. Posts : 803
    10 Pro Preview x64
       #29

    groze said:
    Can this work for windows 7 home premium?

    I have this on
    Windows Powershell
    Windows Powershell ISE
    Windows Powershell (x86)
    Windows Powershell Modules.
    did you try it?
      My Computer


 

Tutorial Categories

PowerShell PackageManagement (OneGet) - Install Apps from Command Line Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:03.
Find Us




Windows 10 Forums