<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Occasional initialization error with PowerShell in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258397#M18092</link>
    <description>Chris,&lt;BR /&gt;You are right. It's hard to find out what is going on.&lt;BR /&gt;I try to inspect the log files "powershell_log.#####.txt" generated by EG.&lt;BR /&gt;&lt;BR /&gt;It was embarrassed that no such file generated when the problem occurred. The case was stuck on "New-Object" of "SASEGObjectModel". The case did not reproduce every time and occurred in an random manner. It was pretty hard to troubleshoot.&lt;BR /&gt;My information was only relied on the $_.Exception catched by PowerShell script.</description>
    <pubDate>Wed, 23 Mar 2016 02:11:24 GMT</pubDate>
    <dc:creator>LenFocus</dc:creator>
    <dc:date>2016-03-23T02:11:24Z</dc:date>
    <item>
      <title>Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/255478#M17923</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PowerShell 4.0 to call up SAS EG object for generating reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; &amp;nbsp;$eguideApp=New-Object -comObject &amp;nbsp;"SASEGObjectModel.Application.7.1"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Occasionally exception would be thrown with the following information in the error log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&amp;gt; System.TypeInitializationException: The type initializer for 'SAS.Shared.SharedEnvironment' threw an exception. ---&amp;gt; System.Management.ManagementException: Provider load failure&lt;BR /&gt;at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)&lt;BR /&gt;at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()&lt;BR /&gt;at SAS.Shared.HWInfo.InitInfo()&lt;BR /&gt;at SAS.Shared.SharedEnvironment..cctor()&lt;BR /&gt;--- End of inner exception stack trace ---&lt;BR /&gt;at SAS.Shared.SharedEnvironment.get_SharedDataFolder()&lt;BR /&gt;at SAS.EG.Scripting.Application..ctor(String _cmdLineProvider)&lt;BR /&gt;--- End of inner exception stack trace ---&lt;BR /&gt;at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp;amp; canBeCached, RuntimeMethodHandleInternal&amp;amp; ctor, Boolean&amp;amp; bNeedSecurityCheck)&lt;BR /&gt;at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp;amp; stackMark)&lt;BR /&gt;at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp;amp; stackMark)&lt;BR /&gt;at System.Activator.CreateInstance(Type type, Boolean nonPublic)&lt;BR /&gt;at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp;amp; stackMark)&lt;BR /&gt;at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&lt;BR /&gt;at System.Activator.CreateInstance(Type type, Object[] args)&lt;BR /&gt;at Microsoft.PowerShell.Commands.NewObjectCommand.SafeCreateInstance(Type t, Object[] args)&lt;BR /&gt;at Microsoft.PowerShell.Commands.NewObjectCommand.CreateComObject()&lt;BR /&gt;at Microsoft.PowerShell.Commands.NewObjectCommand.BeginProcessing()&lt;BR /&gt;at System.Management.Automation.Cmdlet.DoBeginProcessing()&lt;BR /&gt;at System.Management.Automation.CommandProcessorBase.DoBegin() :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no idea what 's going on and try again to make all the things done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 09:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/255478#M17923</guid>
      <dc:creator>LenFocus</dc:creator>
      <dc:date>2016-03-09T09:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/255513#M17929</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure about what is going on over there, but I can imagine the following possibilities:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - A provider is failing, as your log mentions. For troubleshooting this, you can follow this wonderful guide&amp;nbsp;&lt;A href="https://blogs.technet.microsoft.com/heyscriptingguy/2012/09/12/use-powershell-to-troubleshoot-provider-load-failure/&amp;nbsp;" target="_blank"&gt;https://blogs.technet.microsoft.com/heyscriptingguy/2012/09/12/use-powershell-to-troubleshoot-provider-load-failure/&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- When you manually load/run the EG client, are you finding any error anytime? Please check.&lt;/P&gt;&lt;P&gt;- Probably you can enable the Logs of Enterprise guide and see if there is anything over there:&amp;nbsp;&lt;A href="http://support.sas.com/kb/55/414.html&amp;nbsp;" target="_blank"&gt;http://support.sas.com/kb/55/414.html&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3- I can see an error related to the load/location of the Shared Data folder, which is strange, unless you already made connection to a metadata server. If you did, maybe there is something on the metadata server logs (permissions on the Shared Data folder?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4- Less frequent, but also possible, maybe not all the dlls of EG or .NET are properly registered. For .NET I suggest a clean re-installation of the framework, and for EG, you can run EGuide.exe -register (or /register).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 13:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/255513#M17929</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2016-03-09T13:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258158#M18063</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks but&amp;nbsp;I still could not&amp;nbsp;work out the solution in these few weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Still trying but no hints can be found.&lt;/P&gt;&lt;P&gt;2. Manual launch did not show the error.&lt;/P&gt;&lt;P&gt;3. A connection has been set in the default profile an credential. I am not sure whether the connection is establishing once "new-object" is called.&lt;/P&gt;&lt;P&gt;4. I also think in this way. But not sure which .dlls I have to re-register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 09:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258158#M18063</guid>
      <dc:creator>LenFocus</dc:creator>
      <dc:date>2016-03-22T09:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258191#M18073</link>
      <description>&lt;P&gt;I think the exception is happening when EG is trying to connect to your SAS environment using your stored credentials. &amp;nbsp;I don't know why it's happening, but if your script is running several times in succession or in parallel, perhaps it's a contention issue. &amp;nbsp;I don't think it's a DLL registration problem -- the fact that you're getting into EG application code shows that the EG object model is properly registered.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 12:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258191#M18073</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-03-22T12:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258397#M18092</link>
      <description>Chris,&lt;BR /&gt;You are right. It's hard to find out what is going on.&lt;BR /&gt;I try to inspect the log files "powershell_log.#####.txt" generated by EG.&lt;BR /&gt;&lt;BR /&gt;It was embarrassed that no such file generated when the problem occurred. The case was stuck on "New-Object" of "SASEGObjectModel". The case did not reproduce every time and occurred in an random manner. It was pretty hard to troubleshoot.&lt;BR /&gt;My information was only relied on the $_.Exception catched by PowerShell script.</description>
      <pubDate>Wed, 23 Mar 2016 02:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258397#M18092</guid>
      <dc:creator>LenFocus</dc:creator>
      <dc:date>2016-03-23T02:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Occasional initialization error with PowerShell</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258407#M18093</link>
      <description>&lt;P&gt;WMI-activity has been shown the following event:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Id = {DC7E0B54-5DA3-0006-5A2B-83DCA35DD101}; ClientMachine = ABCDIIS01; User = contoso\user; ClientProcessId = 5288; Component = Unknown; Operation = Start IWbemServices::CreateInstanceEnum - root\cimv2 : Win32_ComputerSystem; ResultCode = 0x80041013; PossibleCause = Unknown&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 04:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Occasional-initialization-error-with-PowerShell/m-p/258407#M18093</guid>
      <dc:creator>LenFocus</dc:creator>
      <dc:date>2016-03-23T04:39:31Z</dc:date>
    </item>
  </channel>
</rss>

