There are two good and easy ways available to generate a Pop-up message box using PowerShell. These methods uses DotNet and Windows Shell so works in any version of Operating System.
Simple way:-
In this powershell relies on a method which is available in windows shell object(WSH). In this you can control four factors, “Message box title”, “Message”, “timeout for message box”, “box type”.
Below is a simple example.
$a=new-object-comobjectwscript.shell
$b=$a.popup(“This is a test message from http://Techibee.com “,0,“Test message from techibee”,1)
Second and effective method:-
In this we can make use of dotnet windows forms to generate the pop-up message boxes. Though code looks bit heavy it works very well and has lot of flexibility.
[Windows.Forms.MessageBox]::Show(“Test message from Techibee.com!. Subscribe to news letters, RSS feeds at https://techibee.com to stay tuned”,“PowerShellScripts.blogspot.com”,[Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Information)
PowerShell has a built in cmdlet(Get-Eventlog) which directly interacts with Event Viewer. You can query the data in the way you want using this cmdlet. Below are some of the examples…
Get-Eventlog -logName System
This queries all events in System event.
Get-EventLog -LogName System | ? {$_.Entrytype -match “error” }
This queries all error events in System event viewer.
This queries all error events in last one day. You can similarly use the methods of (get-date) to query events in last few seconds, minutes, hours, days, etc.
People who got their hands really wet with exchange 2007/2010 has a good amount idea about Exchange back pressure. Basically it is a kind of situation where Microsoft Exchange stops receiving emails. This is a new condition introduced in Exchange 2007 and improved in Exchange 2010 for better handling of emails.
Exchange server feels this back pressure when it is out of resources. This resource outage can be of two types 1) Disk out of space 2) High Memory utilization
If Exchange 2007 queue is growing fast and you want to find who is the top contributor, below code helps you. You need to run this code from a exchange management shell since the code involves Exchange cmdlets like get-message.
Since windows core provides a CLI based interface, it necessitates learning command line stuff for system administrators. Though most of the tasks can be performed remotely, tasks related to network has to be done from the Core console itself. Here in this post, I will provide you two simple commands to enable and disable network connections from Windows 2008 Core console.
First let’s see the list of network adapters available in the server.
Netsh interface ipv4 show interface
Now disable the connection with name “Local Area Connection 2”
netsh interface set interface “Local Area Connection 2” DISABLE
Similarly, to enable a connection back, just replace DISABLE with ENABLE in above command.
I recommend doing these operations from server console(or ILO/DRAC) directly as this can cause network interruptions and running these commands can take your server out of network. Cross verify the commands and run them with caution.
I came across a nice service which makes the task of following up with other parties very easy. The advantage with this service is it works through email; that means you can create/read follow-ups anytime anywhere. Visit http://www.followupthen.com/ to know more about it. Btw, I started using this 🙂
I have seen this problem randomly on my windows 7 computer. After close observation, I found that DRAG and DROP won’t work from low privileged window to High privileged window. I generally run a command prompt with administrator and try to drag drop items from my explorer to the elevated command prompt. Since the elevated command prompt is running in high privilege mode, and my explorer in low privilege mode, drap-drop from explorer to cmd is not working. Whereas same operation to a normal command prompt is working without any issues since it is in the same privilege mode as my explorer.
I hope this small briefing helps you come out of drap-drop dilemma.
Btw, command prompt appears like below when it is in high privilege mode.
“How to audit local administrator password on list of servers using a script”— this is the question I have seen in one of the forums I participate. The requester asked for a way to read local administrator password on a server and compare it with the standard password and report deviations if any. While this sounds like a good algorithm to audit, I wonder how one can “READ” passwords of any account in Windows Operating System. But still requirements are requirements and we need a way to address them.
After thinking for sometime, I recollected one of the old tricks I have used during my initial days of system administration. “Accessing of other systems resources(like C$) works if the source(from where you are trying to access) and target systems are running with same local administrator password”. That means you should login to system with local administrator password and then you should be able to manage remote systems if they have same password with which you logged into the current one. I felt why can’t I use this to audit the administrator password.
I quickly wrote a powershell script(code below) of few lines and tested. It worked like a champ. So, what I am trying to do here is, accessing the c$ share of remote computer. This works if the remote computer password is same as the one with which I logged into current computer; otherwise it fails. Is n’t it enough to audit the admin rights and identify the computers which are not having the correct password? I feel this should be good and quick.
I came across a couple of RAID disk space calculators day before yesterday and thought of sharing them. They basically helps you to figure out the usable space you get out of your available disks when configured under a particular RAID level(say RAID 0, RAID 1, RAID 5, etc). It also gives sufficient information about each RAID level like no. of disks it should have etc. Another good thing is, they are available online. So you can connect and calculate anytime. Below are the links.