PowerShell 5.1 – How to uninstall module which is currently use

The problem could be that your existing PowerShell session is “locking” the module by loading possible elements from it (such as global variables or constants) even though you are trying to unload it (Remove-Module). The cleanest way to be sure it isn’t locked is to exit the PowerShell session. If you need to keep the … Read more

How to execute .sql file using powershell?

Try to see if SQL snap-ins are present: get-pssnapin -Registered Name : SqlServerCmdletSnapin100 PSVersion : 2.0 Description : This is a PowerShell snap-in that includes various SQL Server cmdlets. Name : SqlServerProviderSnapin100 PSVersion : 2.0 Description : SQL Server Provider If so Add-PSSnapin SqlServerCmdletSnapin100 # here lives Invoke-SqlCmd Add-PSSnapin SqlServerProviderSnapin100 then you can do something … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)