Powershell New-object Command not reconized am i missing a module?

I want to configure high trusted app for app dev in SharePoint, end to do so i need first to insert some commands in the powershell editor like :
    $publicCertPath = "C:\Certs\HighTrustSampleCert.cer" 
    $certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($publicCertPath)
I am using windows PowerShell on Windows Server 2012 R2 which includes Windows PowerShell 4 that includes by default the new-object cmd-let... I don't understand though, why doesn't my system recognize that command .... Each time i am getting the following
error : New-Object : The term 'New-Object' is not recognized as the name of a cmdlet.
Every time i open power shell it displays me the following error :
*select : The term 'Select-Object' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:1 char:16
+ $ver = $host | select version
+                ~~~~~~
    + CategoryInfo          : ObjectNotFound: (Select-Object:String) [], Comma
   ndNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Set-location : The term 'Set-location' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again
At C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:4 char:1
+ Set-location $home
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Set-location:String) [], Comman
   dNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException*
I thought that was normal until today... does it have any relation with the error?
And here is the hole (new-object) exception stack:
*New-Object : The term 'New-Object' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:16
+ $certificate = New-Object
System.Security.Cryptography.X509Certificates.X509Cert ...
+                ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (New-Object:String) [], CommandN
   otFoundException
    + FullyQualifiedErrorId : CommandNotFoundException*
Can anyone help me please?

the new-object cmdlet is not defined in a module.
Try this:
reboot your computer
start the powershell console
type a new-object command without parameter
this is what happens when I do that:
PS C:\Users\Al> new-object
cmdlet New-Object at command pipeline position 1
Supply values for the following parameters:
TypeName:
what happens on your system?
Al Dunbar 
Aren't you able to see a simple semantic error?
I told you almost never post any technical text, just vague and imprecise generalities.
When you try to post something technical, you post a rubbishellian text like this one, typical of a decrepit old vb scripter 101% PowerShell ignorant.
Certainly, you are the worst rubbishellian I met in this forum.
@admins: will you please, inhibit the reply button for this rubbishellian forum member? He should just ask questions; never answer any of them.
Your post above is off-topic in this thread, as it is a personal attack on me that contains no information likely to actually help the OP with his problem.
I was not aware that you are the arbiter here of what is appropriate to post, especially given your collection of abusive posts and banned accounts.
Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

