ASKER
ASKER
ASKER
$contents = import-csv -Path I:\downloads\testannouncements.csv
$myobject = @()
foreach($content in $contents){
foreach($inner in $content)
{
if($inner -match 'sharepoint.com')
{
$myobject += $content
}
}
}
$myobject | Export-Csv output.csv -NoTypeInformation
get-content c:\inputfile.txt | select-string 'sharepoint.company.com' -SimpleMatch | out-file C:\outputfile.txt
As the first suggestion, it does not change the file format (different from making sure it is Unicode (UTF-16)). The original format should be kept, and the result is still a CSV file if the source has been.
Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.
TRUSTED BY
Open in new window