How can I write a multiline string into a file without adding characters to the string?
I have a JavaScript function where I’m trying to write a PowerShell script to a PowerShell file. This is the function: const script = `$Win32Product= Get-WmiObject -Class Win32_Product | Where Name -like ‘Test Client’ if ($Win32Product -eq $null){$Check=$false}else{$Check=$true} $Hash = @{ Check = $Check } Return $Hash | ConvertTo-Json -Compress`; const writeStringToPowerShellFile = () =>… Read More How can I write a multiline string into a file without adding characters to the string?