Deploy an asp.net package, sql databases and modify (text-)files - powershell

we are currently using a powershell script (~800 lines of code) to deploy an asp.net website, setting up the databases and modifying some xml nodes / text files. Can we use the wix toolset to do that? I am not very familiar with it. Or is it possible to copy our installation folder to the target system and executing the powershell file on it, using the wix toolset?

Yes, WIX can handle this.
You can start with this tutorial that includes enabling feature in IIS, installing website and change config files.

Just had a similar question / problem. My problem was that I couldn't get a powershell script working. I wrote a guide over here that migth help you. Feel free to ask if you need further assistance! :)

Related

OBIEE RPD automation from one environment to another

I'm looking at a possible script to automated the rpd deployment from one environment to another (dev,test,prod). Has anyone ever worked on such a script on a Windows based platform. There is a runbat.cmd in OBIEE, however there are no instructions on how to build the script.
Any suggestions would be greatly appreciated.
Thanks
Yes, you can automate rpd deployments using wlst scripting language: to connect to weblogic, lock configuration, upload the new RPD, save changes and perform a system restart.
However you'll probably have to perform some aditional tasks to the RPD before uploading it, tipically, changing the connection information, because it will be different between enviroments. For that you'll need to automatically patch the RPD with the correct connection information, using XUDML files.
Here are two blogpost with examples on how to do this, you can adapt the scripts to your own needs:
http://www.askjohnobiee.com/2013/03/how-to-automatic-repository-deployment.html
http://adventuresinobiee.blogspot.co.uk/2013/02/scripted-rpd-deployments-using-udml-and.html
Regards
Ana GH

Export current DSC configuration for import to another server (using IIS website as an example)

I'm trying to wrap my hand around DSC in PowerShell 4.0, what's possible, and what's not. I've installed xWebAdministration Module.
Could I create a website in IIS, then somehow export it to the a .ps1 file (I think in the MOF format). For example, txWebAdministration has a sample called xWebAdministration\Examples\Sample_xWebsite_NewWebsite.ps1. Could I use an existing website to build a file like this? Or do I have to type everything in manually?
I'm basically trying to jump in and try some things without reading from end-to-end. I was hoping Get-DscConfiguration would somehow read my IIS configuration and create such a file.
For example, in SQLServer, you can create a database and tables using the graphical user interface of SQL Studio Management Studio (SSMS), then export a script to re-create those same tables on another server.
Is such a concept possible with DSC, or am I missing the boat.
There is nothing like this at the moment.
Keep in mind DSC is very new and quite sparse. The DSC Resource Kit is created by people at Microsoft, but isn't supported or all that official.
You could write a script to parse an existing web site and export it to a configuration in a PS1, or even directly into an MOF (it's a text file too), but there is nothing close to this functionality existing at the moment.
Your best bet is probably to type it out manually at this time.
There is a tool that creates a DSC configuration from an existing machine called GuardRail but I think it will not support the experimental xWebAdministration Module. As briantist said, it wouldn't be too difficult to create a powershell script that uses WebAdministration commandlets to produce a DSC configuration.
In fact a workmate asked me the same question today and I'm considering writing one. If you I'll update my answer in a few days with a script that will do this.

Setting up 1-click Install for custom Powershell provider

I've created a custom Powershell provider. However, currently there are a few steps people have to do to get it working on a user's computer:
configure Powershell to run against .Net 4 (add a config file in c:\Windows\System32\WindowsPowerShell\v1.0)
add a custom formatter (to the System32 for c:\Windows\System32\WindowsPowerShell\v1.0).
register the snap-in.
The remainder setup steps are completed by a custom powershell script.
I was wondering if anyone could share their experiences on simplifying the process. Ideally I'd like people to run from a single command (ideally a CommandLet that's completes all the above steps.
Has anyone got any Links or Suggestions or Best Practise they could share?
I've found the following snippets that may help.
VS Command prompt variables
For the Visual Studio Command you could try Lee Holmes' http://poshcode.org/2176 or the Powershell Communit extensions (PSCVX). Both from https://superuser.com/questions/104868/run-visual-studio-command-line-tools-in-windows-powershell.
After that it's just the formatter and/or registering the snap-in.
Configure Powershell to use .Net4
How can I run PowerShell with the .NET 4 runtime?

Automate deployment of XMLA / documentation on Microsoft.AnalysisServices.Xmla

I'm looking to automate the deployment of XMLA scripts. I've come across an article that gives a small demo, but I'm hoping to find more info.
Specifically, where is the documentation for Microsoft.AnalysisServices.Xmla.XmlaClient and what is the best approach for overridding the database and connection values that are embedded in the XMLA script?
I assume you are just trying to deploy the analysis service cube. This utility has commandline switches and can suport configuration for different targets
Analysis Services Deployment Wizard
If you need to add further customizations, you can always process the resulting xml files with either xslt, powershell, or .net
ascmd.exe can also run xmla scripts:
ascmd.exe commandlline utility
Apparently Microsoft.AnalysisServices.Xmla.XmlaClient is an undocumented library that is actually part of Management Studio and is not re-distributable. I think that using one of Jason's suggestions or the AMO library are your only approaches.

vb6 xcopy deployment

Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM .
I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error.
Is there any tools out there which will help me to do this process?
I tried a tool from codeproject which is called regsvr42, which is not creating the manifest fully.
I used tools like PE explorer where I get all the typelib information , but converting them into manifest files is too difficult.
We have started migrating that to .NET, for some months we have to deploy it, it will easier if it is xcopy based deployment.
To create manifest files you can try to use Make My Manifest from http://mmm4vb6.atom5.com/.
EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.
If you can control creation of objects you can use DirectCOM from http://www.thecommon.net/10.html
Keep in mind that if one of used DLLs or OCXs is creating other COM objects dynamically with CreateObject calls, that reference will not be stored in vbp project file and you won't get full manifest file. Probably you will have to catch object creations while the application is running. Depends.exe application can profile running application and report all used dlls. I don't know if there is tool that can find additional COM related information.
There is an excellent walkthrough of what to do in this article on MSDN: Registration-Free Activation of COM Components: A Walkthrough.
Make My Manifest can accomodate late binding as well as early binding. You simply have to add the references to the late-bound dependencies manually, by file location or by ProgId.
You might look at http://mmm4vb6.atom5.com/mmm-demo-1248.html for additional help in using the utility.
MakeMyManifest is well spoken of as an automatic tool for creating manifests for VB6 projects, haven't tried it myself.
DirectCOM also has fans, again I haven't tried it.
EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.
There is a semi-automatic technique. You can create the manifests with Visual Studio 2008 (you can use a free version like Visual Basic Express Edition). Then make a couple of edits by hand to make the manifests suitable for use from VB6. See this section of this MSDN article for step-by-step instructions - ignore the rest of the article which is about ClickOnce.