0

Code snippets : Downloading file from URL in PowerShell

-

To download file from URL I used following piece of code:

$fileURL = "http://server/file.zip"
$fileName = "C:\Downloads\file.zip"
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($fileURL,$fileName)
0

Code snippets : Unzip file in PowerShell

-

Recently I needed to unzip file from PowerShell script. Here is result what I did use to achieve that:

$archiveDir = "C:\Downloads"
$fileZip = $archiveDir + "\file.zip"
$shell=new-object -com shell.application
$zip = $shell.NameSpace($fileZip)
foreach ($item in $zip.items())
{
 $shell.NameSpace($archiveDir).CopyHere($item)
}
0

History : Upgrading Windows from 1.0 to Windows 8 Pro :)

-

Check this out 🙂 Upgrading Windows from 1.0 to Windows 8 Pro.

It’s great video showing the long way we went from Windows 1.0 to current Windows 8 🙂

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 : Microsoft SQL Server 2008 & 2012 Feature Packs

-

Some of applications require additional SQL Server 2008 or 2012 fetures installed. Some of these features might not be available in standard setup of SQL Server. In that case you have to refer to Microsoft Dowloads web page in order to download additional components required for installation:

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.