Windows 10: PowerShell PackageManagement (OneGet) - Install Apps from Command Line
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: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.
I was thinking of making a PS1 script like this for when the next build comes
I've made a shortcut to run this Setup.ps1 script as administrator with the target:
but EMET still prompts for UAC (the others are silent).
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\adam\OneDrive\Documents\Scripts\Setup.ps1"
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.
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.
I got that from your tutorial actually I'm going to stick this on the end of the script and I'll be done.
Enable-WindowsOptionalFeature -FeatureName `
-Online -All -NoRestart
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:
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.
<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend">
<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">
<cpi:offlineImage cpi:source="wim:X:\Sources\install.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
Only problem is that sysprep is "broken" in build 9926 (see my warning about this), hopefully MS get it fixed in the next build.
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.
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.
Can this work for windows 7 home premium?
I have this on
Windows Powershell ISE
Windows Powershell (x86)
Windows Powershell Modules.
did you try it?
I have several network connections configured.
There is one wifi connection which automatically connects to my WLAN,
another cable based LAN connection to a NAS which is used for backups
and some L2TP connection connections (used...
:really:I have a few PCs connected via a bridge on an ethernet LAN. They communicate with each other, not "the internet".
I'd like to rename "Unidentified network" to something more reasonable like "DoNotTreadOnMe" (allegorical.)
How do I open windows store apps like Hulu from the command prompt?
For some unknown reason I cannot any more navigate to Update panel from "Einstellungen" - it is blocked.
I have to cancel the "Einstellungen" window by the task manager !
So in this moment I cant go forward nor backward any more: cant...
in win7, after installation and setting the correct file associations, the correct program would start upon double clicking
in win10 however, it popups wanting you to set a ?default app?. ive seen this happen for klite codec pack, firefox,...