Jump to content
Software FX Community
Sign in to follow this  
akkmuthu

No data from "PowerGadgets"

Recommended Posts

I have powerShell script to get collection of sites and foramting the collection by using Format-table

If I run using PowerShell, working fine. The same thing is working when I give "Test" from PowerGadgets".

But after giving finish am getting  " No Data Available" screen.

 

My script :

=============  [Microsoft.SharePoint.Administration.SPWebApplicationCollection]$SPWebAppCollection = $oContentService.WebApplications;

 $SPWebAppCollection| Format-Table -autosize  -property Name

 

Please help me on this.

Thanks in advance.

 

-Andamuthu K

Share this post


Link to post
Share on other sites

My script :

# Assembly References[void][system.Reflection.Assembly]::LoadWithPartialName("System") [void][system.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

# *****************************************************************************# Function:   Get-SiteCollection # Description: Populates all the site details of a webfarm.# Parameters:   None # *****************************************************************************function Get-SiteCollection() {   # Getting Content Service of current web farm   $oContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;

  # Getting all the web applications as collection   [Microsoft.SharePoint.Administration.SPWebApplicationCollection]$SPWebAppCollection = $oContentService.WebApplications;

 $SPWebAppCollection| Format-Table -autosize  -property Name}

#Calling main function Get-SiteCollection

 

Share this post


Link to post
Share on other sites

I'm assuming here that you are using Creator, and are cutting and pasting this script into the script window? 

The use of format-table cmdlet seems to change the object structure passed along the PowerShell pipeline.

I started downloading a pre-built SharePoint VM, but my connection reset and I lost what I had so far.  The VM is huge, and there's no way I will be able to get it before Friday.

A few things to try:

1. I'd like to see what '$SPWebAppCollection|get-member' gives from your script.

2. Try removing format-table from the pipline to see what that might give.

Share this post


Link to post
Share on other sites

Are you using the PowerGadgets Creator or are doing this directly from PowerShell.  From the Creator, you will be able to pick what properties to create the chart with, and from PowerShell, you should be able to use the select-object to limit what properties you want to see in the resulting chart.

Share this post


Link to post
Share on other sites

I'm sorry, I need more information on whether you're using the GUI ("PowerGadgets Creator") or PowerShell directly.  How were you wanting to layout the name and the version?  Name on the X axis and version on the Y axis?

Share this post


Link to post
Share on other sites

Please note that our charts require at least one numerical column so if your Name and Version properties are both string I am afraid we will not know how to plot 1.0 or 2.0.5

Theoretically you could write a script to translate 2.0.5 into numbers (e.g. 205) but I am not sure how good this will look.

 JuanC

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...