Skip to main content

Posts

Showing posts from December, 2017

Excel not enough free memory

Opening files in Outlook shows an error message that there is not enough free memory to run the program. But the computer has enough RAM installed and no other application is running on the computer except Outlook. Office programs by default don't trust or block files originating from the Internet. This is of course a good security settings but if this setting is getting to your nerves because even if the document that is coming from your own domain you are not able to open. Or the file is originating from your own personal email account other than your company email but when it goes to your Outlook you cannot open it. This is the scenario where good and harsh words will start crossing your mind. You will need to ask what the heck is going on? The Microsoft link below provide some solution on how this thing can be resolved. The article title of the link below is: Error message in Outlook: "There is not enough free memory to run this program. Quit one

How to get uptime in Windows using PowerShell

If you need to monitor how long the machine has been up, or whether the machine rebooted by itself or someone has just rebooted the server for without any reason. Then getting the uptime of the machine or server is important. PowerShell code below gets the uptime by using a command line and processing its output. #========================== #get the uptime and save to text file Invoke-command -ScriptBlock { net statistics server >c:\online.txt }  $xcmd = select-string -path "c:\online.txt" -Pattern "since" | select line |ft -hidetableheaders  write-output $xcmd | out-file c:\online1.txt  $stry = get-content c:\online1.txt | out-string  $concatString = $stry.Substring(18,15) Write-host  $concatString #Get the date $StartDate= [datetime] $concatString $EndDate= (GET-DATE) $xdate = NEW-TIMESPAN –Start $StartDate –End $EndDate write-output $xdate #========================== Sample output: Days              : 3 Hours