Q&A for Don Jone's webcast on 7/6/2011 - Combining Output from Multiple Sources

Please post your questions for the webcast here.

Register here for the webcast.

Parents
  • Transcript of the entire chat session:

     

    Normal 0 false false false EN-US X-NONE X-NONE

    Q: I would like to have Don's Power point presentation and scripts after the presentation please. Thanks.

    A: It will be available, we will email you the link

     

    Q: PLEASE maximize your window - thanks

     

    Q: I cannot see the slides

    A: Right now we're viewing PowerShell on Don's machine, not slides. If you can't see anything, try logging out then back in, that seems to work

     

    Q: using mis-matched variable names in example ($computername vs $computer)

     

    Q: did not see anything, do I need to login to the meeting?

     

    Q: whats the easiest way to run an inventory script like this against multiple servers? How would you query a txt file with the server list?

    A: -ComputerName {Get-Content computers.txt}

     

    Q: there is no video, only audio!

    A: Try logging out then back in

     

    Q: Does powershell work on older versions, like an NT workstation, or W2K server?

    A: http://support.microsoft.com/kb/968929

     

    Q: if i wanted to pull inventory info from 5,000 machines, how do i setup the script to break it down in groups of say 100

    A: Complex topic - start by reading about PowerShell Background Jobs - this allows you to scale out running scripting on multiple computers

     

    Q: sound is going out?

     

    Q: got better now

     

    Q: What about combining different data types in a custom object

     

    Q: can you read in objects from a text file instead of a wmiobject

     

    Q: hi there, I missed the begining,is it availble on Demand? thanks

     

    Q: I'd like to see using a dos tool inside the powershell.  like certutil

     

    Q: How do I run the script against multiple computers?

     

    Audience Question:

    Q: are you going to send your blog and teitter info in the email you send with the lik to the transcripts?

    A: We can include Don's blog link in that email, yes

     

    Q: Where did you get the $obj.PSObject.typenames.insert syntax from?  Is this PSObject stuff documented?

     

    Q: A code snippet from another IDE handles the TypeName addition this way, "$newObject.PSObject.TypeNames[0] = "$($newObject.PSObject.TypeNames[0])#MySpecialType".  Any difference of note here?

     

    Q: as for disks - what if we're on a SAN and trying to get properties for mountpoints

     

    Q: ?

     

    Q: like a csv file and assign them to an object value?

     

    Q: Can you embed the object formatting XML into the modules, functions or objects?

     

    Q: is it ok to assign an object to an item in the hash table? for example. the whole $os, $info = @{wmios = $os}

     

    Q: Can this utilise AsJob to make querying 1000's servers quicker?

    A: Yes. Get-WMIObject supports -AsJob switch in PowerShell v2.

     

    Q: Should be -Property $info

     

    Q: should there be a $ before Info in the foreach loop

     

    Q: Later, can you suggest some resources (books, urls) for beginner powershell users?

     

    Q: can you compile powershell script? 

     

    Q: How would I go about making an HTML file instead of the CSV?

    A: Use ConvertTo-Html cmdlet

     

    Q: I've typically used a .NET datatable for this kind of thing.  What are your thoughts on when this would be good or bad.  I use it when I need to update specific rows once they're in the object and then output the updated object.

     

    Q: Can you filter for an OU under AD (a large group of computers to numerous to list individuallly in th efilter param?)

     

    Q:

    if I have and object and by this object I need to do several foreachs to find only one information. how about I create

    small funcitions in begin block and use : Object | custom tables calling this small functions. It is correct ?

     

    Audience Question:

    Q: What is the URL these scripts are saved to?

    A: Scripts will be posted at itpro.concentratedtech.com/download in about 24 hours

     

    Q: If I'm grabbing information from multiple places and storing that information in more than one Hashtable how could I combine those hashtables into one HTML file or CSV file? Example I'm trying to grab information from SQL Server SMOs. So I have hashtable that may have DB info, another one with backup information, and then maybe one that has configuration info about the instance of SQL.

     

    Audience Question:

    Q: can you save an object as a property of the custom object?

    A: Yes, objects can be added to a property of a custom object. If you do that, it gets a bit tough to see the output since each "column" in the table will be an entire object, and PowerShell doesn't display those very well sometimes.

     

    Q: Good Stuff. Thanks

     

    Q: single

     

    Q: what about reading from many event viewer log files, say you are looking for what patches went on which server? I can find it but can't make it so I can read what the log file lists.

     

    Q: i always find it strange and difficult working with Methods and such when i do the get-Member.  also with some of the variables you use $Object.This.That is that from the .Net Framework and if so how do we learn this?  is it something i am missing?

     

    Q: Tkx :)

     

    Q: Thanks for the PSObject question.  I found the thing you referred to if you want to put the URL up later:

     

    Q: http://poshoholic.com/2008/07/03/essential-powershell-name-your-custom-object-types/

     

    Q: I am asking this because I take off several foreachs using this and better, gets more faster than the old way

     

    Q: Could Don talk about when making an object about the other membertypes (other than noteproperty) like ScriptProperty and where you might use it?

     

    Q: how do you feel about creating a custom object this way; $obj = "" | select prop1, prop2

     

    Q: In the case of multiple values for the same property, like multiple disks/cpu,... How Powershell will output the result in a Table (format-table), will it repeat the servername ?

     

    Example of output

     

    server01 C: 30gb

    server02 C: 40GB

    server02 D: 20GB

     

    Q: At least for EMC, you can filter a disk from WMI by using wmiDiskDrive.Caption = UCase("power") using objWMIService.ExecQuery ("Select Caption, DeviceID From Win32_DiskDrive")

     

    Q: why no 20% off for silnger users?

    A: Keep attending PS webcasts and you may get one in the future! Right now we're focusing on the summer bundle special...

     

    Q: in the nested foreach loop

     

    Q: Question: send output thru email.... upon high level alert say on CPU or regarding IO usage etc

     

    Q: where are folks asking Don questions?

     

    Q: after the -Property string

     

    Q: powershellcommunity.com forums are pretty new user friendly for getting help

     

    Q: schedule PS script to run on routine basis

     

    Q: Why do you use [string[]]?

     

    Q: Do you have any powershell websites that are Microsoft Exchange based that would be helpful for people just getting started with powershell?

     

    Q: The $ sign question was for the powerhourdisks file

    A: Hey, Bill - good to see you here!

     

    Q: I see lots of PowerShell scripts using .NET stuff directly (eg [System.Environment]).  Any good sources of info for what's useful here for us non-developers who don't really understand that stuff?  Thank.

     

    Q: can the powershell have a certificate?  How can I guarantee that script is not destructive?

     

    Q: Let me rephrase. Why use [string[]] over [string]?

    A: string[] is an array of strings, string is a single string variable

     

    Q: I'd like to see using a dos tool inside the powershell.  like certutil that I am not aware of a way to do this from PS

     

    Q: Response to HTML question, use convertto-html -fragment and then add the fragments together to make one HTML file from multiple objects

     

    Q: How would you approach FTP (get,put), ZIP compression of data files (dir, get & put) and Form presentation methods /  transactions,

     

    Q: (note on the last comment - unless you tokenize your datapoints and use some programming to read the tokens in your flat data file.)

     

    Q: Thanks, great presentation! As an experienced  systems programmer who's only used powershell for very basic things and would like to do more, this really illustrated what's possible and the sample example was very practical. Enjoyed seeing the powershell plus tool too.

     

    Q: Also being on the 'outside' of SharePoint lists to drawn down or post to

     

    Q: tostring ?

Reply Children
No Data