How to compare text file and csv file using PowerShell

I have a txt file call EmployeeID.txt that look something like this Number ID 32324 KLEON 23424 MKEOK and I have a CSV file called FullInventory.csv that look something like this Name URL UPN Status John http:// KLEON@COM.COM Yes I’m trying to compare the two files and out put 2 different file called matchFound.csv and… Read More How to compare text file and csv file using PowerShell

How to split csv and add additional column using PowerShell

I have a csv file and it have multiple columns. I have a specific column name called "Exported_Id" and it look something like this f36b9decc73e40bfb9a6250198a83fc0/SharePoint/source_28D4CE4DFC53AABB34B41E17BE9DEBBC/item__6761c90b-c1e0-4a91-b72c-e044e5b8cc56_1.0 I’m just wondering how can I split to only this (Spliting before and after _ ) 6761c90b-c1e0-4a91-b72c-e044e5b8cc56 and then add it to a new column call "Modified_Id" and export it… Read More How to split csv and add additional column using PowerShell

powershell copy files into remote machine issue using Copy_Item cmdlet

I was trying to copy few files into my remote box, but i see the path format is not correct issue, can someone chekc this? for($hostname in Get-Content C:\folder1\machine.txt){ Copy-Item -Path "C:\folder1\ramen-0.1-web-1.3.6.jar" -Destination "\\hostname\C:\folder1\folder2\" -Recurse -Force } Error Message is: Copy-Item : The given path’s format is not supported. >Solution : Your missing ‘$’ sign.… Read More powershell copy files into remote machine issue using Copy_Item cmdlet