Legal: Reuse RDL Object Model from decompiled Microsoft.ReportingServices.Designer.Controls.dll
Hi,
We need to create complex RDLs from code, from scratch and be able to modify existing one.
The ideal solution is to use RDL Object Model classes from the Microsoft.ReportingServices.Designer.Controls.dll that ships with SSRS 2012.
Unfortunately that dll is only for x86 and requires lots of depdendencies.
One of our devs, decompiled that dll and extracted only RDL OM classes, packed into new DLL and made it Any CPU-enabled.
I do not allowed this approach and wanted to find out first - is it legal doing this? The dll is going to be installed on our IIS-boxes.
The RDL standard is open so theoretically, re-using plain RDL-OM classes should be legal.
Thanks,
Alex
Hi Alex,
It’s illegal if you want to reuse RDL Object Model through decompiling Microsoft.ReportingServices.Designer.Controls.dll.
Regards,
Heidi Duan
If you have any feedback on our support, please click
here.
Heidi Duan
TechNet Community Support
Similar Messages
-
SSRS - Rdl Object Model approach validity to genrate .rdl file on the fly
Hi,
I see that, if you want to generate RDL files programmatically using c# we have the approach of using XMLDocument object.
However I also found that, we can use Rdl object model dll to generate .rdl files. As per the link -
https://connect.microsoft.com/SQLServer/feedback/details/540183/supported-rdl-object-model-rdlom
the support is discontinued and still there are no updates. Can somebody tell me why Rdl Object model approach to generate .rdl was discontinued or never made as public by micorosoft?
So what is the best way microsoft promotes to generate rdl? using XMLDocument only?
Mark As Answer if it helps you |
My BlogHi Kunal,
The RdlObjectModel is still available in SQL Server 2008 R2 Reporting Services and SQL Server 2012. It’s true that the SQL Server Reporting Services product team once considered discounting the RDL object model in SSRS 2008 R2, but eventually the feature
was kept and continued being used in current release.
Reference:
http://technet.microsoft.com/en-us/library/microsoft.reportingservices.rdlobjectmodel.aspx
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
How to connect to Indesign object model from VBA (Macintosh_Office)?
In PC it was: find/load tlb-file and chek box to activate. In Mac i don't see any tlb-files, so can't add this lib to VBA reference. Can i do this at all?
Hi,
According to your description, you might want to connect SharePoint Online environment using Client Object Model.
For the authentication, you can take a look at the link below with code demo provided:
http://www.vrdmn.com/2013/01/authenticating-net-client-object-model.html
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
All objects disappear from target location in the Control Center
Hi,
I don't know if this is an OWB bug or if there's some issue with my particular installation, but sometimes when I open Control Center to deploy/run objects they are not there, the particular location (target location in this case) appears empty.
I had seen this a couple of times before but thought that it might be some mistake on my part (selecting the wrong location, db connectivity, etc).
Have you seen this? I'm using OWB 10g Rel 2 with Oracle DB 10g Rel 2.
Regards,
--oswaldo
[osantos]There is nothing in place. How is turning off location services saving you power? It doesn't use any unless you are using it. However, if you feel strong about it, you can make a suggestion to Apple feedback HERE and click on the appropriate link.
-
If I have a sub site URL and a user with Site Admin, can I list all users in that sub site that have Full Control at that level?
Any C# code sample?Still you can do that, just pass the subsites to your code and from their you can find the users dynamically.
You could also use SPWeb.Users property to get users assigned to a subsite
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.users(v=office.15).aspx
alternatively you can also use SPWeb.SiteUsers to get all users
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.siteusers(v=office.15).aspx
other APIs of help-
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedmembergroup(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedownergroup(v=office.15).aspx
http://sharepoint.stackexchange.com/questions/101671/object-model-list-all-users-with-full-control-on-a-sub-site-in-sharepoint-2013
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if my reply helps you -
Rename a File in a SharePoint document library through Client object model
Hi,
How to Rename a File in a SharePoint document library through Client object model?
Thanks
Poomani SankaranHi,
According to your description, you want to rename file in the document library using SharePoint Client Object Model.
Here is a code snippet works well in my environment for your reference:
static void Main(string[] args)
string url = "http://sp2013sps/sites/test/";
ClientContext clientContext = new ClientContext(url);
Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Documents");
clientContext.Load(spList);
clientContext.ExecuteQuery();
if (spList != null && spList.ItemCount > 0)
Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml =@"<View> <Query> <Where><Eq><FieldRef Name='LinkFilenameNoMenu' /><Value Type='Computed'>New Microsoft Word Document.docx </Value></Eq></Where> </Query> <ViewFields><FieldRef Name='Title' /></ViewFields> </View>";
ListItemCollection listItems = spList.GetItems(camlQuery);
clientContext.Load(listItems);
clientContext.ExecuteQuery();
listItems[0]["Title"] = "word.docx";
listItems[0]["FileLeafRef"] = "word.docx";
listItems[0].Update();
clientContext.ExecuteQuery();
More information about SharePoint Client Object Model:
http://msdn.microsoft.com/en-us/library/office/ee537247(v=office.14).aspx
http://www.codeproject.com/Articles/399156/SharePoint-Client-Object-Model-Introduction
http://www.learningsharepoint.com/2010/07/12/programmatically-upload-document-using-client-object-model-sharepoint-2010/
Best regards -
Does anyone know if any of the Oracle dev suite can generate an object model from an existing JDeveloper project / workspace?
It would be really handy to demonstrate visually all the objects in my application.
TIA
ConradHi,
You can achieve your demand using SharePoint Group Calendar:
For Group A:
Create a Repeating Schedule as below:
For Group B and Group C:
Create two Repeating Schedules as below:
Also you can have a look at the blog:
http://absolute-sharepoint.com/2014/06/create-color-coded-group-calendar-sharepoint-2013-step-step.html
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Eric Tao
TechNet Community Support -
Hello,
I am supporting Report Server 2008 R2 with integrated mode to SharePoint 2010. For one of the report, if records are over 300, the report will not show on IE, but on status bar, there will be error as:
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
And from Report Log File, there are bunch of error message as:
processing!ReportServer_0-35!548!01/07/2014-11:17:13:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'dataset1'. ---> System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.GetApartmentStateNative()
at Microsoft.SharePoint.Library.SPRequest..ctor()
at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode)
at Microsoft.SharePoint.Administration.SPFarm.get_RequestAny()
at Microsoft.SharePoint.Utilities.SPUtility.GetLocalizedString(String source, String defaultResourceFile, UInt32 language)
at Microsoft.SharePoint.SPField.get_TitleResource()
at Microsoft.SharePoint.SPField.get_Title()
at Microsoft.ReportingServices.SharePoint.Objects.RSSPImpField.get_Title()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPLocalCommand.DataReader.PrepareListInfoImpl()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPDataReaderBase.PrepareListInfo()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPCommandBase.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
--- End of inner exception stack trace ---;
processing!ReportServer_0-35!548!01/07/2014-11:17:14:: e ERROR: An exception has occurred in data set 'dataset1'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'dataset1'. ---> System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.GetApartmentStateNative()
at Microsoft.SharePoint.Library.SPRequest..ctor()
at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode)
at Microsoft.SharePoint.Administration.SPFarm.get_RequestAny()
at Microsoft.SharePoint.Utilities.SPUtility.GetLocalizedString(String source, String defaultResourceFile, UInt32 language)
at Microsoft.SharePoint.SPField.get_TitleResource()
at Microsoft.SharePoint.SPField.get_Title()
at Microsoft.ReportingServices.SharePoint.Objects.RSSPImpField.get_Title()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPLocalCommand.DataReader.PrepareListInfoImpl()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPDataReaderBase.PrepareListInfo()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPCommandBase.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
Could anyone give me suggestions or advise on this?
Thank you very much!Hi,
The forum supports .Net Framework Setup. Your issue isn't related to the forum.
I will move it to the related forum for better support.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
I only recently learned/read about SharePoint's JavaScript Client Object Model. I'm reading online trying to figure this out but not having much luck.
On newform.aspx (and dispform.aspx) I want to get the
current list,
the last item created, and it's attachments. I now the CAML query I need to get the last item created, but first I have to get the current list and I am not sure how to do that.
I tried this but it returns null:
SP.ListOperation.Selection.getSelectedList()Hi,
For your issue, you can get the list name from the new form url and retrieve the list last created item :
https://social.msdn.microsoft.com/Forums/office/en-US/b90a64f8-2255-41b0-9d91-78335dd4a4cf/get-list-name-from-list-url-through-javascript?forum=sharepointdevelopmentprevious
http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Sharepoint client object model - Pull files from one site and move to another
Dear All,
I am using client object model to retrieve files of certain criteria using caml query and copy them to some other site using
client object model. There is no exception being thrown, but the application is not performing either. No files are being copied to destination. Here is the code. Please advise.
The message box that I have kept at the end is being displayed, but no files are being copied.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Net;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.SharePoint;
using SP = Microsoft.SharePoint.Client;
namespace WindowsFormsApplication2
public partial class Form1 : Form
public Form1()
InitializeComponent();
private void Form1_Load(object sender, EventArgs e)
private void button1_Click(object sender, EventArgs e)
SP.ClientContext srcContext = new SP.ClientContext(textBox1.Text);
srcContext.Credentials = new NetworkCredential(textBox3.Text, textBox4.Text, textBox5.Text);
SP.ClientContext destContext = new SP.ClientContext(textBox2.Text);
destContext.Credentials = new NetworkCredential(textBox3.Text, textBox4.Text, textBox5.Text);
SP.CamlQuery camlQuery = new SP.CamlQuery();
camlQuery.ViewXml = "<View Scope='RecursiveAll'><Query><Where><And><Geq><FieldRef Name='Created' /><Value IncludeTimeValue='TRUE' Type='DateTime'>2013-01-01T04:16:20Z</Value></Geq><And><Lt><FieldRef
Name='Created' /><Value IncludeTimeValue='TRUE' Type='DateTime'>2013-12-31T04:16:43Z</Value></Lt><Or><Eq><FieldRef Name='Document_x0020_Classification' /><Value Type='Choice'></Value></Eq><Eq><FieldRef
Name='Document_x0020_Classification' /><Value Type='Choice'>Case Studies</Value></Eq></Or></And></And></Where></Query></View>";
SP.Web oWebsite = srcContext.Web;
srcContext.Load(oWebsite, website => website.Webs);
srcContext.ExecuteQuery();
SP.Web dWebsite = destContext.Web;
destContext.Load(dWebsite);
destContext.ExecuteQuery();
foreach (SP.Web web in oWebsite.Webs)
MessageBox.Show(web.Title);
foreach (SP.List list in web.Lists)
if (list.BaseType.ToString() == "DocumentLibrary")
MessageBox.Show(list.Title);
SP.ListItemCollection collListItem = list.GetItems(camlQuery);
srcContext.Load(collListItem);
srcContext.ExecuteQuery();
foreach (var doc in collListItem)
SP.File f = doc.File;
srcContext.Load(f);
srcContext.ExecuteQuery();
string destLibrary = "shared Documents";
string nLocation = dWebsite.ServerRelativeUrl.TrimEnd('/') + "/" + destLibrary.Replace(" ", "")
+ "/" + f.Name;
SP.FileInformation fileInfo = SP.File.OpenBinaryDirect(srcContext, f.ServerRelativeUrl);
SP.File.SaveBinaryDirect(destContext, nLocation, fileInfo.Stream, true);
MessageBox.Show("Completed");
sk.RakhishmaHi,
To copy files from one site collection to another site collection, the simplest way is to open document library in windows explorer view.
Go to document library, click library tab, click open with explorer.
You can open the document library1 in explorer then copy the files which you want to paste to another site collection
document library2, then open the document library2 in explorer to paste the documents.
Besides, there are other method:
https://social.msdn.microsoft.com/Forums/office/en-US/67282348-25c7-4bd0-9d95-61024c6892f9/how-we-move-a-document-library-from-one-site-collection-to-another-sitecollection?forum=sharepointgeneralprevious
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/8c112d85-1ab8-426b-be37-d010cf8647fe/copy-a-list-from-one-site-collection-to-another-using-web-service
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Unable to create Model from DOE Data Object
Hi,
I created a Mobile Laptop WebDynpro DC in NWDS 7.1, the build and deploy work fine.
The problem is that when I attempt to create a Model based on a Data Object from the
Mobile Middleware 7.1 DOE, I always get an exception when the Data Object metadata is
imported (the last step of the Model Creation Wizard).
Here's the exception :
Status ERROR
Plugin : com.sap.ide.cmi.core
code=0
Internal error
Plugin name: Common Model Tools Core
Internal error : com.sap.ide.cmi.core
Class : com.sap.tc.mobile.dt.metaimp.ModelImportWizard
Method : run(IProgressMonitor)
Message : Failed to create model
Exception : com.sap.ide.metamodel.general.exception.ObjectRequiredException: ModelClassPropertySetting "//WebDynpro/ModelClass:ca.test.sandbox.mitest1.test3.ZTESTDATAOBJ/Property:ACTUAL/Setting:backendKey", Role "SettingDefinition": A minimum of 1 object(s) is required
ObjectRequiredException: ModelClassPropertySetting "//WebDynpro/ModelClass:ca.test.sandbox.mitest1.test3.ZTESTDATAOBJ/Property:ACTUAL/Setting:backendKey", Role "SettingDefinition": A minimum of 1 object(s) is required
at com.sap.ide.metamodel.webdynpro.implementation.ModelClassPropertySettingProxy._validate(ModelClassPropertySettingProxy.java:358)
at com.sap.ide.metamodel.core.DevelopmentObjectProxy.validate(DevelopmentObjectProxy.java:825)
at com.sap.tc.mobile.dt.metaimp.MBOModelImporter.doImport(MBOModelImporter.java:170)
at com.sap.tc.mobile.dt.metaimp.ModelImportWizard.createModel(ModelImportWizard.java:200)
at com.sap.ide.cmi.core.model.importer.CMIWizard$2.run(CMIWizard.java:197)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
I know this is not related to Middleware authorization, I tested with a userid with full DOE authorization.
When I display the Data Object metadata from the Middleware, it shows as status 'active'.
The exception seems to complain about the backend key, but there is a backend key field in
the Data Object.
I have the same exception even with any SAP delivered Data Objects (MAM30_001, etc..).
any thoughts on what the problem is ?
thanks,
Yanick.Hi Yannick,
This type of error can occur with local non-dc Mobile App when some jars required for the model generation are missing.
The easiest way to fix this is to create a DC for your Mobile app from the
Mobile App Offline perspective.
Let me know if it works
Genevieve -
Create a site collection with dedicated content db with the help of server object model
Hi,
I have a requirement to implement a create a new site collection with dedicated content db. i have got 2 PowerShell scripts which does the same. first i will create a content db and then create the sitecollection with contentdb
parameter with the created contentdb name.
Now the site collection created must contain few doc libs and few splists with look up columns, people picker data type, multiline of text, single line of text,choice field. hence i am thinking the below approach:
1) create a web template and include sp doclibs, splists , site columns in this.
2) i am thinking of a ui design to create the below:
These are called "projects" which is actually the site collection with the doclibs, splists and must be created by sharepoint admin on click of a link in my landing page.end users access these "projects" aka
"site collections" and uploads the documents into these projects and collaborate.
so my question is : On click of a button can I create a site collection with a dedicated content db based on the web template created with the hel of server object model?
The other approach is on click of this button call the power shell script which accepts the sitecollection name and contentdb name as parameter. is this possible in server obj.model ?
passing a paramter from code behind- visual web part ui to power shell ?
and it should create the site collec based on the web template and create the content db.
my doubt #3 : will it not throw error "request timed out" when creating the site collec and contentdb from ui ?Try below:
http://sharepoint.stackexchange.com/questions/21606/programmatically-create-a-site-collection-in-an-existing-mounted-content-databa
PowerShell is just a wrapper for the object model. You shouldn't need to reference PowerShell in your feature, just create the new site collection with C# inside your feature. There's a blog post here that illustrates some code that may get you started.
http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/
http://blogs.msdn.com/b/vesku/archive/2014/06/09/provisioning-site-collections-using-sp-app-model-in-on-premises-with-just-csom.aspx
# Enable the remote site collection creation for on-prem in web application level
# If this is not done, unknon object exception is raised by the CSOM code
$WebApplicationUrl = http://dev.contoso.com
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snapin -eq $null)
Write-Host "Loading SharePoint Powershell Snapin"
Add-PSSnapin "Microsoft.SharePoint.Powershell"
$webapp=Get-SPWebApplication $WebApplicationUrl
$newProxyLibrary = New-Object "Microsoft.SharePoint.Administration.SPClientCallableProxyLibrary"
$newProxyLibrary.AssemblyName = "Microsoft.Online.SharePoint.Dedicated.TenantAdmin.ServerStub, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
$newProxyLibrary.SupportAppAuthentication = $true
$webapp.ClientCallableSettings.ProxyLibraries.Add($newProxyLibrary)
$webapp.Update()
Write-Host "Successfully added TenantAdmin ServerStub to ClientCallableProxyLibrary."
# Reset the memory of the web application
Write-Host "IISReset..."
Restart-Service W3SVC,WAS -force
Write-Host "IISReset complete."
If this helped you resolve your issue, please mark it Answered -
Trying to use Web LCID property to get the List name in client object Model
Hi ,
I am trying to change the "Personal Documents" list NoCrawl property under MySite using SharePoint Client Object Model. As we use web.Lists.GetByTitle("Personal
Documents"); method to get the list,but here problem is :for different language List name is in their language.So I tried to use LCID property of the WEB and
have taken key-value pair (PersonalSiteOnet_List_PersonalDocuments) from the resource file for that language from 14 hive.
Example:I have selected Spanish language .there are so many LCID for Spanish language but Microsoft has given only one language pack for Spanish.
Then,My Question is that
"All LCID for Spanish language are using same Spanish language pack dictionary file OR something else"
Hi,
According to your post, my understanding is that your requirement is getting list in different language.
Here are two ways for your reference:
1. We can use getById method instead, so that we can avoid the language issue.
2. We can use an array to store the different list name in different language in you JavaScript code, then use the code snippet below to get the list:
var userLcid =_spPageContextInfo.currentLanguage;
var localizedStrings = {
ListName: {
_1033: "EnglishName",
_3082: "SpanishName"
var listName=localizedStrings.ListName["_" + userLcid];
var list=web.Lists.getByTitle(listName);
More information:
http://msdn.microsoft.com/en-us/library/hh670609.aspx
http://wellytonian.com/2012/11/language-packs-sharepoint-2010/
Best Regards
Dennis Guo
TechNet Community Support -
This is a follow-up to an earlier post (How
to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
with a clever name like $Computers?
# http://ss64.com/ps/get-wmiobject-win32.html
# http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
# http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
# http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
Param(
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
[string]$ComputerName = $env:COMPUTERNAME,
[Parameter(Mandatory=$false,ValueFromPipeline=$false)]
[ValidateScript(
If ( $_ -ne $null ) { Test-Path $_ }
[String]$ComputerListFile
Function Get-Computer
Param(
[string]$ComputerName
$Win32_PingStatus = $null
$Win32_PingStatus_Result = $null
$Win32_OperatingSystem = $null
$Win32_Processor = $null
$Win32_PhysicalMemory = $null
$Win32_ComputerSystem = $null
$Win32_BIOS = $null
$Computer = $null
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerName ping succeeded."
$Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
If ( $Win32_OperatingSystem -eq $null)
"$ComputerName WMI failed."
} Else {
"$ComputerName WMI succeeded."
$Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
$Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
$Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
$Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
$Computer = New-Object -Type PSObject -Property @{
Name = $Win32_OperatingSystem.CSName
Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
#Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
#Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
#Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
#Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
Win32_Processor_Count = [int]$Win32_Processor.Count
Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
#Win32_Processor_Description = [string]$Win32_Processor[0].Description
Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
Win32_Processor_Name = [string]$Win32_Processor[0].Name
} ## end new-object
$Computer
} Else {
"$ComputerName ping failed."
$ComputerNameMgmt = $ComputerName + "-mgmt"
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerNameMgmt ping succeded."
} Else {
"$ComputerNameMgmt ping failed."
"$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
"Processing computer $ComputerName"
Get-Computer( $ComputerName )
} Else {
"Processing computer list $ComputerList"
$ComputerList = Get-Content $ComputerListFile
$Computers = @{}
$Results = @()
ForEach( $ComputerListMember in $ComputerList )
"$(Get-Date -Format o) $ComputerListMember"
# Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
# http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
# $Compuers += New-Object PSObject -Property $Props
# $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
Get-Computer( $ComputerListMember )
"$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
If I try something like this:
Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
I get the following, even though $_.Name is not null.
Add-Member : Cannot bind argument to parameter 'Name' because it is null.
At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
+ Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
+ CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
Or if I try this:
$Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
I get this:
New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
+ $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
+ CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommandHi Aenagy,
If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
$output = @()#to output information of the all the computers
ForEach( $ComputerName in $ComputerList ){#loop all the computers
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerName ping succeeded."
$Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
If ( $Win32_OperatingSystem -eq $null)
"$ComputerName WMI failed."
Else {
"$ComputerName WMI succeeded."
$Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
$Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
$Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
$Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
$Computer = New-Object -Type PSObject -Property @{
Computername = $ComputerName #add the property computername
Name = $Win32_OperatingSystem.CSName
Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
#Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
#Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
#Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
#Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
Win32_Processor_Count = [int]$Win32_Processor.Count
Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
#Win32_Processor_Description = [string]$Win32_Processor[0].Description
Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
Win32_Processor_Name = [string]$Win32_Processor[0].Name
} ## end new-object
$output+=$Computer #combine all the "$computer" to "$output"
Else {
"$ComputerName ping failed."
$output
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support -
Hi,
The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
below my code. I am using Content editor web part and attached my JS file with that :-
<div>
<label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
<input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
</div>
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
<script type="text/javascript">
SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
// This function is called on click of the “Create Document Set” button.
var ctx;
var parentFolder;
var newDocSetName;
var docsetContentType;
function CreateDocumentSet() {
alert("In ClientContext");
var ctx = SP.ClientContext.get_current();
newDocSetName = $('#txtGetDocumentSetName').val();
var docSetContentTypeID = "0x0120D520";
alert("docSetContentTypeID:=" + docSetContentTypeID);
var web = ctx.get_web();
var list = web.get_lists().getByTitle('Current Documents');
ctx.load(list);
alert("List Loaded !!");
parentFolder = list.get_rootFolder();
ctx.load(parentFolder);
docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);
ctx.load(docsetContentType);
alert("docsetContentType Loaded !!");
ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
function onRequestSuccess() {
alert("In Success");
SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
alert('Document Set creation successful');
// This function runs if the executeQueryAsync call fails.
function onRequestFail(sender, args) {
alert("Document Set creation failed" + + args.get_message());
Please help !!
Vipul JainHello,
I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
Value cannot be null.Parameter name: context"...
Also, I tried removing SP.SOD.executeFunc
from my code, but no success :(
Kindly suggest !!!
Vipul Jain
Maybe you are looking for
-
Fusion Drive 4TB + SSD m4 512 Go DEAD can't reformat
Hello, I have an iMac 27 late 2010 i5 3.6 with 16 Go of RAM running 10.8.3 For Christmas, I received a M4 SSD 512 Go and decided to replace the 2TB in my iMac with a 4TB and create a Fusion Drive. The operation worked beautifully and my iMac became i
-
Default keyboards folder in illustrator CC not showing- no .kys file in apps folder
default keyboards folder in illustrator CC not showing- no .kys file in apps folder, The keyboard shorcuts in Illustrator -Edit-shorcuts, don't show default shortcuts either...should I reinstall Illustrator CC?
-
Hi , How to find the number of times the particular t-code has been accessed over a user defined period? If the user didn't access the T.code, the report would show a 0 or a 2 if the user had accessed the report twice. Do we have any standard table o
-
When importing directly from camera into Light room, after ticking 'Preview' only a blank grey image with file number is displayed and no image
-
the link is broken