I have written a power-shell script for deploying Web application to Win2k8(IIS 7) server, but i got to know that the production server is actually Win2k3(IIS 6), and the powershell script is not performing the functions that i want.
Currently the Deployment script only works for IIS 7.0
The powershell script performs following functions
Check whether Apppool exists
1a) If not create Apppool with the credentials
1b) If Apppool exists Stop the apppool
Run M-SDeploy Command to install the Web-application on the local machine
Bind the Web-application to Apppool(Created in step 1)
Start the Apppool
Is there any power-shell framework that can work on both IIS 6 & 7.0 OR do i need first check in my deployment script whether the target machine is WIN2k3 or WIN 2k8
and then run appropriate deployment script.
Please suggest me the best way to write compatible Deployment script for both IIS 6 & 7.0
and let me know if you need any more information
There have been a lot of changes between these OSes and IIS versions that anyone targeting a higher version is better off writing scripts that leverage the newer capabilities. Look through the source of Carbon - http://get-carbon.org/ to see if it can be of any help to your case. It uses appcmd for IIS steps, and might give you some pointers.
Related
I have ASP.NET Core web application that is hosted in IIS. We also have build server used for continuous integration using Jenkins. Jenkins get latest from GitHub and builds & publish the project in local folder and then execute powershell script to copy published folder to web server. ( it simply copies the files from local folder to network folder using Copy-Item)
The powershell script first stops the remote IIS web site before copying the file. (and i have confirmed that the remote web site is indeed stopped before deploying)
However every now and then we get error while copying files
Copy-Item : The process cannot access the file
\\some_ip\_apps\myapp\UI\UI.dll because it is being used by another
process.
So i have downloaded handle to check who is accessing this file on web server and i turned out its dotnet.exe
How do i stop dotnet.exe remotely or how do i release the handle remotely using powershell
I agree with the other comments about using WebDeploy to simplify your approach a little.
As far as powershell goes the Get-Process and Stop-Process along with normal Remoting stuff will let you shut down dotnet.exe.
We're about to start developing a modern app (LOB) for Windows 8. I've researched how to deploy it via powershell and what I need to do to enable sideloading, etc.
My question is about the administrative process of this. Is it possible to do this remotely? If we have, say 15 devices that this app will be used on, do we need to go to each one and run the powershell script to update it?
It doesn't seem like the add-appxpackage command has any parameters to execute against a remote machine, though I might be missing something.
I've seen a few references to using System Center to do this? Is that my only option?
What are the differences between Azure PowerShell Commandlets and Command-Line Tools?
is there a difference in capabilities?
are new versions published at around the same time?
is one of them the 'preferred' way to manage Azure resources?
I am interested in managing web sites, VMs and cloud services from developer's machine and also from Ci server (TeamCity/MSBuild - starting / stopping VMs).
I've noticed that Command-Line Tools is just a small ~5MB download while PowerShell commandlets have several dependencies (~22MB) and June 2013 version still relies on Azure SDK 1.8 October 2012.
The PowerShell cmdlets work only in PowerShell (on Windows machines). They're great for automating several concurrent tasks (i.e. scripting out an entire environment), or carrying out single tasks.
The command-line tools are cross platform tools (work on Windows, Linux, etc.) These are written in node.js. They're not as good for scripting multiple actions, but are great for developers that prefer the command line to execute tasks (instead of going to the Azure management portal).
As far as I can tell, they are not on a synced release schedule. You can follow the progress of each via their github.com repositories (https://github.com/WindowsAzure/azure-sdk-tools-xplat and https://github.com/WindowsAzure/azure-sdk-tools).
It appears that Powershell is a wrapper for the node tools. If you get an error in PS it will reference a .js file.
To test this simply allow your authentication token to expire without a login. The error message in the .json file it sends you to indicates a failure in a Javascript file.
The release schedule for WIndows Azure PowerShell and the command line tools are both approximately once every 3 weeks. You can get the latest from the github repo at any time (as shown above).
I need on clarification that I have a development server where according to the policy I shouldn't login and run the commands.
So, is there any way that I can deploy my solution using central admin just like as we did through power shell commands.
I search before, but I couldn't get the satisfactory answer?
If you're deploying new wsp, you can run Powershell command "Add-SPSolution -LiteralPath ". If it's an existing wsp, you should retract the existing wsp first before adding the updated wsp. You can check if the wsp either deployed or not in the Central Admin > System Settings > Manage Farm solution. You can also deploy the SP Solution(once added) in Central admin. After deploying it, make sure to restart the Timer Service. Here's how you can deploy the wsp using powershell.
you can setup powershell to run remotely and then use powershell commands to deploy the wsp.
Check this link on enabling powershell to run remotely Configure Remote PowerShell in SharePoint 2010
What kind of solution are you deploying? Is it a farm or sandboxed solution? You can deploy your solutiions via VS2010 without having to login to the server. Or are you referring to items that needs to be deployed via GAC?
I'm using TeamCity for my CI builds, and I'd like to set up a second build for running automated UI tests on Windows XP and Windows 7 virtual machines.
I imagine the build working as follows:
Compile, run unit tests, etc.
Prepare MSI using WiX
Copy MSI to target test machines
Remotely execute MSI's
Copy test harness code to remote machine
Run tests
Build finishes
The automated UI tests are written using NUnit and would need to be run directly on the test virtual machine (they can't run remotely). It's important that if the tests fail, it appears in the TeamCity build log and the build fails. I'd rather not install VS or the TeamCity build agents on either of the test virtual machines.
It seems that most of this should be possible using psexec.exe. Are there any alternative (preferably open source) tools that I should look at?
takes a deep breath
We were looking into something to help us out with our automated UI tests. We use ranorex to test the UI and TeamCity/Msbuild to execute the tests.
We never found any tools to help us out (I’m constantly keeping an eye out for some so will monitor this thread) but here is what we did instead.
The CI server copies the setup files and test scripts to the Testing Host Server.
The CI server then launches a custom app on the Testing Host Server providing the name of the VM to launch.
The Test Host Server then launches the VM software, using Virtual PC.exe -singlepc -pc vhdname.vhd -launch , and waits for it to shutdown (after it’s run its tests).
The VM grabs the setup files and scripts from the network location and executes.
After the tests are run it then returns the results to a networked location and shuts itself down.
Control is returned to the custom app.
Control is returned to the CI server which determines from the results if it has passed or failed (and updates the UI so developers are made aware of the result).
Results are collection as artifacts in TeamCity and tagged in Svn.
I think that's everything. Its convoluted, however, it works. Hope someone of that helps you.
Jeff Brown of the Gallio team has been talking about a tool called Archimedes that he's planning to write to support this kind of requirement. It sounds promising, but I don't think there has been much progress on it so far.
In the mean time though, there is something in the Gallio project called VM Tool that may do what you want. It provides commands to stop, start and snapshot virtual machines, and more importantly, to copy files back and forth and execute commands.
I presume you have also considered Powershell Remoting?