windows-server-2008

PowerShell Script to move folders one level up and delete the previous containing folder

戏子无情 提交于 2019-12-14 04:01:32
问题 I'm having a windows server 2008 machine on which i've a folder structure like root_folder ...........username1 ....................project1 ............................category ....................................subproject1 ....................................subproject2 ....................................subproject3 ....................project2 ............................category ....................................subproject1 ....................................subproject2 .............

How to obtain exit code when I invoke NET USE command via Powershell?

自作多情 提交于 2019-12-14 03:49:47
问题 I have the powershell snippet below which I intend to close connections to a shared locations by calling NET.exe tool: if ($connectionAlreadyExists -eq $true){ Out-DebugAndOut "Connection found to $location - Disconnecting ..." Invoke-Expression -Command "net use $location /delete /y" #Deleting connection with Net Use command Out-DebugAndOut "Connection CLOSED ..." } QUESTION :How can I check if the invoked Net Use command worked fine without any errors? And if there is, how can I catch the

Java Server Not Releasing Connection Lock

末鹿安然 提交于 2019-12-14 03:09:47
问题 I have an issue very similar to jbu's bind errors in Java. The difference is that my server opens a stream to accept connections all day, then I have a script to hard kill the service in the morning, wait 10 secs, then restart the service to accept connections. Most of the time, it works, but on occasion, the service will suffer BindExceptions when attempting to start up. I can't think of a good way to close the stream in the program before it's hard killed by an external script, so I wanted

Opening .docx/.docm file inline to <iframe> in IE-8 browser with JSF 2.0 is showing blank iframe with multiple session

て烟熏妆下的殇ゞ 提交于 2019-12-14 03:04:08
问题 I am using <iframe> to open MS Office 2007/2010 document file like docx/docm in a JSF 2.0 project that is deployed at Websphere App Server 8.5, and accessing its url from a client having Windows Server 2008 and MS Office 2010 installed with IE-8 browser. the src of <iframe> is the document url, the example code of <iframe> is exampled here from my .xhtml page. <iframe width = "80%" height = "90%" src = "http://<ip>/files/test.docx"> When we open the respective url with this <iframe>, test

Edit windows Group Policy from Command line (CMD)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 02:53:23
问题 I want to add some group policy and I need to added by batch file How can I edit windows Group Policy from windows command line? 回答1: Try importregpol.exe http://blogs.technet.com/b/fdcc/archive/2008/05/07/lgpo-utilities.aspx It will import whatever is in the pol file you specify. To make a pol file I blank the policy by remove machine and user then set the desired settings with the LGPO editor MMC and grab the pol files that are created. 来源: https://stackoverflow.com/questions/25341093/edit

MSDN download for Windows Servers 2008

我的梦境 提交于 2019-12-14 02:29:35
问题 I am currently looking at the list of available ISOs for Windows Server 2008 on MSDN subscription site and I need to know which one to download for using the Hyper-V feature. I have the Visual Studio Team System Development Edition with MSDN Premium license. Follow up question on the available ISOs (x86 and X64) with and without Hyper-V. 回答1: You can use x64 Standard, Enterprise, or Data Center. This information and a lot more is in the Hyper-V Getting Started Guide. 来源: https://stackoverflow

object of Interop Word Document Class is null on Windows Server 2008 - Word Open method

给你一囗甜甜゛ 提交于 2019-12-13 18:45:49
问题 While I am opening word document and saving it on my machine its working fine, but when I am uploading it on server and opening it there, It is going in if (doc == null) block, it should not go. Please update my question title if its not relevant or ask for any clarification. Here is my class: using System; using System.Collections.Generic; using System.Web; using Microsoft.Office.Interop.Word; /// <summary> /// Summary description for ClsWordExManager /// </summary> public class

Using task scheduler for running java jar (from batch file)

拜拜、爱过 提交于 2019-12-13 15:05:09
问题 I am scheduling a task (with windows task scheduler) which simply run a batch file. this batch is running a jar file (Java program) with a simple "Java -jar test.jar". When i run the script from the command line manually, the java program runs well and no exception is shown. but when the task schedular does the same (calling the command), the java program ends with an exception: "ClassNotFoundException" for one of the classes which is in my jar. What way be the cause of this? what is the

Disable “application has stopped working” window

拟墨画扇 提交于 2019-12-13 11:51:11
问题 We got a .NET WCF service that should be 100% uptime ideally. But sometimes we have a memory leaking issues in our application that caused by 3rd party DB connectivity component. We configured nnCron to watch for process existence and when the process of that service is exited, it should start it again. But when the app is crashing down windows pops up an noisy window informing that app has crashed. Here it is: And only when we click on dumb "Close the program" button, the process really

Appcmd script that will monitor IIS app pools and send email if application pools is stopped

自作多情 提交于 2019-12-13 05:03:33
问题 I am looking for a script with appcmd, that will monitor the IIS application pools and we can also get email notifications when some apppools are crashed. We want to put the script as a scheduler task. 回答1: I suggest you combine the information from these two resources http://technet.microsoft.com/en-us/library/cc771701(v=ws.10).aspx http://blogs.msdn.com/b/amb/archive/2012/10/18/how-to-get-an-application-pool-configuration-with-appcmd-exe.aspx But in summary you can use appcmd to return a