SQL Server, mount network share

sp_configure 'XP_CMDSHELL' , 1

reconfigure with override


EXEC master.dbo.sp_configure 'show advanced options', 1

RECONFIGURE WITH OVERRIDE

xp_Cmdshell 'net use \\f_server\WSS_Content'

go


xp_Cmdshell 'net use p: /delete'

go

Uninstall SQL Server SSMS 2016 from Windows 7 / Server 2008 R2

  1. Download the SSMS uninstall powershell script

  2. Download the Get-RemoteProgram Powershell script and make sure to place it in the same directory as the Powershell uninstall script above.

  3. Open an admin session of Powershell

  4. In powershell, run the command "Get-ExecutionPolicy". This command will display the current ExecutionPolicy of your machine. You will need to change this value if it is not "Unrestricted".

     
  5. In powershell, run the command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted". This will launch a popup asking you to confirm changing the ExecutionPolicy. Confirm the change.

  6. Navigate to the folder with the SSMS uninstall Powershell script and run ".\UninstallSsms.ps1". This will launch a popup asking you to confirm launching the script. Click run. The script will now uninstall SSMS and all its dependencies.

     
  7. To revert the ExecutionPolicy back to its original state, run the command "Set-ExecutionPolicy -ExecutionPolicy [previous policy value]`". This will launch a popup asking you confirm changing the ExecutionPolicy. Confirm the change.