Save-CurrentFile (ISE) by Bernd Kriszio 29 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1318"></script>download | new post
Why to use a FileselectionBox to save your fresh files from ISE, don’t you know your file system? OK perhaps an encoding parameter would be fine, but please don’t default it to ASCII.
- function Save-CurrentFile ($path)
- {
- $psISE.CurrentFile.SaveAs($path)
- $psISE.CurrentFile.Save([Text.Encoding]::default)
- }
- # Save-CurrentFile '.\Save-CurrentFile.ps1'
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