Skip to content

Sql Server Powershell

Day: January 31, 2012

Easy way to create a PSObject

I always forget the syntax to this, so here you go.

$outputs = @();
$output = New-Object -TypeName PSObject -Property @{
	Name = $vm.Name
	Path = $($disk.Path)
	Capacity = $($disk.Capacity/1GB)
	FreeSpace = $($disk.FreeSpace/1GB)
	Storage = $($ds -join "  ")
}
$outputs += $output
Scott Newman Powershell Leave a comment January 31, 2012 1 Minute

Twitter

  • RT @LakotaMan1: The U.S. moved heaven and earth to bring Osama Bin Laden to justice. Not because he flew an airplane into the World Trade C… 21 hours ago
  • RT @RBReich: There is no banning abortions. There is only banning safe abortions. 1 week ago
  • RT @johnpavlovitz: The. Leaker. Isn’t. The. Story. The. Ruling. Is. https://t.co/q6DuZRwIVl 1 week ago
  • RT @Surgeon_General: Reproductive health decisions should be made between a patient and their doctor. Full stop. 1 week ago
  • RT @TropicaliJaye: men of america - are you with us? because we need you. 1 week ago
Follow @snewman

Posts

  • November 2021 (1)
  • February 2021 (1)
  • November 2020 (2)
  • October 2020 (2)
  • October 2019 (1)
  • February 2019 (1)
  • November 2018 (2)
  • April 2018 (1)
  • November 2017 (1)
  • October 2017 (1)
  • September 2017 (1)
  • July 2017 (1)
  • June 2017 (1)
  • April 2017 (3)
  • October 2016 (1)
  • July 2016 (13)
  • January 2016 (1)
  • September 2015 (2)
  • May 2015 (1)
  • April 2015 (1)
  • March 2015 (2)
  • February 2015 (2)
  • January 2015 (1)
  • December 2014 (3)
  • September 2014 (3)
  • August 2014 (2)
  • May 2014 (2)
  • April 2014 (4)
  • March 2014 (3)
  • February 2014 (3)
  • January 2014 (4)
  • November 2013 (1)
  • August 2013 (2)
  • June 2013 (1)
  • May 2013 (3)
  • April 2013 (4)
  • March 2013 (2)
  • February 2013 (16)
  • January 2013 (1)
  • December 2012 (4)
  • November 2012 (1)
  • October 2012 (5)
  • September 2012 (3)
  • August 2012 (2)
  • July 2012 (3)
  • June 2012 (2)
  • May 2012 (2)
  • April 2012 (4)
  • March 2012 (1)
  • February 2012 (1)
  • January 2012 (6)
  • December 2011 (8)
  • November 2011 (5)
  • October 2011 (14)
  • July 2011 (7)
  • May 2011 (1)
  • April 2011 (1)
  • February 2011 (3)
  • January 2011 (2)
  • December 2010 (1)

RSS

  • RSS - Posts
  • RSS - Comments

Archives

Blog Stats

  • 159,173 hits

Follow me on Twitter

My Tweets
January 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Dec   Feb »

Tags

Blog at WordPress.com.
  • Follow Following
    • Sql Server Powershell
    • Join 99 other followers
    • Already have a WordPress.com account? Log in now.
    • Sql Server Powershell
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar