• Powershell convert word to PDF
    14 April

    PowerShell Convert Word to PDF

    Using Microsoft Word COM Object To convert the given Microsoft Word document to PDF: Create a COM object using the New-Object cmdlet. Use the Open() method to open the MS Word file. Use the SaveAs() method to save the PDF file. Use the Close() method to close the Word document. Use the Quit() method to […]

  • PowerShell check if file contains string
    14 April

    PowerShell Check If File Contains String

    Using Select-String Cmdlet Use the Select-String cmdlet to check if the specified file contains the given string in PowerShell. $path = "E:\Test\file1.txt" $string = "customers" $result = Select-String $path -Pattern $string if ($result -ne $null) { Write-Host "The specified text file contains the string '$string'." } else { Write-Host "The specified text file does not […]

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.