Similar Messages

  • The term 'new-object' is not recognized as the name of a cmdlet, function, script file, or operable program.

    I have a script that runs well the vast majority of the time.  On occasion I get an exception.  I would appreciate any insight as to why it fails on occasion.  I can't understand why the new-object cmdlet wouldn't be recognized:
    Message: The term 'new-object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    Source: System.Management.Automation
    StackTrace:    at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
       at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
       at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
       at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
       at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
       at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
       at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
       at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    Here is the script I am running:
    param([string]$endpoint)
    $ErrorActionPreference = "Stop";
    try
     [System.Reflection.Assembly]::LoadFile("D:\dotNET_Apps\dotNETCOExBatch\DotNETCOExBatch\bin\DotNETCOExBatch.dll")
     $schedule = new-object DotNETCOExBatch.CallService
     $reply = $schedule.CallWebService($endpoint)
     if ($reply)
      $host.setshouldexit(0)
     else
      $host.setshouldexit(8)
    Catch
     $nl = [Environment]::NewLine
     $evt=new-object System.Diagnostics.EventLog("Application")
     $evt.Source="BatchPowerShell"
     $infoevent=[System.Diagnostics.EventLogEntryType]::Error
     $batchException = $_.Exception
     $logMessage = " "  
     while ($batchException)
      $exMessage = $batchException.Message
      $exStackTrace = $batchException.StackTrace
      $exSource = $batchException.Source
      $logMessage += "$nl $nl Message: $exMessage $nl $nl Source: $exSource $nl $nl StackTrace: $exStackTrace" 
      $batchException = $batchException.InnerException 
     $evt.WriteEntry(" Error starting or process cancellation of $endpoint $logMessage",$infoevent)
     $host.setshouldexit(15)

    Hi,
    Please close your current powershell console, and start a new Window, and then check the result.
    Like David replied, this is a strange issue, hard to find the cuase, but I will report the issue, hope
    someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Regards,
    Yan Li
    TechNet Subscriber Support
    If you are
    TechNet Subscription
    user and have any feedback on our support quality, please send your feedback
    here.
    Cataleya Li
    TechNet Community Support

  • Getting ORA-20001: Creation of new object is not allowed: !!

    Hi Am getting ORA-20001: Creation of new object is not allowed while enabling constraints after importing the dumps from source to target datbase,can anyone assist me to fix this issue.

    Hi Osama/Mustafa,Thanks for your quick response,can you please explain me the following things-
    1)As i don't have privilege to run the DBA_XX views,am not able to run those queries-
    SELECT OWNER, TRIGGER_NAME, TRIGGER_BODY FROM DBA_TRIGGERS WHERE TRIGGER_TYPE IN ('AFTER EVENT', 'BEFORE EVETN') AND TRIGGERING_EVENT LIKE '%CREATE%';
    can you tell me what output it'll throw,based on this output how will we fix the issue.
    2)SELECT * FROM dba_sys_privs WHERE privilege = 'UNLIMITED TABLESPACE';
    why we need to check this privilege?as i don't have privilege to run this one in my db.
    3)select * from dba_source where upper(text) like upper('%Creation of new object is not allowed%');
    as i don't have privilege to run this one in my db,already i got the object name from my logfile
    and more you have quoted"This is an error of someone that coded purposely on your database, probably dba or a developer who has privilege and again it is in a database event trigger"
    4)can you explain me much more deeper about the root cause and as already sent note to my DBA,can you explain me the solution to fix this issue ?

  • New Page command not working in SMARTFORM

    I have a text file in an internal table of type TSFTEXT.  I'm passing this internal table to my smartform.  The smart form has 1 page, 1 main windo and 1 text element.  The text has a text type of "Dynamic Text" and a fieldname = <<internal table of type TSFTEXT>>.  The start property = "New Paragraph".
    In the internal table (TSFTEXT), i have a few NEW-PAGE commands.  These seem to be ignored.  How can I force the smartform to create a new page.  Here is what the internal table looks like.
    / here is some text 1
    / here is some text 2
    / here is some text 3
    / here is some text 4
    / here is some text 5
    /:NEW-PAGE
    / here is some text 6
    / here is some text 7
    / here is some text 8
    / here is some text 9
    / here is some text 10
    Thank you,

    As far as I know, NEW_PAGE is not applicable in smartforms. That only applies to Sapscripts. As you stated in your requirement, to have a new-page in smartform, try to adjust the height of the main window. Once the records on the internal table reaches the total height, then it will automatically create a new page...

  • Align to pixel grid for new object does not work

    I have set my document to align new objects (shapes) to pixel grid under the advanced settings
    I have gone into the options on the transform panel and set the check box to say all new objects should also align to pixel grid
    But when I create a shape it doesn't work, I end up with shapes with 3 digit decimal sub pixel sizes. eg. 34.536px
    If I want an object to align to pixel grid I'm having to set it individually for each object.
    Is this a bug that will get fixed or is there some work around, it's frustrating to have to set the feature for every single object I create

    Align new Objects to pixel grid setting works perfectly for all tools in Adobe Illustrator CC (17). In Illustrator 2014 CC (18) the rectangle and rounded rectangle tool do not automatically align to pixel.
    This thread says it's because of the new Live Rectangle tool objects are exempt from the Align to Pixel grid until you release them by expanding them.
    Bug? Illustrator CC 2014 and Pixel Grid settings not working.
    I'll be using the old version until Adobe 'fixes' this.

  • C7280 NEW INK CARTRIDGES NOT RECONIZED

    I bought a pack of all new ink cartridges. I was only going to replace the ones that were empty but after I got errors saying that the dark blue was now too empty I decided to change them all to new. It still says that the dark blue is empty and the dark pink one went from almost empty to totally empty. It tells me on the main screen that I cannot print because the blue one is empty but not the pink one. BUt if I go to the ink levels it shows both are empty. All of them are new. I tried to do this reset solution that I found on another post that has to do with holding down the # and 6 and that didn't work at all. I do see that there is a little splash of blue around the blue cartridge. I seriously need to get the printer working because I have to print out shipping labels. Thanks to anyone that can help me out.

    Hi dizdevil1
    What results do you get when you check the ink levels?
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00414934&cc=us&lc=en&dlc=en&product=447851&tmp_...
    Have you contacted Phone Support about this yet?
    Thanks, Ciara
    Although I am an HP employee, I am speaking for myself and not for HP.
    Twitter: @Ciara_B_HP

  • New object can not update existed child object

    I have three classes, they are DraftOrder, Order and SaleItem,
    public class DraftOrder{
    private List<SaleItem> saleItems; // not check private owned
    public class Order{
    private List<SaleItem> saleItems; // check private owned
    public class SaleItem{
    private ValueHolderInterface draftOrder;
    private ValueHolderInterface order;
    Now, I have one DraftOrder instance, I modify it from UI, and save it as Order, I want to the toplink to do following steps,
    1, insert Order data into db
    2, update SaleItem into DraftOrder to Order, don't excute delete and insert, only update
    3, delete DraftOrder
    In my Java code, i have moved the SaleItems to Order,
    but toplink dont update the SaleItem,
    who can help on it?
    thanks in advance.

    Hello,
    It looks like you have a 1:M from DraftOrder to SaleItem and another 1:M from Order to SaleItem, where SaleItem has a 1:1 backpointer to both. When you set the DraftOrder->SaleItem relationship, you must also be maintaining the SaleItem -> DraftOrder backpointer or the foreign key in the SaleItem table would not be set. When you remove the DraftOrder->SaleItem relations, you must also remove the SaleItem -> DraftOrder relations or again, you will not see the foreign key in SaleItem get set to null. TopLink does not perform relationship maintenance for you by default.
    It is the SaleItem -> Order and the SaleItem -> DraftOrder relationship that controls the foreign key in SaleItem's table - you must set these relationships or you will not see the foreign keys be updated. The 1:m is more like a readonly relation that reflects what the 1:1 relationship holds.
    Best Regards,
    Chris

  • New battery will not charge - have we missed something obvious?

    My DD has just replaced the battery on her PB. When the power supply (less than 3 months old) is attached, the led shows amber but the battery will not charge. I've tried reseating the battery with no effect. Since I purchased it from an apple dealer, I'll be taking it back tomorrow, but I wondered whether there is something obvious we've missed.
    Thanks
    Jennifer

    Thank you both. Yes I know the battery needs to be calibrated, but as you say, to calibrate, you need to charge, which is a non-starter. I'm going to take the whole thing in (again). I suspect the problem that led to the battery needing to be replaced possibly dealt a death blow to something inside. I don't know whether this is relevant, but before replacing the battery, the charger started to make a loud buzzing noise (I understand - I wasn't here), and with the old battery in place the PB kept freezing and/or rebooting. Only with the battery out and just the power supply in would the PB work. The PB is seeing the new battery, it just wont charge it. I just wanted to make sure there wasn't anything else I could do before taking it in.
    Jennifer

  • NOOB Q: Does the New-Object -ComObject cmdlet not respect -ErrorAction SilentlyContinue?

    I'm trying to test to see if a set of COM interfaces have been registered on the system or not.  In my script I'm running the New-Object command to attempt to instantiate a COM object using the ProgID of each of the COM interfaces but I don't want errors
    displayed to the screen when one of the ProgIDs isn't registered on the system.  The New-Object help says it supports the <CommonParameters> but when I attempt to use "-ErrorAction SilentlyContinue" I still get the errors displayed
    in the PoSh session.
    I'm running the cmdlet below and getting the error output below that.  Is this the correct way to test a set of COM interfaces or is there another option?  If this is the correct way, is there a way to run the command such that it doesn't display
    an error for the COM interfaces that aren't registered?
    Command:
    New-Object -ComObject "myProgID" -ErrorAction SilentlyContinue
    Error:
    New-Object : Retrieving the COM class factory for component with CLSID {00000000-0000-0000-0000-000000000000} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 REGDB_E_CLASSNOTREG)).
    At line:1 char:11
    + $comObj = New-Object -ComObject "Fake_ProgID" -ErrorAction SilentlyContinue
    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ResourceUnavailable: (:) [New-Object], COMException
        + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

    yep, use try / catch:
    try { New-Object -ComObject "myProgID" -ErrorAction Stop } catch { "not found" }
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • New-Object order

    Hello,
    I am using the Out-GridView command from a data collected with the New-Object command.
    However, the order of the output heading is not in the same order as the one defined in the New-Object command.
    Could you please advice.
    Thank you in advance.
    Here is the code used:
       $ObjData = @()
       $Required = $Services = $Pathname = $FileInfo = ""
       $Required = Get-service -Computer $CompName | Where {$_.Name -eq "WinCollect"} | Select RequiredServices
       $Services = Get-WMIObject Win32_Service -Computer $CompName | Where {$_.Name -eq "WinCollect"} |
                         Select Name, Status, PathName, Started, StartName, State
       #$Process = Get-Process -Computer $CompName | Where {$_.Processname -eq "WinCollect" -or $_.ProcessName -eq "WinCollectSvc"}
       $Pathname = ("\\" + $CompName + "\" + ($Services.PathName).replace(":", "$")).Replace("""", "")
       $FileInfo = Get-Item $Pathname
       $ObjData += New-Object PsObject -Property  @{
           "Server Name"   = $CompName
           "Service_Name"  = $Services.Name
           "Status"        = $Services.Status
           "Started"       = $Services.STarted
           "Start Name"    = $Services.StartName
           "State"         = $Services.State
           "Path Name"     = $Services.PathName
           "File Size"     = $FileInfo.length
           "File Version"  = $FileInfo.VersionInfo.FileVersion
           "File Creation" = $FileINfo.CreationTime
           "Last Access"   = $FileINfo.LastAccessTime
           "Required Srvc" = $Required.RequiredServices.Name
    $ObjData | Out-GridView -Title "QRadar WinCollect"
    Learning PowerShell scripting

    Or you could even do this:
       $Required = $Services = $Pathname = $FileInfo = ""
       $Required = Get-service -Computer $CompName | Where {$_.Name -eq "WinCollect"} | Select RequiredServices
       $Services = Get-WMIObject Win32_Service -Computer $CompName | Where {$_.Name -eq "Wincollect"} |
                          Select Name, Status, PathName, Started, StartName, State
     #$Process = Get-Process -Computer $CompName | Where {$_.Processname -eq "WinCollect" -or $_.ProcessName -eq "WinCollectSvc"}
       $Pathname = ("\\" + $CompName + "\" + ($Services.PathName).replace(":", "$")).Replace("""", "")
        $FileInfo = Get-Item $Pathname
       $ObjData = new-object System.Object
    $objdata | Add-member -type NoteProperty ServerName  $compname
    $objdata | Add-member -type NoteProperty Service_Name $Services.name
    $objdata | Add-member -type NoteProperty Status $Services.status
    $objdata | Add-member -type NoteProperty Started $services.started
    $objdata | Add-member -type NoteProperty State $services.state
    $objdata | Add-member -type NoteProperty PathName $Services.Pathname
    $objdata | Add-member -type NoteProperty FileSize $FileInfo.Length
    $objdata | Add-member -type NoteProperty FileVersion $FileInfo.VersionInfo.FileVersion
    $objdata | Add-member -type NoteProperty FileCreation $FileInfo.Creationtime
    $objdata | Add-member -type NoteProperty LastAccess $FileInfo.LastAccessTime
    $objdata | Add-member -type NoteProperty RequiredSrvc $Required.RequiredServices.Name
    $ObjData | Out-GridView -Title "QRadar WinCollect"
    Although I'm sure there are probably nicer looking, less repetitive, ways of accomplishing the same thing.

  • Maintain Screen for Object Link - New Object

    Hi
    We want to create new object link  ( not standard SAP) in our company.
    I try to add new screen for link other SAP object  : SE80 ---> Package : CV --->
    Function Group : CV130 , add new screen . It seems as REPAIR , Ask me for access key .
    Is it OK?
    Help Activities:
    f the screen entry contains errors or you want to add a new entry you
    an check the existing screen sas follows:
       Start a second mode and execute the following steps:
       -   Start the Object Navigator.
       -   Display the objects for development class CV
       -   Expand the function group 130
           The structure notes screens lists all screens that can be used
           for an object link
       -   Find the screen for the object link (such as 1201 for material
           link).
       Process the activity Maintain screen for object link in the first
       mode.
       -   Correct the entry or add an entry for the the object you want to
           add to the document link.
    Thanks, Meira.

    Hi Dave,
    First of all you didn't mention which version you are using and Which Real Estate you are on. there are 2 RE
    1. Classic Real Estate (Real Estate)
    2. Flexible Real Estate Management
    Now coming to Question
    for Flexible Real Estate Mangement the path is
    SPRO---->Flexible Real Estate Mangement (RE-FLX) -
    >General Setting for Master and contract -
    >
    Document Mangement -
    >Document Mangement System -
    >Maintain Screen for Object Link
    The above path is for ECC 6.0
    Thanks
    Veman.

  • Can creating new object without object reference cause OutOfMemoryException

    I am getting OutOfMemoryException in my application. After looking at the logs and doing some analysis I think creating a new object and not attaching it to a reference is causing the issue.
    The simplified code is as below:
    void valuate(int tradeNum){
    new CaptureTrade().process(tradeNum); //1
    Will the above code called n number of times cause OutOfMemoryException?
    Should I use something like this instead:
    void valuate(int tradeNum){
    CaptureTrade ct = new CaptureTrade();
    ct.process(tradeNum); //2
    Can the first program cause OutOfMemoryException which can be rectified using the second piece of code?

    ashay wrote:
    I am getting OutOfMemoryException in my application. After looking at the logs and doing some analysis I think creating a new object and not attaching it to a reference is causing the issue.
    The simplified code is as below:
    void valuate(int tradeNum){
    new CaptureTrade().process(tradeNum); //1
    Will the above code called n number of times cause OutOfMemoryException?
    Should I use something like this instead:
    void valuate(int tradeNum){
    CaptureTrade ct = new CaptureTrade();
    ct.process(tradeNum); //2
    Can the first program cause OutOfMemoryException which can be rectified using the second piece of code?What happened when you tried it?

  • [SOLVED] rc.d: command not found

    I am in the process of installing xfce. One of the steps is to run:
    rc.d start dbus
    However, when I run this it returns:
    bash: rc.d: command not found
    Am I missing something?
    Last edited by george55 (2011-08-11 04:03:16)

    Inxsible wrote:
    rc.d is not a command. its a location under /etc. your command should be
    sudo /etc/rc.d/dbus start
    $ which rc.d
    /sbin/rc.d
    $pacman -Qo /sbin/rc.d
    /sbin/rc.d is owned by initscripts 2011.07.3-1
    $ rc.d --help
    usage: rc.d <action> <daemon> [daemon] ...
    rc.d list [started|stopped]
    rc.d help
    <daemon> is the name of a script in /etc/rc.d
    <action> can be a start, stop, restart, reload, status, ...
    WARNING: initscripts are free to implement or not the above actions.
    e.g: rc.d list
    rc.d list started
    rc.d help
    rc.d start sshd gpm
    Initscripts update, part 1
    Initscripts update, part 2
    @george55
    If rc.d command doesn't work, check your initscripts version, and check your $PATH.

  • Execute powershell command (new-object -comObject ...) in management pack

    Hello everyone
    I have a COM Object that want to use it in my management pack. When I write the powershell command "new-object -comObject ... " to create it outside of MP and in a ps1 file it works without any error. However when I write it in my MP, this
    error is showed in event viewer: "Retrieving the COM class factory for component with CLSID {clsID} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))."
    I have to mention that when I use vb script in my MP and using "CreateObject()", I don't have any problem.
    How can I use "new-object -comObject ... " in my management pack?
    thank you all
    Alireza

    Hi Marthijn,
    Actually I don't have any problem with powershell in my management packs. For example I can use "MOM.ScriptAPI"
    to create $oBag and return it to next module. My problem is only with that custom COM object. Interesting thing is that, it
    works fine when I create it in powershell file outside of MP, but when I create it in my MP, that error occures.
    thank you so much
    Alireza

  • Executing commands in Powershell over SSH does not work

    0
    I'm trying to simulate Outlook email traffic over a testbed, so I am using a Powershell script to send the emails. The testbed is controlled by a Linux master server, which sends commands over a socket that are then executed on Windows 7 clients. The problem
    I'm having is that when I run the script from a Remote Desktop session, the script works perfectly. However, when the script is run from an SSH session or through the testbed code, the process hangs, usually upon the call to CreateItem(0).
    Here is the skeleton of the code (the remaining code just randomly generates text to fill the email body and assigns a subject):
    ClearHost
    Add-Type -assembly "Microsoft.Office.Interop.Outlook"
    $Outlook = New-Object -ComObject Outlook.Application
    $Mail = $Outlook.CreateItem(0) # Problem usually happens here
    $Mail.To = "$Address"
    $Mail.Subject = $Subject
    $Mail.Body = $Body
    $Mail.Send()
    I call the script using "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass .\sendmail.ps1 <email_address>"
    Other issues I've encountered include "There is no data file for sending or receiving data", which asked me to edit the profile. However, this error has only showed up infrequently. It usually just hangs.

    Read it again.
    Office products are NOT
    designed to run without a UI.  It is well documented.
    ¯\_(ツ)_/¯

Maybe you are looking for