Alternatives to PowerShell automation of Excel (Scheduled Task) in a Windows Server 2012 R2 world

I have a handful of PowerShell scripts that ran as Scheduled Tasks on an old Windows 2008 SP2 server, which output reports as Excel workbooks with multiple worksheets, via a COM object. After migrating these scripts to a new Windows 2012 R2 server,
these scripts no longer function. The Server 2008 system was running Office 2007, and the new Server 2012 R2 server has Office 2013 installed.
What is everyone using on their Server 2012 R2 systems to automate generation of multi-sheet reports in Excel via PowerShell and Scheduled Tasks?
I know that Microsoft has said that automating Office applications server-side in non-interactive mode, but it has worked in the past, until now. (https://support.microsoft.com/kb/257757)
I've tried the OpenXML PowerTools for PowerShell (https://powertools.codeplex.com/), but Export-OpenXMLSpreadsheet will only export a single worksheet, and they don't support adding worksheets to existing files
(am I missing something?). I understand the OpenXML PowerTools can be extended in C#, but I don't C#. The PowerShell cmdlets were released in Jan 2012, but don't look to have been updated since then (updates have been the core C# code).
I've seen recommendations to add C:\Windows\(System32 or SysWOW64)\config\systemprofile\Desktop, but this hasn't worked on Server 2012.
Has anyone been able to get Excel 2013 to cooperate on Server 2012 R2, or come up with a suitable alternative? I'd rather not start running these scripts from my workstation.
EDIT:
I'm not necessarily looking for an Excel answer, since there are OpenXML ways of doing things now without the Excel application.
Here are some of the errors I'm getting when approaching this from different directions. When I use:
$excel = New-Object -comobject Excel.Application$workbook = $excel.Workbooks.Add()
Results in error:
Exception calling "Add" with "0" argument(s): "Microsoft Excel cannot open or
save any more documents because there is not enough available memory or disk
space.
• To make more memory available, close workbooks or programs you no longer
need.
• To free disk space, delete files you no longer need from the disk you are
saving to."
At C:\path\to\script.ps1:21 char:2
+ $workbook = $excel.Workbooks.Add()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation
The server is definitely not lacking for resources.
I can copy a blank XLSX file and use .Open($xlFile) instead of .Add(), but then when I go to open a CSV file to copy/paste the content to a worksheet, I get this one:
Exception calling "Open" with "1" argument(s): "The server threw an exception.
(Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))"
At C:\path\to\script.ps1:65 char:2
+ $tempcsv = $excel.Workbooks.Open($CSVFile)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation
Things that I've tried so far, with no success:
I created C:\Windows\System32\config\systemprofile\Desktop and C:\Windows\SysWOW64\config\systemprofile\Desktop as suggested here:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/0751119d-84d5-4a77-8240-1c4802f97375/powershell-scheduled-tasks-wont-start-excel?forum=winserverpowershell
Add Local Launch and Local Activation permissions to the Microsoft Excel Application DCOM Config, Grant "Read & Execute, List folder contents, Read" permissions on the \config\systemprofile\Desktop folder. Grant "Modify, Read & Execute,
List Folder Content, Read, Write" permissions for the account on the following folders:
\config\systemprofile\AppData\Roaming\Microsoft
\config\systemprofile\AppData\Local\Microsoft
as suggested here:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/aede572b-4c1f-4729-bc9d-899fed5fad02/run-powershell-script-as-scheduled-task-that-uses-excel-com-object?forum=winserverpowershell
@ jrv - I will try posting a similar question in the Excel 2013 forum, but since I'm looking for a scripting solution to produce an OpenXML spreadsheet, and not something that necessarily uses the Excel application (though such a solution would not be turned
away), I thought this the more appropriate venue.
(to reiterate from OP) I have seen and acknowledge Microsoft's statements regarding the unsupported nature of automating Office applications in non-interactive environments, but the truth of the matter is, supported or not, it worked in the past (Server
2008), it's what I inherited from my predecessor, and I know I'm not the only one who has been using Excel in this way. I'm only asking fellow scripters, some of whom must also be using Excel in this "unsupported" fashion, how they are automating
creation of their spreadsheet reports after moving to Server 2012. A different system modification to make the Excel comObject continue working as before? Direct manipulation of the OpenXML document? Other solutions that may or may not require launching the
Excel application?

