Category: PowerShell

  • Show list of saved…

    Show list of saved wifi passwords in windows via PowerShell it is a bit long for an easy operation, but works well. (netsh wlan show profiles) | Select-String “\:(.+)$” | %{$network=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=”$network” key=clear)} | Select-String “Key Content\W+\:(.+)$” | %{$password=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ NETWORK_NAME=$network;PASSWORD=$password }} | Format-Table -AutoSize

  • SQL and sending emails with Powershell

    Run SQL Command Invoke commands in a script file and save the output in a text file Invoke sql script and write the results into CSV file. Invoke sql script and write the results into JSON file. Invoke a script and pass in variable values from a string Send Mail A scenario: Retrieve data from…

  • Shortcut for Directory – PowerShell

    It’s been for a while since I started using PowerShell for some operations. It might seem complicated at the beginning but if you be patient and keep learning, it makes so many tasks easy for you, especially for .NET developers. To create aliases for the commands: And when you use it It will list the files…