0

Tips & Tricks : SQL Server “Cannot connect to WMI provider”

-

Recently I had issue which occured without any particular reason on SQL Server 2012. All of the sudden I start getting error message:

Cannot connect to WMI provider. You do not have permission or the server is
unreachable.
Note that you can only manage SQL Server 2005 servers with SQL
Server Configuration Manager.
Invalid Namespace.

when tried to run SQL Server Configuration Tools.

What resolved situation is command:

mofcomp C:\Program Files\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof
0

Tips & Tricks : How to add .NET Framework 3.51 to Windows 8 or Windows Server 2012

-

Unfortunately there is a problem when you try to add .Net Framework 3.51 to Windows Server 2012 using Server Manager. In order to fix that issue and get .Net Framework 3.51 installed (which is required by majority of applications and servers) issue following command from Command Prompt:

dism /online /enable-feature /all /featurename:NetFX3 /source:x:\sources\sxs

Please notice that x: in source parameter has to be replaced with appropriate drive letter for DVD with Windows Server 2012 installation files.

0

Tips & Tricks : Configuring IPv4 address on Windows Server 2012 Core with PowerShell

-

In order to assign static IPv4 address to Windows Server 2012 Core using power shell use:

New-NetIPAddress -IPAddress 172.16.48.11 -InterfaceAlias "Ethernet" -DefaultGateway 172.16.48.5 -AddressFamily IPv4 -PrefixLength 24
16

Tips & Tricks : Enabling Wireless Network in Windows Server 2012 Datacenter edition

-

If you want to use Windows Server 2012 Datacenter on workstation/laptop (sometimes it is handy to have mobile workstation with server operating system) you might experience issues with wireless networking. Even if driver for wireless network adapter is installed you might not be able to connect to any wi-fi network.

In order to use wireless in Windows Server 2012 Datacenter additional feature has to be installed: Wireless LAN Service. This can be installed from PowerShell prompt using add-windowsfeature wireless-networking command, as shown on screenshot below:
win2012-wireless-01

Once installed and server rebooted make sure that WLAN AutoConfig service is started, as shown on screenshot below:

(more…)

0

Tips & Tricks : HP TouchSmart tm2 : Screen Rotation

-

When upgrading drivers on HP TouchSmart tm2 tablet important is to keep in mind that HP Quick Launch Buttons package might disable screen auto-rotation. In order to restore that functionality remove HP Quick Launch Buttons and install older version of that package from here. Full information about package is available on HP Quick Launch Buttons web page availabel here.

Another option might be registry settings adjustment. Parameters which control screen orientation and bahevior are located under:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Hewlett-Packard\HP Quick Launch Buttons\Schemes\Default\8526

There are two important parameters:
Notebook_Docked_DisplayOrientation = 0
Tablet_UnDocked_DisplayOrientation = 3

Available values for those parameters:
0 – primary landscape
1 – seconday portrait
2 – seconday landscape
3 – primary portrait

1

Code snippets : Windows : Clear Event Logs

-

From script repository I did use in the past, VBscript which allows to clear EvenLog on Windows machine. I did use that on computers with Windows XP and Windows Server 2003. however, this script will work also on Windows 7 and Windows server 2008.

By default script clears EventLog on computer where script is executed. To clear logs on remote machine just modify variable strComputer and replace dot with name of the target machine.

Script will read all EvenLog files from machine and will go through them removing all events.

And here is script itself :

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup, Security)}!\\" _
& strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")
For each objLogfile in colLogFiles
objLogFile.ClearEventLog()
Next