update-help set-executionpolicy remotesigned $PSversiontable get-module import-module SQLPS psdrive import-module -Name SQLServer -Scope CurrentUser -AllowClobber
Error screenshots and resolution. Issue from SSMS 2017 – Click here to download SSMS 2017 Get Powershell Gallery from this link. Click here.
In order to get this to work in Windows 10 , l ran the command below. Install-module -Name SqlServer -Scope CurrentUser – Force -AllowClobber Useful Links: Powershell Gallery Download SSMS -SQL Server Management Studio
Diskspd Utility application. This is a new robust storage Testing Tool (superseding SQLIO). “”A feature-rich and versatile storage testing tool, Diskspd combines robust and granular IO workload definition with flexible runtime and output options, creating an ideal tool for synthetic storage subsystem testing and validation.”” Click here for the download link. Sample output from a […]
In this example, l will attempt to get and stop a windows service for say, SQLdefragmanagementservice. First open a windows powershell console, using the run as administrator below. Use the get-process to get the process id. Use the stop-process to kill the windows process/service. Then run the code shown in the screenshot below, modify as […]
This powershell cmdlet enables you to manage your windows server event logs, and it also enables you to get at the events found within those event logs. Simple basic code example to do this. Windows Server hostname is: SERVER1 Modify the logname as needed: system, security, application etc. get-eventlog -logname system -computername SERVER1 -after ‘1/1/2014’ | […]
Below powershell command will query one or more servers for a specific hotfix as in the example. cls get-hotfix -id KB2883201 -computername server1, server2
Good article. Click here for it.