Skip to content

Instantly share code, notes, and snippets.

@dhcgn
Created November 3, 2016 21:26
Show Gist options
  • Save dhcgn/c70be38e29b1d37ffb01b2807af221a2 to your computer and use it in GitHub Desktop.
Save dhcgn/c70be38e29b1d37ffb01b2807af221a2 to your computer and use it in GitHub Desktop.
$pathOld = 'C:\Users\user\Documents\old.ics'
$pathNew = 'C:\Users\user\Documents\new.ics'
(Get-Content $pathOld -Encoding UTF8) |
% {$_ -replace '^UID:.{36}', ("UID:{0}" -f ([System.Guid]::NewGuid().ToString())) } |
Out-File $pathNew -Encoding utf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment