Wednesday, December 26, 2012

Quickie - Enable remote powershell without touching the PC


Quick and convenient way to get WinRM up and running without having to touch the PC.  Useful if you prefer to leave it disabled in your environment unless you need it or have decided to deploy it to a number of existing PCs.  Use scheduled tasks to enable it for you (note: this isn't my trick, so if you're looking for this you probably already saw it elsewhere, just sans commands!)

PS C:\> schtasks.exe /Create /S ComputerName /TR "powershell -ExecutionPolicy Bypass -Command Enable-PSRemoting -Force" /TN EnablePSRemote /SC MONTHLY /RU "SYSTEM"
SUCCESS: The scheduled task "EnablePSRemote" has successfully been created.

PS C:\> schtasks.exe /Run /S ComputerName /I /TN EnablePSRemote
SUCCESS: Attempted to run the scheduled task "EnablePSRemote".

PS C:\> schtasks.exe /Delete /S ComputerName /TN "EnablePSRemote" /F
SUCCESS: The scheduled task "EnablePSRemote" was successfully deleted.

PS C:\> Enter-PSSession -ComputerName ComputerName
[ComputerName]: PS C:\Users\account\Documents>

Monday, December 10, 2012

App-V 5 Release Impressions - Part 2

Now that I've had some time with App-V 5, I have a bit more feedback.  There's been a number of quality posts on the App-V blog lately to provide a little more insight in to the changes.  No matter how you look at it, Connection Groups are vexing beasts.

Here's the thing - I love the idea of Connection Groups and I really want it to work.  The multi-component installs of desktop software that are so often the things nightmares are made of (especially in a heavily outdated Oracle shop) would be made considerably more convenient if you could maintain the components separately.  I'm sure Citrix has an implementation of the same concept that's totally fantastic too.  So far, however, it's just been a bit of a hassle.

It works, don't get me wrong - I have Office 2010 sequenced and two different Outlook plugins in separate packages all in one Connection Group and they work grand.  Didn't take any effort at all.  However, at one point I had forgotten to enable local COM interaction or something in one of the packages and published it and saw what a mess you can make if you don't thoroughly test (something I never do when I'm learning, I want the messes to show up).  It's not super obvious what will and won't work though - if I put a separate Visio 2010 package in the same Connection Group, all of the applications cease to work.  If I leave it separate, everything works dandy (including cut and paste of Visio objects to Word/Outlook/etc - well, it spits out a weird file save error before it pastes, but it works better than it did in App-V 4).

Other than the unpredictability of Connection Groups I've been very pleased.  I'm running a Win7 x64 desktop with all virtualized apps now (with the exception of anything that has an IE plugin) and it works great.  The server infrastructure has been very reliable and easy to teach to others.  Startup times are the same or faster than locally installed apps.  The powershell interface is super useful (especially with remote ps enabled on the desktops).  Troubleshooting is considerably easier than it was.

By the way, I may have mentioned this previously but if you're doing cacheless streaming, turn on whatever compression mechanisms your web server employs.  Trust me.  My package servers are behind BigIPs.  Without compression, it takes Outlook 30-40s to start every time.  With compression on, 3-5s.  Gigantic difference.

I've just released our first App-V 5 + Win7 x64 SCCM build for courageous testers/volunteers in the company who need new systems, so I expect as the usage expands I'll find more problems and I'll be sure to report them here.