Pages

Monday, March 4, 2013

PowerShell Log File Generation via Function


A simple logging function to timestamp transactions in my scripts. I am posting this for people new to PowerShell who asked me how I handle some of my logging. This function allows at certain points in a script to send a text string and append it to the log. This allows for a consistent format for auditing and some diagnostic information. It also simplifies the code, without the need for such things as echo statements.


$logfile = "c:\temp\logfiletest.txt"

function log ([string]$logdata)
{
$date = get-date
echo  "$date - $logdata" | Out-File $logfile -width 240 -Append
}


$test = "SERVER123"
log "testing the log file ran on $test"

Example of the Log file.

03/04/2013 11:20:36 - testing the log file ran on SERVER123
03/04/2013 11:20:37 - testing the log file ran on SERVER123
03/04/2013 11:20:37 - testing the log file ran on SERVER123
03/04/2013 11:20:37 - testing the log file ran on SERVER123
03/04/2013 11:20:38 - testing the log file ran on SERVER123
03/04/2013 11:20:38 - testing the log file ran on SERVER123
03/04/2013 11:20:38 - testing the log file ran on SERVER123
03/04/2013 11:20:38 - testing the log file ran on SERVER123
03/04/2013 11:20:50 - testing the log file ran on SERVER123
03/04/2013 11:20:51 - testing the log file ran on SERVER123

Wednesday, January 23, 2013

WSUS on Windows Server 2012 Setting BITS to Foreground Mode. FIXED

Recently in a development environment we installed WSUS on Windows Server 2012. We ran into an issue where a problem with our proxy server was not allowing Back Ground Transfers. In searching for solutions most references were for Windows Server 2008 R2. Unfortunately, the solution for Windows Server 2008 R2 was not present on Windows Server 2012 we did find several forums that were offering solutions for Server 2012. However, the solutions were all fragmented. We finally pieced together a solution of all the steps, which worked for us. Below are the required install and steps.

The Event Log Error that we were receiving prior to this change was:

Content file download failed. Reason: The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.

You will need to install the following:

Microsoft® SQL Server® 2012 Native Client
Microsoft® SQL Server® 2012 Command Line Utilities

You can obtain them from Microsoft at the following URL: Download from http://www.microsoft.com/en-us/download/details.aspx?id=29065

After you install these packages you just need to navigate to:
C:\Program Files\Microsoft SQL Server\110\Tools\Binn>

You would then need to execute the following command:
SQLCMD.exe -S \\.\pipe\Microsoft##WID\tsql\query -d "SUSDB" -Q "update tbConfigurationC set BitsDownloadPriorityForeground=1"

Please note: I used PowerShell console, so in the example image I included a (dot slash) .\ before the command in order to run the binary.


Saturday, January 12, 2013

Global TechWire: Windstream Hosted Solutions to Open New Data Cente...

More Growth in the Triangle!

Global TechWire: Windstream Hosted Solutions to Open New Data Cente...: DURHAM, N.C.--Windstream Hosted Solutions, one of the nation's premier providers of enterprise-class managed hosting solutions, today announ...

Wednesday, December 12, 2012

Today! "DABCC LIVE WEBINAR: Control Up 2.0 for Citrix XenApp & XenDesktop Deep Dive and Discussion"

I use control up most of my day. I highly suggest giving this webinar a glance. If you use Citrix XenApp or XenDesktop, then you really should take a look. 2.0 has some nice new features coming, with a road map for even more enhancements by the end of 2013.

Today! "DABCC LIVE WEBINAR: Control Up 2.0 for Citrix XenApp & XenDesktop Deep Dive and Discussion": In this webinar Douglas Brown and Yoni Avital, co-founder and Chief Technical Officer will be demonstrating the capabilities of ControlUp and provide a sneak peak of the new features available in ControlUp 2.0....

Friday, December 7, 2012

NetScaler Insight 1.0 GA

I hope to get my hands on playing with this in the near future. This takes having a NetScaler VPX or MPX to a whole new level.



NetScaler Insight 1.0 GA unleashed!!: NetScaler Insight 1.0 Beta has been received with great excitement and with a huge response from a range of customers and field. Some were waiting for a product like NetScaler Insight since years, some wanted to see what AppFlow can do, some were taken away by the ease of configuration, whereas some ended up writing about it http://blog.itvce.com/?p=3101 & http://blog.itvce.com/?p=3167. With the support and detailed…
Read More

Tuesday, November 13, 2012

Start8 for Windows 8 by Stardock


I have installed windows 8 on my personal laptop in order to give it a more “real” test. I was also interested in the Xbox glass feature for integrating into my heavily used Xbox 360. I do not hate the metro tiles. However, I find myself working in the desktop most of the time. This is due to the large amount of applications I have that do not have a metro update.  For social media and other light usage, I have not found the metro interface to be horrible to any degree.

I have been running Start8 since I installed windows 8 to allow for me to be always in the Desktop environment and have the familiar Start Menu with keeping the option to switch to the Metro Interface. It has been working very well and I highly recommend spending the 5 USD. You can do many of these changes by modifying the registry and creating your own folder with icons. But Stardock has simplified the process, added a nice icon choice at a price point that is worth spending.

The advertised features:

  • Windows 7-style Start menu with Windows 8 enhancements
  • Search for Windows 8-style (Modern UI) apps
  • Pin desktop and Metro apps
  • Boot directly to the Windows 8 desktop
  • Windows 8 Start screen accessible from the Start menu


  • http://www.stardock.com/products/start8/


    Wednesday, November 7, 2012

    Brocade acquires Vyatta

    I am a fan of Vyatta, having worked with it on a contract project. It's a nice Open Core Virtual Router that integrated into a virtualized infrastructure. The "Cisco" like CLI is comfortable for people who have worked in that environment in the past. 




    Brocade acquires Vyatta:

    Yesterday Brocade announced the acquisition of Vyatta, a company that delivers a software-based network operating system that leverages x86 servers as well as virtualization and cloud computing platforms.
    Data center networking solutions provider Brocade is planning to use Vyatta competence aiming to offer an end-to-end virtualized data center infrastructure solution. Brocade expects to close the acquisition by the end of the calendar year and privately held Vyatta will be acquired in an all-cash transaction.
    The merge of the two companies is going to deliver a product which would be the result of Vyatta’s cloud computing platforms, network virtualization and software-defined networking (SDN) with ethernet fabric architecture of Brocade.

    Mike Klayko, CEO of Brocade, declares:
    This acquisition complements our R&D investments in Ethernet fabrics and SDN, as well as our broad industry and solutions-level partnerships that enable Brocade to pursue new market opportunities in data center virtualization, public cloud, enterprise virtual private cloud, and managed services, we are now bolstering these ‘build and partner’ efforts with this strategic acquisition with the goal of being the innovation and thought leader in the software networking category.
    Kelly Herrell, CEO of Vyatta, comments about the acquisition:
    Brocade and Vyatta share the philosophy that open solutions and dynamic, agile networks are the best paths for customers to evolve their data center architectures to meet their business goals, I am excited about Vyatta joining forces with Brocade as we now have the opportunity to more fully deliver on our value proposition with a broader set of customers as a trusted data center and networking solutions provider.