New-IseFile by Bernd Kriszio 24 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1618"></script>download | new post
If you are using ISE put this file anywhere into your PATH and functions depending on it can use it.
. . Require-Function New-ISEFile
$a = New-ISEFile
- you find Require-Function in http://poshcode.org/1617
- function New-IseFile ($path = 'tmp_default.ps1')
- {
- $count = $psise.CurrentPowerShellTab.Files.count
- $null = $psIse.CurrentPowerShellTab.Files.Add()
- $Newfile = $psIse.CurrentPowerShellTab.Files[$count]
- $NewFile.SaveAs($path)
- $NewFile.Save([Text.Encoding]::default)
- $Newfile
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository