I posted my script editor add-in on the PowerGUI Challenge folder
http://powergui.org/kbcategory.jspa?categoryID=389
Based on Lee Holmes Set-ClipboardScript located here: http://www.leeholmes.com/blog/2009/02/03/more-powershell-syntax-highlighting/
This script editor add-on will copy the current window to HTML ready to post on a blog or web page.
This tool is found under Edit -> Copy As -> Colorized HTML
The script will copy the entire document window if no text is selected. If text within the current document window is selected, just that text will get copied to the clipboard.
This is different from the built in function in that the clipboard can be pasted directly into an HTML compliant program like Microsoft Outlook as HTML without first saving as an HTML file. The pasted data also includes line numbers in a separate column.
I am using it on newer posts, and will clean up older posts as I have time.
001
002 003 004 005 006 007 008 009 010 011 012 013 |
function get-macip
{ Clear $strComputer = Read-Host “Enter Machine Name” Clear $colItems = GWMI -cl “Win32_NetworkAdapterConfiguration” -name “root\CimV2” -comp $strComputer -filter “IpEnabled = TRUE” ForEach ($objItem in $colItems) { Write-Host “Machine Name: “ $strComputer Write-Host “MAC Address: “ $objItem.MacAddress Write-Host “IP Address: “ $objItem.IpAddress } } |