I've recently did some work with PowerShell ISE and missed a few features,that I wish to have in the ISE.1.It will be good to Stop debugger(Shift-F5) icon on toolbar2.In the popup----------------------... PowerShell ISE------------------------... cannot edit any script files in Windows PowerShell ISE while the debugger is running. To edit a script, stop the debugger.------------------... ---------------------------it will be good to add button to stop debugger.When stopped at ......
I wanted to call from batch file powershell script that required administrative privileges.I needed to check, if it was started as Administrator and also set current directory where the batch is located.Thanks to couple of stackoverflow questions I've got this batch@echo offpushd %~dp0 &:: @http://stackoverflow.com/q... check_Permissions:processpo... &:: TODO the script to call@pausegoto end:check_Permissions @rem ......
In our PowerShell scripts for different folder it's required to delete if exist and create empty folder. To avoid to repeat folder name in three commands I've created a functionfunction DeleteIfExistsAndCreateEmpt... ){ if ( Test-Path $dir ) { Remove-Item -Recurse -Force $dir } New-Item -ItemType Directory -Force -Path $dir}I've also used this function in answer for SuperUser question How can I copy a directory, overwriting its contents if it exists using Powershell ......
We previously tried to use msbuild to adjust configuration files for different environments. Recently I found C onfig Transformation Tool(CTT) on CodePlex and with addition of global replace using powershell it is enough and easier to do all required modifications Content of ChangeConfig.cmd: ctt s:..\web.config t:WebConfig.CTT d:..\web.config powershell.exe -command "Get-Content ..\Remoting.config | ForEach-Object { $_ -replace '//localhost/ServicesCI/', '//ServerName01/ServicesCI/' } | Set-Content ......
On some servers we have many old Virtual Directories created for previous versions of our application. IIS user interface allows to delete only one in a time. Fortunately we can use IIS scripts as described in How to manage Web sites and Web virtual directories by using command-line scripts in IIS 6.0 I've created batch file DeleteOldVDirs.cmd rem http://support.microsoft.co... rem syntax: iisvdir /delete WebSite [/Virtual Path]Name [/s Computer [/u [Domain\]User /p Password]] REM list all ......