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.

Monday, November 5, 2012

App-V 5 Release Impressions - Part 1

It seems that it's not the most popular kid on the block, but I'm a sucker for App-V.  We're a 50/50 shop (virtualized apps/installed apps) currently and it's been an excellent tool for us.

I've been looking forward to App-V 5 for a while and read through the various beta impressions but they've mostly been either very technical how-tos on things that may not be (strictly speaking) supported or a bland two paragraphs on the fact that it's 'different'.  So, I thought I'd throw together some stuff here that might help fill things out for people.

Server Side - Install
I genuinely don't remember installing App-V 4.x server side, but I think it was vaguely uneventful.  The App-V 5 server install is similarly uneventful as long as you're prepared.  Pre-reqs that you likely won't have installed already but will need are .NET 4.x (4.5 is the Features option in Win2012 which seems to work fine), Powershell 3.0 (aka WMF 3.0 / KB2506143) and some random insecure library loading vuln patch (KB2533623).  Roles and features you're primarily looking at IIS stuff, nothing too surprising - I think ASP.NET with registration to .NET 4.x is the only thing to watch out for.  On Win2012 I didn't have to do any hoop jumping.

Server side is split in to multiple parts:
- Publishing, Management and Reporting Servers (each installable separately)
- Management and Reporting Server Databases (each installable separately, must be on SQL Standard or greater, no Express)

Installation is relatively straight forward, I installed the two DB roles on a SQL 2008R2 server and the three server roles on their own server (each utilizing a different IIS port).  Did I mention the entirety of the management and configuration is really done via Powershell now?  There's a web based console for the management server that'll make you wish you had spent more time using Powershell, but you're still welcome to use it.  I think the only functions that are available in it are setting App-V admins and importing packages.

App-V 5 Management Server Web "Interface"

Client Side - Install
Same prereqs as the server side - .NET 4.x, WMF 3.0, and that one-off vuln patch.  Other than that there's literally no configuration - I think the expectation is that you'll control all of your clients via GPO or (I'm guessing these are available) command line switches.  Post-install all configuration options are only available via Powershell.  Thought I'd toss in a screen of this thing too since I'd never seen one prior to install.  I like the idea that it's much simplified and user friendlier.

App-V 5 Client GUI



Sequencer - Install
Also the same prereqs as the server side.  You'll notice that the sequencer didn't get the big face lift that the other two components got, so you'll feel right at home if you sequenced in App-V 4.6.  The Q: recommendation is gone as is RTSP (yay!) so for me the sequencing is much simplified when teaching it to other people (when folks are new to packaging in general adding in the weirdness of capturing to Q:\[8.3] and then post capture having to enter in the client-accessible package URL was always a nuisance to me).

More on this later - I've sequenced a couple quickie apps and setup the publishing behind a hardware load balancer and some other stuff that someone might be interested in.  So far everything is working stellar, so I'll report back as I progress.

Monday, August 6, 2012

Testing a 32-bit .udl on a 64-bit Windows OS

Really just mirroring this blog post in case it's really gone for good (google cache still has it thankfully).

If you need to test a 32-bit ODBC datasource on a 64-bit version of Windows _and_ there's no native test function (i.e. you're using the Microsoft ODBC for Oracle driver which is 32-bit only and has no test button), you can still use a .udl file to assign the provider and datasource to test.  It just takes a little extra legwork.  Run this and all will be well:


C:\WINDOWS\SYSWOW64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\path\to\test.udl

Monday, July 23, 2012

Quick F5 BigIP Note

In case you're wondering (and I'm sure if you work with F5s often enough you've already figured this out), if you ever need to switch your Self IPs to different physical ports/VLANs and you have Floating IPs configured, just delete the Floating IPs, change to the new VLAN/interface/whatever, then add the Floating IPs back.  It's just easier than any cockamamie scheme you might be trying to concoct to avoid doing that.

Friday, June 15, 2012

Fun fact about OpenVMS 7.3-2 multipathing

Discovered this week that OpenVMS 7.3-2 apparently doesn't turn on its multipathing brain unless it has a second HBA installed, in Fabric mode (via wwidmgr), and zoned over both HBAs.  I imagine it's just a side effect of the multipathing logic pre-dating SANs with multiple paths to a single HBA, but it sure caused quite a bit of consternation when I was prepping to do SP failure testing on an EMC VNX and couldn't get paths to show.

Tuesday, June 12, 2012

Random AIX 5.3 Notes - expanding a logical volume

I've spent the past few days working on getting a PowerPath issue resolved on an AIX 5.3 box.  I rarely touch these things so my familiarity is abysmal making this much more difficult than it probably needs to be.  So I thought I'd just scribble down a few random things that I've worked through in hopes that it'll help someone else.


Expanding a logical volume without adding disks for those of us still stuck in the 90s (assumes it has already been expanded at the SAN level):


# Unmount, varyoff and export the volume group
bash-2.05b# umount /mountpoint
bash-2.05b# cfgmgr
bash-2.05b# varyoffvg thisvg
bash-2.05b# exportvg thisvg


# Deal with pv weirdness
bash-2.05b# chdev -l hdiskdevice# -a pv=clear
hdiskdevice# changed
bash-2.05b# chdev -l hdiskdevice# -a pv=yes
hdiskdevice# changed


# Recreate the volume group | -Y NA means don’t automatically rename the logical volumes
bash-2.05b# recreatevg -Y NA -y thisvg hdiskdevice#
0516-1434 varyonvg: Following physical volumes appear to be grown in size.
        Run chvg command to activate the new space.
        hdiskdevice#
thisvg
0516-1434 varyonvg: Following physical volumes appear to be grown in size.
        Run chvg command to activate the new space.
        hdiskdevice#


# check and grow vg - hello free PPs!
bash-2.05b# chvg -g thisvg
0516-1164 chvg: Volume group thisvg changed.  With given characteristics thisvg
        can include upto 7 physical volumes with 4064 physical partitions each.
bash-2.05b# lsvg thisvg | grep "FREE PPs" 
MAX LVs:            256                      FREE PPs:       856 (54784 megabytes)


# Take care of the filesystem - /fs is automatically added to the mountpoint when it’s recreated
bash-2.05b# chfs -m /mountpoint /fs/mountpoint
bash-2.05b# mount /mountpoint


# if needed, increase allowed LPs in LV
bash-2.05b# chlv -x 4686 thislv 


# Grow the filesystem, confirm the change
bash-2.05b# chfs -a size=+54784M /mountpoint
Filesystem size changed to 419299328
bash-2.05b# df -k /mountpoint
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/thislv   209649664  74832836   65%      228     1% /mountpoint