The term 'Get-SCVMHostCluster' 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.

Hello,
I'm have create a simple runbook using Orch 2012 R2 and I'm experiencing the above error message. Below is the runbook Powershell
$clusterdr=Get-SCVMHostCluster-Name"cluster-dr.samuel.com"
Start-SCComplianceScan
-VMMHostCluster$clusterdr-RunAsynchronously
Thank you
Loyan

Hi,
the "Run .Net Script" Actitity from Orchestrator executes PowerShell in version 2.0 (and 32bit-mode).
Try:
PowerShell = {
$clusterdr=Get-SCVMHostCluster-Name"cluster-dr.samuel.com"
Start-SCComplianceScan -VMMHostCluster$clusterdr-RunAsynchronously }
or
http://www.sc-orchestrator.eu/index.php/scoblog/128-run-the-powershell-version-of-windows-executing-the-orchestrator-runbook-service-in-run-net-script-activity
Regards,
Stefan
www.sc-orchestrator.eu ,
Blog sc-orchestrator.eu

Similar Messages

  • Intermittent : The term 'get-date' is not recognized as the name of a cmdlet, function, script file, or operable program.

    I have developed a batch harness whereby all scheduled tasks (W2012) invoke a common powershell script that acts as a wrapper to all our housekeeping jobs.
    The first step in the wrapper is to create a Transcript file using following code
    if ($Host.name -ne "Windows PowerShell ISE Host") # Transcript does not work within ISE
    $timestamp = (get-date -format "yyyy-MM-dd-HH-mm-ss.fff")
    $path = "c:\corp\$timestamp" + "_$pid.txt"
    Start-Transcript -path $path -append
    As expected the folder contains files with timestamp & pid in name
    08/08/2013  11:00 AM            14,388 2013-08-08-11-00-01.158_1620.txt
    08/08/2013  11:00 AM            12,506 2013-08-08-11-00-01.485_936.txt
    08/08/2013  11:00 AM            12,994 2013-08-08-11-00-01.735_9328.txt
    08/08/2013  11:00 AM            12,024 2013-08-08-11-00-01.766_8624.txt
    08/08/2013  11:00 AM            13,902 2013-08-08-11-00-01.860_1756.txt
    08/08/2013  11:01 AM            15,142 2013-08-08-11-01-31.392_10120.txt
    08/08/2013  05:00 AM            14,982 _1692.txt
    However note the last file, it has a zero length date time value in the name
    The error recorded by PowerShell is
    get-date : The term 'get-date' 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:\Corp\Powershell\DMPRun-ScheduledTask.ps1:171 char:18
    +    $timestamp = (get-date -format "yyyy-MM-dd-HH-mm-ss.fff")
    +                  ~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (get-date:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    IE get-date has failed and returned a zero length field as the timestamp
    Can anyone think of a good reason why get-date would fail intermittently?
    Do I have to code defensively for base Powershell functions?

    I implemented David's suggestion and now I intermittently get
    import-module : Access to the path 'PowerShell_CommandAnalysis_Lock' is denied.
    At D:\temp\loop_jc2_2013_11_25_08_55_02.ps1:15 char:1
    + import-module Microsoft.Powershell.Utility
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Module], UnauthorizedA
       ccessException
        + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Pow
       erShell.Commands.ImportModuleCommand
    I added a trap chain (My Powershell skills do not yet include recursive trap coding, any suggestions welcome)
    trap {
        trap {
            "Trap1"
            "Exception: " + $_
            "Error: " + $Error[0]
            "Message: " + $_.Exception.Message
            "InnerException: " + $_.Exception.InnerException
            "StackTrace: " + $_.Exception.StackTrace
            "FailedItem: " + $_.Exception.ItemName
            import-module Microsoft.Powershell.Management
            import-module Microsoft.Powershell.Security
            import-module Microsoft.Powershell.Utility
        "Trap2"
        "Exception: " + $_
        "Error: " + $Error[0]
        "Message: " + $_.Exception.Message
        "InnerException: " + $_.Exception.InnerException
        "StackTrace: " + $_.Exception.StackTrace
        "FailedItem: " + $_.Exception.ItemName
        import-module Microsoft.Powershell.Management
        import-module Microsoft.Powershell.Security
        import-module Microsoft.Powershell.Utility
    import-module Microsoft.Powershell.Management
    import-module Microsoft.Powershell.Security
    import-module Microsoft.Powershell.Utility
    trap {
        "Trap3"
        "Exception: " + $_
        "Error: " + $Error[0]
        "Message: " + $_.Exception.Message
        "InnerException: " + $_.Exception.InnerException
        "StackTrace: " + $_.Exception.StackTrace
        "FailedItem: " + $_.Exception.ItemName
        exit 1
    get-date
    Now I intermittently get ..
    Trap2
    Exception: Access to the path 'PowerShell_CommandAnalysis_Lock' is denied.
    Error: Access to the path 'PowerShell_CommandAnalysis_Lock' is denied.
    Message: Access to the path 'PowerShell_CommandAnalysis_Lock' is denied.
    InnerException:
    StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
       at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
       at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew)
       at System.Management.Automation.AnalysisCache.CacheExportedCommands(PSModuleInfo module, Boolean force, ExecutionContext context)
       at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadUsingModulePath(PSModuleInfo parentModule, Boolean found, IEnumerable`1 modulePath, String name, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags,
    PSModuleInfo& module)
       at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
       at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
       at System.Management.Automation.CommandProcessor.ProcessRecord()
    FailedItem:
    import-module : Access to the path 'PowerShell_CommandAnalysis_Lock' is denied.
    At D:\temp\loop_jc2_2013_11_25_09_19_52.ps1:26 char:1
    + import-module Microsoft.Powershell.Security
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Module], UnauthorizedA
       ccessException
        + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Pow
       erShell.Commands.ImportModuleCommand

  • 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

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

    I am trying to run the following Powershell in orchestrator to move a new user into a specific OU based on the Department field specified by the creator. 
    $dept = {Department from "Initialize Data"} 
    if ($dept -contains 'IT') {$NewContainer = OU=IT,DC=test,DC=net}
    When I run the Powershell it is returning the following
    The term 'IT' 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.
    How can I get it to not try and pass 'IT' as a cmdlet?

    I think I may have actually found the solution I was missing { } around the command
    I encapsulated the powershell in { }
    $dept = {Department from "Initialize Data"} 
    if ($dept -contains 'IT') {$NewContainer = OU=IT,DC=test,DC=net}

  • New-MaiboxRestoreRequest is not recognized as the name of a cmdlet, function, script ?

    I have restored successfully an exchange 2013 mailbox database from backup to the recovery database, but when i try to recover a user's mailbox I receive the following error
    New-MaiboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox "testuser" -TargetMailbox [email protected]
    The term 'New-MaiboxRestoreRequest' 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.
     I already have the "mailbox import export" management role assigned to the logged in administrator.
    Anand_N

    silly me i spelt the command wrong
    Anand_N

  • The term 'Add-SPDistributedCacheServiceInstance' is not recognized as the name

    Hi,
    I have setup Sharepoint 2013 standalone on Windows 2012 server. I am developing an app that will make use of social apis of sharepoint 2013. Out of the box installation didnt have Distributed Cache Service running and I am not sure if its needed to be run
    in order to make social apis working on the server. Anyhow, since distributed cache service was showing up as Stopped and I could not restart it, I have deleted the distributed cache service and when I retry to re-add it by entering Add-SPDistributedCacheServiceInstance
    command on powershell, I get the following error,
    Add-SPDistributedCacheServiceInstance : The term 'Add-SPDistributedCacheServiceInstance' 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:1
    + Add-SPDistributedCacheServiceInstance
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Add-SPDistributedCacheServiceInstance:String) [], CommandNotFoundExcept
       ion
        + FullyQualifiedErrorId : CommandNotFoundException
    I am at total loss here. Any help/pointers to get around this error and setup social api working on this server will be helpful.
    Regards,
    Usman

    The issue is because your PowerShell console has not loaded the appropriate SharePoint DLL
    in order to call the API. To resolve this, you can open the SharePoint 2010 Management Shell to execute the script or add the assembly manually before running the script.
    --Cheers

  • The term "New-MailboxExportRequest" is not recognized.

    Hi,
    I'm trying to backup the mailboxes on my exchange server 2010 running on server 2008 R2 using the script from Steve Goodman (http://www.stevieg.org/2010/07/using-the-exchange-2010-sp1-mailbox-export-features-for-mass-exports-to-pst/)
    I followed every step that is described in the tutorial. But if I run the script I get: The term "New-MailboxExportRequest" is not recognized as the name of a cmdlet, function, script file, or operable program.
    The permissions for the folder are: exchange trusted subsystem, administrators Full control. I ran the command
    "New-ManagementRoleAssignment -Role "Mailbox Import Export" -User Administrator" in the powershell of exchange. I tried exporting a single mailbox to PST but I got the same error. Nothing seems to work.
    Does anyone know a solution? Help would be appreciated.
    Cheers

    Hi Sturme,
    I suggest you follow this document use New-MailboxExportRequest to export the mailbox, then check whether this issue will occur or not.
    New-MailboxExportRequest
    http://technet.microsoft.com/en-us/library/ff607299.aspx
    If you want to use the script from Steve Goodman, please paste the exact error you get (when you run it in Exchange Management Shell ).
    Thanks,
    Evan
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Getting error while creating a new web app saying "The password supplied with the username domainname\username was not correct. Verify that it was entered correctly and try again"

    Hi ,
    I am trying to create a new web app using Central Administration in Sharepoint 2010 and getting an error "The password supplied with the username  was not correct. Verify that it was entered correctly and try again".
    I tried running this command also "stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>" but when it got executed it showed me "Access Denied".
    What should i do ??
    Thanks in advance.
    Regards, Anurag

    HI,
    right click on command icon and click run as administrator then use above stsadm commend to update credential. If still you face same issue then try with powershell as mention in below link: (make sure that you open sharepoint powershell as run as administrator)
    http://smartrider.wordpress.com/2010/07/15/powershell-script-to-create-web-application-and-site-collection-in-sharepoint-2010/
    let us know your result
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • "Windows cannot find 'Flash'. Make sure you typed the name correctly, and try again."

    I can't open Flash files from Flash Builder 4.6 in Windows 7. I just get this message "Windows cannot find 'Flash'. Make sure you typed the name correctly, and try again."
    In Preferences Fila Associations for FLA Adobe Flash Editor (default) is selected as per default initial settings. I've even tried reinstalling FB from scratch and it is still giving this error.

    This worked for me (requires Flash install)
    In menu bar, select Window->Preferences
    In Preferences window, select General->Editors->File Associations
    Select or add ".fla" to File Associations
    Change the Associated editors to "Flash Document". Set it to "Default"
    I also removed their internal "Adobe Flash Editor" since it didn't seem to be working anyway. Not sure if this makes a difference.

  • HT201302 I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks

    I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks!

    If this is an iCloud account the Outbox only appears when sending an email, so if it is still trying I suppose it should be showing now (not sure though, hard to replicate this)
    What type of email account?

  • Problem with setting up new Ipad Air2:I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with thesame

    I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with the same ID. Please help me if you have come across the same issue. Thank you!

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • HT201210 Hi, I went to update my iphone using my itunes site, halfway through i got a message saying reset, make sure that your network is active and try again, the network connection is fine. it will not allow me acces to my phone unless a recovery is do

    Hi, I went to update my iphone using my itunes site, halfway through i got a message saying reset, make sure that your network is active and try again, the network connection is fine. it will not allow me acces to my phone unless a recovery is done. I have not done any back ups and obviously dont want to lose any information. Please can anyone help
    Thanks
    Roger

    Hi, I went to update my iphone using my itunes site, halfway through i got a message saying reset, make sure that your network is active and try again, the network connection is fine. it will not allow me acces to my phone unless a recovery is done. I have not done any back ups and obviously dont want to lose any information. Please can anyone help
    Thanks
    Roger
    [email protected]

  • CS5 - unable to download update for PS (12.0.4) or RAW (6.7) - it just says "There was an error downloading this update. Quit and try again later." I've been trying again for a month.

    I have no idea what to do.
    I stick with CS5 because it does what I need and does not lock me into a financial arrangement over which I have do not have control.
    My software is registered. I have used and updated it without problems since I bought it direct from Adobe
    Any idea what I might do?
    Jeff

    If you're trying to update through the Help menu > Updates, you should know that the Adobe auto updater in CS5 and earlier versions is an unmitigated, monumental piece of cr@p. It Is totally unreliably and fails in one or another of a great variety of ways.
    Adobe began to get their act together as of CS6, with which I'm staying for exactly the same reason you are staying with CS5.
    One has to update manually, by looking for, downloading and applying any and all applicable updates, including the Adobe Camera Raw plug-in which comes separately.
    If the latter is what you've been doing, you need to let us know where you are trying to download the update from, what browser you are using to attempt to effect the download, and what platform you are in.
    You also need to disable any and all virus protection, and make sure you are not behind any active software or hardware Fire Wall.
    This is the URL for Photoshop Macintosh updates:
    Adobe - Photoshop : For Macintosh
    and for Windows:
    Adobe - Photoshop : For Windows
    Next time, please be substantially more informative, rather than plaintive or narrative (see next post).  You are not addressing Adobe here.
    Thank you.

  • I am having trouble backing up my ipod touch. It says I should delete my back up and try again. How do I do that and will it delete all my music on my computer/ipod?

    How do i delete my back up? I am trying to sync my ipod and it won't work. It says something about the back up being corrupt and that i must delete it and try again. If I do this will it delete my music on my computer/ipod?

    Hello mig04,
    While looking into the issue you are experiencing I came across some helpful information. In an article called iCloud: Troubleshooting creating backups found here: http://support.apple.com/kb/TS3992 there are a number of steps to help get your issue resolved.
    General troubleshooting
    General information
    iCloud Backup requires a Wi-Fi connection to the Internet.
    Automatic backups occur when you've plugged in your iOS device, locked the screen, and have connected it to Wi-Fi.
    You can manually start a backup by tapping Back Up Now in Settings > iCloud > Storage & Backup (requires a Wi-Fi connection to the Internet).
    iCloud Backup will provide helpful information and status messages related to backups at the bottom ofSettings > iCloud > Storage & Backup.
    If automatic backups don't work as expected, test to see what happens when you start a manual backup by tapping Back Up Now at the bottom of the Storage & Backup screen.
    Backups and restores both take time, especially if you have a lot of data or a slow connection. Depending on the size of your data and the speed of your network, you may need to give more time than you expected to a backup or restore.
    Make sure you have at least 50 MB of free space available on your iOS device before you back up. If you have no space available on your device, iCloud Backup can fail in some cases. You can verify how much free space you have available on your iOS device in Settings > General > About.
    Cheers,
    Sterling

  • In iPhoto, when i try to email a photo using "share", I keep getting"username/password" not recognized. It used to work automatically before.

    I cannot email  a photo using iPhoto "share. I keep getting "username/password not recognized". I used to use this function all the time but all of a sudden, I keep getting this message.

    In iPhoto, open Preferences (under iPhoto in the menu bar) and click the "Accounts" tab on top.  Make sure your email account(s) is/are set up there correctly, just as they are in Apple's Mail.  Make sure the password in included.

Maybe you are looking for

  • Time Capsule as a File Server - to replace existing Airport Extreme

    Hi I have a 4th Gen Airport Extreme connected to my cable modem.  I was thinking of getting a 2013 Time Capsule to replace my existing 4th Gen 2009 Airport Extreme, to use for Time Machine Backups and also for storing other files which I can access f

  • ITunes 7 and Nano error

    I can't get my 1G iPod Nano to sync properly. I've restored it twice and its still throwing errors. I get an error that reads ". . . there is not enough free space to hold all of the items in the selected playlists. Would you like to turn off podcast

  • Dynamic language translation with XML publisher/XLIFF

    Greetings all - We are on an Oracle 11i.5.8 global environment. There is a need for some of the countries to print their bank checks in their local language. Even with pre-printed stationary etc., the existing challenge is to dynamically print the am

  • Problem with tx. SE93

    Hi all, i have a problem. These are the data of the problem. TX. SE93. ZZZZ transaction START_REPORT skip initial screen ok D_SREPOVARI-REPORTTYPE = RE D_SREPOVARI-EXTDREPORT = AIP 01RIPASP                        ZPLANP The table SREPOVARI does not e

  • Group by making difference in result when only when ID is selected.

    The following query returns nothing since there is no data matching criteria in tables which looks good to me: SELECT SUM (ci.premium_amt),'START PROGRAM' FROM hr.group cg, hr.request pi, hr.rate ri, hr.info cc, hr.allocation ci, hr.index fi WHERE cg