#1 - Ask in Excel 2013 forum.
#2 - Microsoft has repeatedlynoted that this is NOT a supported configuration for Office products.
#3 - What errors are you getting?
#4 - What have you done to debug this:
#5 - No one can be of much help unless you post a very simple example of how this fails.
¯\_(ツ)_/¯

Similar Messages

  • PowerShell Script running Excel won't run on Windows Server 2008 R2

    I have a script that creates a report of a single example of each warning or error in the Windows Event log, for each server in a list of servers,with the number of times that error has occurred in the last week on each server. It creates this report in
    Excel. I have this script running automated through Task Scheduler for one client on Windows 7 and it's working perfectly. I have another client that I am attempting to run this script automated on a server running Windows Server 2008 R2. I can manually run
    the script and everything works, but if I try to schedule the script everything works except for the Excel PowerShell commands. I've have tried:
    Created the Desktop folders for config\systemprofile in System32 and in SysWOW64.
    Configured permissions in DCOM for Microsoft Excel Application.
    Configured folder permissions for config\systemprofile.
    Verified PowerShell is working.
    Unchecked the option in the task to only run while logged on.
    Does anyone have any idea why this is happening and how I can fix it? Thanks!
    Sincerely,
    Christopher Beard

    You might have to launch the application once as the system account so that it can set up the Excel environment, I've had the same problem when  trying to update Excel files from an admin Powershell console using my admin account.  Use psexec with
    a -s option to run it as system account locally while logged on to the target server:
    psexec -s "c:\program files (x86)\microsoft office\office14\excel.exe"
    Then you'll most likely be prompted to input initials - which is what I suspect is preventing your code from running properly.
    There may be some other more elegant way to handle this, but you'd be better off asking that question in one of the forums devoted to Office products.
    I hope this post has helped!

  • Windows Server Backup scheduled task run successfully but backup do not start (not running) on Windows Server 2012

    Hi,
    A backup job has been setup on Windows Server 2012 (Platform: Win32NT; ServicePack: ; Version: 6.2.9200.0; VersionString : Microsoft Windows NT 6.2.9200.0) via Windows Backup Software UI (Local Backup 1.0).
    It is appearing as a scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup" belonging to user 'nt authority\system' in task scheduler.
    The problem is that the Backup job never start despite the scheduled task running and completing successfully (when run automatically or manually)!
    Would you be able to explain why and assist in resolving that issue?
    Here is what we know:
    When the backup is run manually via the Windows Backup Software UI, it works fine.
    When the backup is run via command line (as set in schedule task) in a cmd command prompt (as local/domain 'administrator' or as 'nt authority\system' which is possible by running command prompt via 'PsExec.exe -i -s cmd'), something like "%windir%\System32\wbadmin.exe
    start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet", it works fine.
    If you manually run the preset scheduled task while logged in as administrator, the task run and complete successfully but the backup job does not start.
    Idem if you schedule task is run automatically at scheduled time.
    The schedule task run and complete successfully but the backup job does not start.
    It is confirmed by running the following in a command prompt as 'nt authority\system':
    schtasks /run /tn "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup"
    SUCCESS: Attempted to run the scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup".
    Despite success result, the Backup job does not start running...
    No errors or warning appears anywhere in Event Logs (Microsoft > Windows > Backup or Task Scheduler) nor in the scheduled task History tab. The schedule task complete successfully but no Backup job is run...
    If scheduled task automatically set by Windows Backup software is duplicated (copied) and set manually it runs fine as 'administrator' and as 'nt authority\system' (subject that 'nt authority\system' is added to the 'Backup Operators' AD group).
    Here is an export of the current pre-set schedule task, is there any settings that need to be changed to make it works?
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Author>MYDOMAIN\SERVER1</Author>
        <SecurityDescriptor>D:AR(A;OICI;GA;;;BA)(A;OICI;GR;;;BO)</SecurityDescriptor>
      </RegistrationInfo>
      <Triggers>
        <CalendarTrigger id="Trigger 1">
          <StartBoundary>2014-07-14T21:00:00</StartBoundary>
          <Enabled>true</Enabled>
          <ScheduleByDay>
            <DaysInterval>1</DaysInterval>
          </ScheduleByDay>
        </CalendarTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>S-1-5-18</UserId>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>true</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>false</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
        <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>%windir%\System32\wbadmin.exe</Command>
          <Arguments>start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet</Arguments>
        </Exec>
      </Actions>
    </Task>
    Thank you in advance for your feedback.

    Once again, the issue is not to run the backup manually from the command line but to have it run via the scheduled task setup by the Windows Backup software.
    By default, the schedule task is to be run as NT Authority\System, and when run under this account, the backup does not start (even though account is member of Backup Operators) and job can manually be run via elevated command prompt. This is not a normal
    behavior and constitute a major bug in Windows Server 2012.
    From my understanding the NT Authority\System account is a built-in account from Windows that should by default be part of the Administrators group (built-in) even though it does not explicitly appears like it in AD by default.
    This account shall have by default Administrators rights and Backup Operators rights (via the Administrators group) without being explicitly added to those groups (http://msdn.microsoft.com/en-gb/library/windows/desktop/ms684190%28v=vs.85%29.aspx). By design
    it is supposed to be the most powerful account which has unrestricted access to all local system resources. If that is not the case (as it seems) then this would constitute a major bug in Windows Server 2012 edition.
    As said previously and as you confirmed, currently by default NT Authority\System on Windows 2012 server cannot start backup manually via an elevated command prompt unless it is manually added to Backup Operators (or Administrators) group. But wouldn't that
    constitute a bug of Windows Server 2012?
    Our server has not yet been restarted since I added NT Authority\System account to the Administrators group explicitly manually so I cannot yet confirmed it would sort the issue. Indeed it is heavily in use so cannot easily be restarted. Will confirm when
    done.
    We also have an additional problem where after a while of last reboot, part of the Exchange ECP can no longer be properly loaded in the web browser due to compilation error (compilation is done via NT Authority\System account which seems to no longer have
    sufficient right to compile .NET code). What is strange is that it works at first and then stop working at some point... I am hopeful that adding NT Authority\System to the Administrators group would sort this issue as well but once again, that shall not be
    needed!!!
    Could a Windows Server 2012 update introduced some security policy changes or else that prevent NT Authority\System to have full power?

  • Task Sequence Windows Server 2012 format and partition issue when using MDT2012

    Hi all,
    Currently I'm working on a task sequence to deploy a Windows Server 2012 image. We've integrated MDT2012 Update 1 in SCCM2012 SP1 and created a default 'Server Task Sequence'. This task sequence deploys the install.wim to a server which has multiple disks
    attached.
    We've configured multiple format and partition disk steps to create the following partition layout:
    Disk 0: 499MB BDEDrive (do not assign drive letter) + 40GB OSDisk
    Disk 1: 40GB Programs
    Disk 2: 40GB Data
    Disk 3: 25GB User
    When the task sequence is finished I've noticed the drive letters assigned to the disk are not correct. In some cases the BDEdrive gets drive letter D assigned, sometimes drive letters are assigned starting with E, thus skipping drive
    letter D. 
    The smsts.log files show an error when it's re-assigning drive letters after booting into Windows. Looks like an error in the DiskPartScript.txt.
    <![LOG[==============================[ OSDSetupHook.exe ]==============================]LOG]!><time="16:59:40.889-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="osdsetuphook.cpp:186">
    <![LOG[Executing task sequence]LOG]!><time="16:59:40.905-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="osdsetuphook.cpp:279">
    <![LOG[Loading the Task Sequencing Environment from "C:\_SMSTaskSequence\TSEnv.dat".]LOG]!><time="16:59:40.920-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="basesetuphook.cpp:366">
    <![LOG[Environment scope successfully created: Global\{51A016B6-F0DE-4752-B97C-54E6F386A912}]LOG]!><time="16:59:40.936-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="environmentscope.cpp:659">
    <![LOG[Environment scope successfully created: Global\{BA3A3900-CA6D-4ac1-8C28-5073AFC22B03}]LOG]!><time="16:59:40.936-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="environmentscope.cpp:659">
    <![LOG[Debug shell is enabled]LOG]!><time="16:59:43.806-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="basesetuphook.cpp:1440">
    <![LOG[Successfully enabled debug command shell support.]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="debugwindow.cpp:156">
    <![LOG[Configuring local administrator account]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="basesetuphook.cpp:1462">
    <![LOG[Re-assign all drive letters...]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="diskutils.cpp:1941">
    <![LOG[Executing command line: "C:\WINDOWS\system32\diskpart.exe" /s "C:\WINDOWS\TEMP\DiskPartScript.txt"]LOG]!><time="16:59:43.900-120" date="05-10-2013" component="OSDSetupHook" context=""
    type="1" thread="776" file="commandline.cpp:827">
    <![LOG[Process completed with exit code 2147942487]LOG]!><time="16:59:50.249-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="commandline.cpp:1123">
    <![LOG[Diskpart.exe STDOUT:
    Microsoft DiskPart version 6.1.7601
    Copyright (C) 1999-2008 Microsoft Corporation.
    On computer: SRV03
    Volume 1 is the selected volume.
    DiskPart successfully removed the drive letter or mount point.
    The volume you selected is not valid or does not exist.
    There is no volume selected.
    ]LOG]!><time="16:59:50.249-120" date="05-10-2013" component="OSDSetupHook" context="" type="3" thread="776" file="diskutils.cpp:1807">
    When I take a look at the generated diskpart_script.log file the volume D gets selected twice, which fails the second time because of the first remove drive letter command.
    This is the output in the diskpart_script.log file:
    select volume D
    remove letter=D
    select volume D
    remove letter=D
    select volume E
    remove letter=E
    select volume F
    remove letter=F
    select volume H
    remove letter=H
    select disk 0
    select partition 1
    assign
    select disk 1
    select partition 1
    assign
    select disk 2
    select partition 1
    assign
    select disk 3
    select partition 1
    assign
    It seems this error is caused by the first 'Format and Partition Disk' step before the 'Use Toolkit Package' step which is part of the default Server Task sequence. When I disable this Format and Partition step and create the partition manually
    all looks ok showing no errors in the smsts.log file.
    I've solved this by replacing the first 'Format and Partition Disk' step by an Powershell command which formats and partitions the disk. 
    Anyone seen this behavior?

    I have a similar problem when I install windows on some clients. Have you found any explanation for the behavior?

  • How do I get a reliable schedule for automatic update in Windows Server 2012 R2?

    I don't understand why MS broke the automatic update in Windows Server 2012 R2. In previous versions, I used to set it for automatic updates - Saturdays at 2AM. I can no longer pick a weekly update in the GUI and the time seems to have no impact on its capricious
    reboots due to updates.   It might happen 2 days later at noon.   The best option for now is to just shut off the automatic updates but I'm reading this issue has been around since 2012 R1.   There supposedly is a fix/patch for
    2012 but it doesn't say if the patch is for 2012 R2 and the automatic updates haven't installed a fix that actually fixes what is broken with the automatic updates.
    Why even leave the GUI for automatic updates if it doesn't mean anything?
    Is there a simple registry key I can change so updates occur according to the schedule that you created in the GUI?      Please no powershell - worst crutch MS ever created to not fix their own gui.
    I'm seeing people have tried some advanced work around using GPO but many said those don't work reliably either on hosts or domain controllers.

    This may explain:
    http://blogs.technet.com/b/wsus/archive/2013/10/08/enabling-a-more-predictable-windows-update-experience-for-windows-8-and-windows-server-2012-kb-2885694.aspx
    http://blogs.technet.com/b/wsus/archive/2013/06/11/wsus-blog-managing-updates-with-deadlines-in-an-era-of-automatic-maintenance.aspx
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Window Server 2012 R2 Job Scheduler Failing.

    Hi,
    Currently, my company's Window Server 2012 R2 job scheduler having a problem.
    Then i found out the solution at http://support.microsoft.com/kb/2617046, so i download the hotfix to fix the problem.  However, i get another error as below.
    Please, what can i do?
    Thanks 
    Best Regard
    Vincent.

    Amy,
    Thanks for the tips, I follow the settings. I checked the condition and troubleshoot according to the lists you provided.
    The task was configured to run only when a specified network is available. (Not set this)
    The configured expiration time for the task has passed. (no expired time set)
    The task is configured to ignore or queue a new task instance if a previous instance is still running. (not set this)
    The task is configured not to run when the computer is on battery power. (yes, will not run when computer on battery power. will not happen because is a server all the time running AC power).
    The task is configured to run only if a specific user is logged on. (must select this, if not, the scheduler will not run at all)
    The task was disabled by a user. (is enabled)
    The previous task instance might have been running longer than expected because a component is busy processing data. If the task is normally expected to run for this length of time, consider modifying the task triggers to take this run-time length
    into consideration, or configure the task to be terminated after a preset time. (already set "Stop the task if runs longer than 3 days" and "If the running task does not end when requested, force it to stop".  and "Do not start
    a new instance " had been set)
    Frankly, for the moment it run normally, somehow, I don't know when the incident will happen again.  It seem randomly happen, and not by default.  That is why kinda need the fix to fix this bug.  Cannot trigger email when this incident happen. 
    And the schedule we run is highly critical.
    Thanks.

  • [Forum FAQ] How to install and configure Windows Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely

    As we all know,
    the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
    Essentials Experience role in Server Manager or via Windows PowerShell.
    In this article, we introduce the steps to install and configure Windows
    Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
    Before installing the Windows Server Essentials Experience Role, please use
    Get-WindowsFeature
    PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
    Figure 1.
    Part 1: Install Windows Server Essentials Experience role locally
    Add Windows Server Essentials Experience role
    Run Windows PowerShell as administrator, then type
    Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
    Figure 2.
    Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
    (Figure 3)
    Figure 3.
      2. Configure Windows Server Essentials Experience role
    (1)  In an existing domain environment
    Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
    Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
    Figure 4.
    After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
    Server Essentials:
    Start-WssConfigurationService –Credential <Your Credential>
    Note: The type of
    Your Credential should be as: Domain-Name\Domain-User-Account.
    You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
    Figure 5.
    Next, you can type the password for the domain account. (Figure 6)
    Figure 6.
    After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
    Figure 7.
    By the way, you can use
    Get-WssConfigurationStatus
    PowerShell cmdlet to
    get the status of the configuration of Windows Server Essentials. Specify the
    ShowProgress parameter to view a progress indicator. (Figure 8)
    Figure 8.
    (2) In a non-domain environment
    Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
    Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
    Figure 9.
    After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
    After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
    After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
    Figure 12.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Part 2: Install and configure Windows Server Essentials Experience role remotely
    In an existing domain environment
    In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
    Add-WindowsFeature -Name ServerEssentialsRole
    -ComputerName xxx -Credential DomainName\DomainAccount
    Figure 13.
    After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
    Figure 14.
    After the installation completes, it will return the result as below:
    Figure 15.
    Next, please use the
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
    Enter-PSSession –ComputerName
    xxx –Credential DomainName\DomainAccount (Figure 16)
    Figure 16.
    Then, please configure Server Essentials Role via
    Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
    Figure 17.
    After your credential is accepted, it will update and prepare your server. (Figure 18)
    Figure 18.
    After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
    Figure 19.
    2. In a non-domain environment
    In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
    below:
    Sevrer1: 192.168.1.54
    Server2: 192.168.1.53
    Run
    Enable-PSRemoting –Force on Server1. (Figure 20)
    Figure 20.
    Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
    to
    add the TrustedHosts entry:
    Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
    (Figure 21)
    Figure 21.
    Next, we can use
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
    Figure 22.
    After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
    Figure 23.
    From figure 24, we can see that the installation is completed.
    Figure 24.
    Then you can use
    Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
    The figure below shows the status of Windows Server Essentials.
    Figure
    25.
    Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
    Figure 26.
    More information:
    [Forum
    FAQ] Introduce Windows Powershell Remoting
    Windows Server Essentials Setup Cmdlets
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • Schedule a Job in SQL server 2012 Express

    Hello All,
    I have SQL Server express 2012 setup on my server. How can I schedule a job in SQL Server 2012 express since it does not have SQL server Agent? 
    Thanks

    Below links will help
    How to schedule backup in SQL server Express
    Free Job scheduling tool for SQL Server express
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Install Windows server 2012 using powershell

    Hi Folks,
    How to Install Windows server 2012 using powershell.
    Thanks,

    Hi,
    According to your post, my understanding is that you want to install Windows server 2012 via PowerShell.
    Per the previous thread, we could not install Windows server 2012 directly via PowerShell.
    https://social.technet.microsoft.com/Forums/en-US/53f82989-4b9c-4197-9ff1-03e96c852eb7/how-to-install-windows-server-2012-directly-in-vhd-file-using-powershell?forum=winserver8setup
    As this is the forum for SharePoint server on-premise, I’m not familiar with the Windows server, for this issue, I recommend you can post a new question in the forum for Windows server.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=winserver8setup
    More experts will assist you, then you will get more information relation to Windows server.
    Thank you for your understanding and support.
    More reference:
    http://vegibit.com/install-and-configure-windows-server-2012-with-windows-powershell/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Change default scheduled defrag start times on Server 2012

    I think it's great that by default Server 2012 is going to defrag all my drives on a weekly basis.  But how can I access the scheduling portion?  Is it possible to change start times, or give a window that it can start in?  I have some drives
    where the data on them is only not used during certain hours, so it would make the most sense to have it start the defrag during that window.

    Hi,
    The ScheduledDefrag Properties as below:
    http://blogs.technet.com/b/askcore/archive/2014/02/17/what-39-s-new-in-defrag-for-windows-server-2012-2012r2.aspx
    Regards.
    Vivian Wang

  • Windows Server 2012 Standard Scheduling for backup for multiple disk

    Hi,
    Iam using Windows Server 2012 Standard,
    How to create backup schedule for multiple hard disk. 1. I have scheduled a multiple backup for disk1, disk2 but the backup fails.
    How to create different backup schedule for single Hard disk.
    Please help

    Hi
     Check these artciles,same on 2012 r2 standard;
    https://technet.microsoft.com/en-us/library/cc754054.aspx?f=255&MSPPError=-2147217396
    https://technet.microsoft.com/en-us/library/dd834883.aspx

  • What permissions are required to see scheduled tasks on a remote server using SCHTASKS /S {server}?

    When I attempt to run SCHTASKS /S {server} some servers return:
    ERROR: Access is denied.
    On servers where I am a member of the local Administrators group I can run this command successfully. There are many servers where it is not appropriate for me to be a local Administrator but would be fine for me to monitor the status of scheduled tasks
    on the server.
    What permissions need to be granted to me to see the scheduled tasks and not be a local administrator? Is this even possible?
    Thanks,
    Matthew

    Hi Matthew,
    Based on my research, any user can schedule a task on the
    local computer and they can view and change the tasks that they scheduled; however, to schedule, view, or change a task on a
    remote computer, we must be member of the Administrators group on the remote computer.
    Therefore,
    What permissions need to be granted to me to see the scheduled tasks and not be a local administrator? Is this even possible
    It is not possible.
    More information for you:
    Schtasks
    http://technet.microsoft.com/en-us/library/cc725744(WS.10).aspx
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Custom scheduled tasks dissapears in Windows 2012

    I have created custom task in Task Scheduler, but it does no appear under "Active Tasks".
    I found the task in C:\Windows\System32\Tasks, but not in the "schtasks /query".
    What is happening?

    Hi sindred,
    àI have created custom task in Task Scheduler, but it does no appear under "Active Tasks".
    I also create a task in my Lab environment via Task Scheduler. Yeah, as you find, the scheduled task didn't appear under "Active Tasks". However, after that task running, please refresh,
    and then you will find it in "Active Tasks" list.
    àI found the task in C:\Windows\System32\Tasks, but not in the "schtasks /query".
    How you configure Location option in General tab when create this task? After creating the scheduled task, please click Task Scheduler Library and check if find that created task. I also run
    "schtasks /query" command. However, I can find that task which I created. I suggest that check the result of "schtasks /query" command again. Meanwhile, please open this task Properties and click History tab, then check
    if find some relevant events.
    If any update, please feel free to let me know.
    Best regards,
    Justin Gu
    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 Support, contact [email protected]

  • Task manager on windows server 2008 doesn't show the memory from newly installed 2nd CPU

    Hi,
    We have a dual processor dell power edge t410 running windows server 2008 (64-bit), standard edition. I have recently added a 2nd xeon x5560 quad-core processor (first one is also x5560 with 32GB (4x8) memory) and 16GB ram (4x4). Seems like the new CPU is
    recognized in BIOS, Dell's server admin app and task manager shows 16 vertical boxes (hyper threading is on both cpus) under Performance->CPU Usage History and these boxes show processor load spread relatively evenly across all threads. On the other hand
    the additional memory for this CPU is visible in the BIOS, Dell server admin but not in the task manager, which still shows the 32gb under performance->physical memory. Rammap also shows only 32GB.. Currently running proprietary processes that along with
    the metafile and windows own ring up nearly 30GB, which in turn causes system latency for GUI and apps, as if the additional 16GB are not there...
    So the questions are these:
    1) does anybody know why the added memory doesn't show up in the task manager / rammap?
    2) if the new memory doesn't show up, does this mean that Windows does not use it (which should be impossible if the CPU is utilized, unless I am wrong about windows using the cpu..)?
    Thank you,
    - Kiril

    Thanks for the reply Ravikumar,
    Unfortunately this solution is inapplicable to my version of the OS as it is 64-bit and not 32-bit. Do you have any other ideas?
    Best,
    - Kiril
    Yes, PAE((Physical Address Extension) is supported only on 32-bit versions of the
    Windows, operating system 64-bit versions of Windows do not support PAE. For information about device driver and system requirements for 64-bit versions of Windows, see
    64-bit System Design. The Address Windowing Extension (AWE) API is supported on 32-bit systems. It is also supported on x64 systems for both native and Wow64 applications.
    Useful link for Address Windowing Extensions is:http://msdn.microsoft.com/en-us/library/windows/desktop/aa366527(v=vs.85).aspx
    If the above info does not help you, please contact dell as suggested by
    Shaon Shan.
    Regards, Ravikumar P

  • Excel 2007 Download Error from SQL Server 2012

    Thank you for your help/comments in advance
    We are running SQL Server 2012, downloading SSRS reports into Excel 2007.
    The report renders to the monitor just fine.
    Most downloads are fine but we get an error with the largest downloads (common denominator) but can be hit or miss.  Usually a second try it will download.  Today we tried numerous times and kept getting the error.
    I saw a link to a service pack fix ...https://msdn.microsoft.com/en-us/library/dd255234(v=sql.110).aspx which somewhat fits my issue.
    The Report Server Log (O:\MSRS11.MSSQLSERVER\Reporting Services\LogFiles\ReportServerService__04_01_2015.log) gives the following error message:
    library!ReportServer_0-2!29bc!04/01/2015-15:02:01:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Invalid offset for item.  ReferenceID: fffffffffffffffe, Offset: -2, Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
    An internal error occurred on the report server. See the error log for more details.;
    library!ReportServer_0-2!29bc!04/01/2015-15:02:12:: i INFO: Dump result: External dump process return code 0x20000001.
    External dump process returned no errors.
    processing!ReportServer_0-2!29bc!04/01/2015-15:02:12:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
    An internal error occurred on the report server. See the error log for more details.;
    library!ReportServer_0-2!29bc!04/01/2015-15:02:12:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See
    the error log for more details. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for
    more details.
       at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.RegisterRuntimeErrorInExpression(VariantResult& result, Exception e, IErrorContext iErrorContext, Boolean isError)
       at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.EvaluateTextRunValueExpression(TextRun textRun)
       at Microsoft.ReportingServices.ReportProcessing.OnDemandReportObjectModel.TextRunImpl.GetResult(IReportScopeInstance romInstance)
       at Microsoft.ReportingServices.OnDemandReportRendering.InternalTextRunInstance.EvaluateOriginalValue()
       at Microsoft.ReportingServices.OnDemandReportRendering.InternalTextRunInstance.get_ProcessedWithError()
       at Microsoft.ReportingServices.Rendering.SPBProcessing.TextBox.WriteCustomNonSharedItemProps(RPLElementProps nonSharedProps, RPLWriter rplWriter, PageContext pageContext)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.PageItem.WriteNonSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.TextBox.WriteItemToStream(RPLWriter rplWriter, PageContext pageContext)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.TextBox.CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, Double parentTopInPage, Double&
    parentPageHeight, Interactivity interactivity)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Rectangle.CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, Double parentTopInPage, Double&
    parentPageHeight, Interactivity interactivity)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Tablix.TablixContext.AddRowMemberContent(TablixMember rowMember, Int32 rowIndex, Int32 colIndex, Int32 rowSpan, Int32 colSpan, Byte memberState, Int32 defTreeLevel, LevelInfo childLevelInfo,
    Double updateWidth)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Tablix.TablixContext.AddRowMember(TablixMember rowMember, Int32 rowIndex, Int32 colIndex, Int32 rowSpan, Int32 colSpan, Byte memberState, Int32 defTreeLevel, LevelInfo childLevelInfo)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, InnerToggleState parentToggleState, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex,
    Int32 parentColIndex, Int32 level, TablixContext context, Boolean& advanceRow, LevelInfo& parentLevelInfo, List`1& ignoreTotals, Boolean keepTogether)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Tablix.CreateTablixItems(Tablix tablix, TablixContext context)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Tablix.CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, Double parentTopInPage, Double&
    parentPageHeight, Interactivity interactivity)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.ReportBody.CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, Double parentTopInPage, Double&
    parentPageHeight, Interactivity interactivity)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.ReportSection.CalculatePage(RPLWriter rplWriter, Int32 page, Int32 totalPages, Int32 regionPageNumber, Int32 regionTotalPages, Boolean firstSectionOnPage, Boolean lastSection, Interactivity
    interactivity, Double heightToBeUsed, PageItemHelper& lastBodyInfo, Boolean& delayedHeader, Boolean& delayedFooter, Boolean& lastSectionOnPage)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.Report.NextPage(RPLWriter rplWriter, ReportSectionHelper& lastPageInfo, Int32 page, Int32 totalPages, Interactivity interactivity, Boolean hasPaginationChunk)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.SPBProcessing.GetReportNextPage(Stream& stream, Boolean collectPageBookmarks)
       at Microsoft.ReportingServices.Rendering.SPBProcessing.SPBProcessing.GetNextPage(RPLReport& rplReport, Boolean collectPageBookmarks)
       at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties,
    CreateAndRegisterStream createAndRegisterStream)
       --- End of inner exception stack trace ---
       at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.HandleRenderingException(ReportRenderingException rex)
       at Microsoft.ReportingServices.ReportProcessing.Execution.RenderReport.Execute(IRenderingExtension newRenderer)
       at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(RenderingContext rc, ProcessingContext pc)
       at Microsoft.ReportingServices.Library.RenderFromSnapshot.DoRendering(ProcessingContext pc, RenderingContext rc)
       at Microsoft.ReportingServices.Library.RenderFromSnapshot.CallProcessingAndRendering(ProcessingContext pc, RenderingContext rc, OnDemandProcessingResult& result)
       at Microsoft.ReportingServices.Library.RenderStrategyBase.ExecuteStrategy(OnDemandProcessingResult& processingResult)
    The user sees the following on her monitor when downloading ...

    Hi Mark,
    As you know this is an known issue in the SSRS 2012 and the fix for this issue was first released in Cumulative Update 3 for SQL Server 2012. For more information about this cumulative update package, click the following article number to view the article
    in the Microsoft Knowledge Base:
    2723749Cumulative update package 3 for SQL Server 2012
    More details information in below article:
    http://support.microsoft.com/en-us/kb/2707015
    As I have tested on my loacal environment and can't reproduce the issue and you have also mentioned that that you didn't meet the issue now. If you got the issue next time, please feel free to let us know if the hotfix will work or not.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

Maybe you are looking for