Out-File -encoding problems - TechNet - Microsoft
文章推薦指數: 80 %
I have written one of my first PowerShell scripts to execute after I mirror my ... other than to rename my original files to ANSI format?
TechNet
Products
ITResources
Downloads
Training
Support
Products
Windows
WindowsServer
SystemCenter
MicrosoftEdge
Office
Office365
ExchangeServer
SQLServer
SharePointProducts
SkypeforBusiness
Seeallproducts»
Resources
Channel9Video
EvaluationCenter
LearningResources
MicrosoftTechCompanionApp
MicrosoftTechnicalCommunities
MicrosoftVirtualAcademy
ScriptCenter
ServerandToolsBlogs
TechNetBlogs
TechNetFlashNewsletter
TechNetGallery
TechNetLibrary
TechNetMagazine
TechNetWiki
WindowsSysinternals
VirtualLabs
Solutions
Networking
CloudandDatacenter
Security
Virtualization
Updates
ServicePacks
SecurityBulletins
WindowsUpdate
Trials
WindowsServer2016
SystemCenter2016
Windows10Enterprise
SQLServer2016
Seealltrials»
RelatedSites
MicrosoftDownloadCenter
MicrosoftEvaluationCenter
Drivers
WindowsSysinternals
TechNetGallery
Training
Expert-led,virtualclasses
TrainingCatalog
ClassLocator
MicrosoftVirtualAcademy
FreeWindowsServer2012courses
FreeWindows8courses
SQLServertraining
MicrosoftOfficialCoursesOn-Demand
Certifications
Certificationoverview
Specialoffers
MCSECloudPlatformandInfrastructure
MCSE:Mobility
MCSE:DataManagementandAnalytics
MCSEProductivity
Otherresources
MicrosoftEvents
ExamReplay
BornToLearnblog
Findtechnicalcommunitiesinyourarea
Azuretraining
OfficialPracticeTests
Supportoptions
Forbusiness
Fordevelopers
ForITprofessionals
Fortechnicalsupport
Supportofferings
Moresupport
MicrosoftPremierOnline
TechNetForums
MSDNForums
SecurityBulletins&Advisories
NotanITpro?
MicrosoftCustomerSupport
MicrosoftCommunityForums
ThisforumhasmigratedtoMicrosoftQ&A.VisitMicrosoftQ&Atopostnewquestions.
LearnMore
WindowsServerTechCenter
Signin
UnitedStates(English)
Brasil(Português)Česko(Čeština)Deutschland(Deutsch)España(Español)France(Français)Indonesia(Bahasa)Italia(Italiano)România(Română)Türkiye(Türkçe)Россия(Русский)ישראל(עברית)المملكةالعربيةالسعودية(العربية)ไทย(ไทย)대한민국(한국어)中国(中文)台灣(中文)日本(日本語)
HomeWindowsServer2012WindowsServer2008R2WindowsServer2003LibraryForums
Askaquestion
Quickaccess
Forumshome
Browseforumsusers
FAQ
Searchrelatedthreads
RemoveFromMyForums
Askedby:
Out-File-encodingproblems
ArchivedForums901-920
>
WindowsPowerShell
Question
0
Signintovote
IhavewrittenoneofmyfirstPowerShellscriptstoexecuteafterImirrormymusiccollectiontobackitup. ThePSscriptIwrotewillreplaceastringoftextusingthe"-replace"command. However,whentheoutfileiswritten,theoriginal
encodingislost. Forinstance,thefollowinglineisthesource:
延伸文章資訊
- 1File encoding - Mastering Windows PowerShell Scripting
File encoding Windows editors, including ISE, tend to save files using what is commonly known as ...
- 2ANSI Format - Micro Focus
- 3PowerShell 輸出結果編碼問題 - 黑暗執行緒
Do-Something.ps1 > output.txt 存檔是用ANSI/BIG5 編碼,但事實不然。 ... 其編碼Export-PSSession 用UTF8(含BOM) New-Ite...
- 4Set-Content - PowerShell - SS64.com
Write or replace the content in an item. This will overwrite any pre-existing content. ... Under ...
- 5Changing source files encoding and some fun with PowerShell
The script detects encoding and saves file back in UTF-8. UPDATE: After I published the post I re...