• Oracle_91 (3/24/2013)


    installing powershell do we any security risks as mine windows 2003. am not sure we can download sdk which has powershell 2.0.

    can u share the script?

    PowerShell is a safe option. Much safer than doing the same via T-SQL. You ought to read about it and become familiar. It is the platform Microsoft has chosen for all server-class software administration including SQL, Windows, IIS, Active Directory, Exchange, etc.

    I do not have scripts I can easily share. My admin scripts are tied into utility databases and other environment aspects. Here is an example for you to try against your 2003 server:

    $Computer = "ComputerName"

    Get-WMIObject Win32_Volume -Filter "DriveType=3" -Computer $Computer | Select SystemName,DeviceID,VolumeName,FileSystem,BlockSize,NumberOfBlocks,@{Name="size(GB)";Expression={"{0:N1}" -f($_.size/1gb)}},@{Name="freespace(GB)";Expression={"{0:N1}" -f($_.freespace/1gb)}},@{Name="freespace(%)";Expression={"{0:N1}" -f(($_.freespace/$_.size)*100)}})

    Just change the variable value to your computer name.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato