IIS ISSUE Backup and Restore - iis

I want to restore IIS from Windows Server 2008 Standard 32 Bit to 64 Bit Windows Server 2008 R2,We want to backup and restore.WE already used appcmd to take backup and restore. But given error : Error( hrresult:80070005, message : command execution failed .Access Denied), Please help in this regards .Send me step by step.

You have to run the appcmd command as administrator.Or you can open powershell run as admin and execute below command:-
appcmd add backup backup_name
appcmd restore backup backup_name
When you wll open powershell it will open with C:\windows\syatem32\
Kepp location as it is and execute the command.
Let me know if you face any issue.

Related

Error 34513 when trying to re register Azure Backup Server

I have tried downloading the MARS agent, new backup credentials and checked my server time as well as 20 other things. I still get error 34513 when trying to re register my Azure backup server. Anybody??
Delete the files inside C:\Windows\Temp
Reboot the Machine Locate
Locate the Credentials File on C:\ - not on the Desktop, not on a Network Share
Try again, have fun!
For more information: https://azure.microsoft.com/en-in/blog/troubleshooting-common-configuration-issues-with-azure-backup/

Can't run PSExec using NETWORK SERVICE account

I am using TFS to kick off PSExec to run an InstallShield process that creates installers. Our TFS build agent runs under the NETWORK SERVICE account.
I run PSExec using the -u -p options, and I am able to run the command and successfully build the installers from a command prompt against the remote machine.
However in TFS, I always get a 2250 error code and the installers don't build.
To isolate the problem, I changed the psexec command to the following...
PsExec.exe -accepteula \\<machine> -u <username> -p <password> xcopy /y c:\temp\testing.bat c:\temp\1.bat
If I run the above from the command line it copies the file. If I run the above from TFS (calling out to the above in a batch file), it fails with 2250.
So to simulate what TFS is doing I...
Started a command prompt with elevated Admin privileges
Issued psexec -i -u "nt authority\network service" cmd.exe
Ran the batch file containing the above xcopy command
So step 2 starts a command prompt using the NETWORK SERVICE account. When I run step 3 from this command prompt, I received the same 2250 error. So this is good b/c now TFS is out of the picture, and I am closer to the real issue.
Just for grins I added NETWORK SERVICE to the remote box's Administrators group. That did not solve the issue.
So here is where I am at...
If I login to the TFS box using a login in the Administrator group, open a command prompt, and run the xcopy command batch file with the -u -p parameters, everything works fine.
If I start a cmd prompt with the NETWORK SERVICE account and run the same batch file as in step 1 I get a 2250 access denied.
So in my mind the issue is clearly related to the NETWORK SERVICE account. Question is how can I get psexec to run with this account?
UPDATE
Here are the dialogs that show the NETWORK_SERVICE account in the Administrators group for and that it has full access to the path (c:\temp).
Let's say your two machines are called TFSSERVER and TARGETMACHINE.
The NetworkService on the TFS Server would be seen as the machine account, i.e. DOMAIN\TFSSERVER$, on the TARGETMACHINE. Any accounts in the NT AUTHORITY group are local accounts so it looks like you've just added TARGETMACHINE's network service as an admin, not the TFS machine's network service.
Try adding the TFS machine account to your permissions list and see if it works.
If that doesn't, look at this related question and see if anything there helps you at all: PSEXEC, access denied errors

How to work with MSDeploy through command line?

I want to run a .bat file on my server via MSDeploy from remote. I installed the remote agent service on the server and started it. Also installed MSdeploy on my computer.
Now I want to execute the bat file from remote.
Can anyone help me out?
Thanks, any help will be upvoted immediately!
You're looking for the runCommand provider:
msdeploy.exe -verb:sync ^
-source:runCommand="path\to\batch.bat" ^
-dest:auto,computerName=serverName,userName=user,password=pass
This will automatically transfer the batch file to the remote server as long as it is named .bat or .cmd and you do not pass any parameters to it.
It sounds like you are trying to execute the bat file on one machine from another machine? If so have you considered PsExec from Sysinternals? http://technet.microsoft.com/en-us/sysinternals/bb897553

Redirection.config cannot read due to insufficient permissions

I keep getting the following error:
c:\Windows\System32\inetsrv>appcmd set site /site.name:"WebVTS" /+bindings.[prot
ocol='https',bindingInformation='*:443:webvts.mprinc.com']
ERROR ( message:Configuration error
Filename: redirection.config
Line Number: 0
Description: Cannot read configuration file due to insufficient permissions
. )
I'm trying to add a hostname to an https: site in IIS 7 on Windows Server 2008. I added IUSR read/modify to my web.config file. But can't seem to figure out where and what is redirection.config?
Click Start-> type "Command Prompt"-> Right click on Command Prompt program->"Run As Admin".
Then run Command line programs, it should work.
Also you need to have Admin rights on your machine.
You need to make sure that you run AppCmd.exe from an elevated command prompt.

How to start IIS Express Manually

Is there a command line program or service that I can use to start IIS Express manually?
iisexpress program is responsible for that.
http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line
Once you have IIS Express installed (the easiest way is through Microsoft Web Platform Installer), you will find the executable file in %PROGRAMFILES%\IIS Express (%PROGRAMFILES(x86)%\IIS Express on x64 architectures) and its called iisexpress.exe.
To see all the possible command-line options, just run:
iisexpress /?
and the program detailed help will show up.
If executed without parameters, all the sites defined in the configuration file and marked to run at startup will be launched. An icon in the system tray will show which sites are running.
There are a couple of useful options once you have some sites created in the configuration file (found in %USERPROFILE%\Documents\IISExpress\config\applicationhost.config): the /site and /siteId.
With the first one, you can launch a specific site by name:
iisexpress /site:SiteName
And with the latter, you can launch by specifying the ID:
iisexpress /siteId:SiteId
With this, if IISExpress is launched from the command-line, a list of all the requests made to the server will be shown, which can be quite useful when debugging.
Finally, a site can be launched by specifying the full directory path. IIS Express will create a virtual configuration file and launch the site (remember to quote the path if it contains spaces):
iisexpress /path:FullSitePath
This covers the basic IISExpress usage from the command line.
From the links the others have posted, I'm not seeing an option. -- I just use powershell to kill it -- you can save this to a Stop-IisExpress.ps1 file:
get-process | where { $_.ProcessName -like "IISExpress" } | stop-process
There's no harm in it -- Visual Studio will just pop a new one up when it wants one.
Or you simply manage it like full IIS by using Jexus Manager for IIS Express, an open source project I work on
https://jexusmanager.com
Start a site and the process will be launched for you.
There is not a program but you can make a batch file and run a command like that :
powershell "start-process 'C:\Program Files (x86)\IIS Express\iisexpress.exe' -workingdirectory 'C:\Program Files (x86)\IIS Express\' -windowstyle Hidden"

Resources