One of the things I’ve been playing with recently is using Powershell and command line SQL installs (and a few other bits and pieces) to rebuild parts of the virtual SQL infrastructure.
The idea is that there is a Powershell script somewhere which can simply be run which will install whichever instance is right for that server, using the install files found on the NAS.
Unfortunately, this means in order to work, I’d have to map the directory to a drive, then run the necessary commands locally, which is a great excuse for me to use the New-PSDrive command.
Slight issue - apparently, when parsing in credentials to this function (and it does have a parameter called -Credentials which accepts a ‘Get-Credential’ object [see the link above for more details]) the behind-the-scenes functionality is actually Powershell version specific.
So, if you’re using anything below PS v3, this doesn’t actually work at all.
Now my question is – if it’s not backward compatible, why wasn’t this lack of functionality mentioned in the documentation?