Windows Remote Desktop logging - windows-7

I have a Windows 7 machine that several folks Remote Desktop into. I'm looking for a way to log who (IP address) has logged in locally (on the machine that has been logged into) and/or if there is a snazzy way to email myself a notification whenever someone logs in that would be even better.
Is this just a matter of port listening? Can Windows do this on it's on without third party tools?

I don't think this is the end solution but in the interim you could create a shell or batch script that executes at log in and sends an email. The other option is tapping into the EventLogs. Perhaps you can email something form the event log.
http://technet.microsoft.com/en-us/library/cc771314.aspx
http://www.petri.co.il/send_mail_from_script.htm
Good luck.

Related

Script to Log into several user accounts

We manage several laptops that are used for emergency situations and thus are rarely used (knock on wood).
When we start up these laptops periodically to run windows updates, we also sign in with several user accounts for each laptop in order to keep the profile up to date.
Is there a way to automate the logging in of each account with a script?
For example, I could log in as administrator, run the script and the laptop would do the following:
Log out my administrator account,
sign in with useraccount 1, log out
sign in with useraccount 2, log out
sign in with useraccount 3, log out
I havent had much luck in googling this type of thing and was hoping someone here might have an idea.
I simply cant find a script that logs in with a user account.
The closest I can find is recommending auto signin but that only applies to one account and not what I need for this task.
Globally, you can't do that: it would break security if you were allowed to interact, programmatically, with the login screen.
IF it's possible, I would look to a way to do the login to remote machine through either Telnet (not recommended! but can be done with standard Windows tools) or SSH (will need a SSH server). If you can do the upgrade this way, then you're saved, in particular with SSH because you can avoid passwords' sharing through key exchange - probably won't work with domain accounts, however, but local accounts will be fine.
Otherwise, if you require to really open a Windows session, best you can do, IF your configuration allows it AND if it works (regarding the profile's update) is to connect through RDP (Remote Desktop) to each laptop, with each login.
You'll need to establish a RDP connection to each laptop from a "pilot" PC, save each connexion individually within a .rdp file, saving password inside the connection file.
Then, you can launch the connection with the command mstsc <machine+account>.rdp to establish a connection. A bit later, you can kill the connection (with either taskkill or through a pilot process / tool, I would use AutoIt for this preferably).
If password saving is an issue, then each employee should have its own set of RDP files. Through something like Autoit, in particular, you can input the password once, and fill automatically each password prompt.
The tricky part would be to know when it's time to close the remote desktop. I would try to automatically execute a command to distant computer that would reboot it once done, so your remote desktop would close automatically.
Anyway, it will be a real gas plant to implement all this in a smooth process...

How to prevent multiple users from simultaneously accessing an Azure VM?

We created a VM as a replacement for physical machine with rarely used software on it.
When I tested it I noticed when a second user accesses the VM, the first user is kicked out and sees the message "You have been disconnected because another connection was made to the remote computer".
However, on another VM that wasn't set up by me, I'm getting the warning "Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in any way?"
What VM or Windows setting(s) do I need to change to display this message on the new VM?
I found the following answer on serverfault more helpful than the "copy & paste reply" by Jabbar.
The message you want will appear for the 3rd user on Windows server:
By default a Windows VM in Azure is configured for remote administration, which allows up to 2 users to access the machine to undertake remote administration of that machine. If a third user attempts to connect you will see this message. you will see this if a user has disconnected, but not logged off so their session is till running and using a slot.
Windows Server will, by default, let 2 concurrent users log on. Windows 10, will only allow only 1 user.

Sent Email process not working

I have a question about my application built in Oracle APEX 4.2. This application has a process to send emails (when a user changes his password or requests a password reset).
When I run this application online on my "apex.oracle.com" account, it runs fine. But when I run it on my home computer (running Windows 7), the email process doesn't work. Probably it is because my home server is not an email server.
Can someone please help me so that my home computer is able to send emails via my above mentioned application?
Thanks in advance.
you have several options:
Configure a local SMTP server so it can be use by APEX and send emails.
Connect to a remote server - like Google - and sends emails that way (you have to open a new account and connect with that and also there's some certificate problems, https://arkatec.wordpress.com/2011/08/15/sending-email-using-oracle-database-and-google-mail-service/)
Use htmldb_mail package (I haven't tried this one)
In the first options you need to construct a procedure that does all the work for you.
You can use one of this:
http://www.orafaq.com/wiki/Send_mail_from_PL/SQL
Important: keep in my that you're going to encounter permission issues with the UTL packages (grant execute on UTL_XXX to USER) and algo, if you're are working on 11g you need to create an ACL

Getting mail on windows logon with username of logged-in user

I am trying to create action task that will send mail when anyone logs in to a particular system with username of a logged in user.
I am very new to this task since I never worked as a system admin anytime.
What I think I should do is to specify a program to execute when log-in event occurs, but am not aware of what sort of program I should. I thought it should be exe file.
Q. Can I specify vbs file?
Q. If yes what should be the content of vbs? Is there any ready made script available for accomplishing the same?
Q. Also not sure where to specify it. Is this below screen where I can specify it:
Q. Also this I am trying to do on windows 7 which is in network with AD configured on Windows Server 2008. So where should I specify the action? on server or on this particular Win 7 machine?
If u have AD, you can use logon scripts (*.cmd | *.vbs) and specify it for each clients.
To send email by the command line, try to use smth like telnet smtp.gmail.com 25/465.

How to get and send files from an application to another machine or Windows Explorer but not another application?

Sorry if my question is confusing but what I am looking to do is this. I am creating an application that is supposed to send and receive files directly to another machine without having to connect to any other application but the windows explorer on another machine. I know you can write a client and server much like a FTP program, but that's not what I am looking for. An application simply connects to Windows or windows explorer on another machine for sending or receiving files.
I have looked or researched for information online, but not much to look at.
Is there a way to do this? If so, how.
MORE INFO:
I want to be able to start my application on a machine and send and receive files automatically from or to another local machine without establishing any direct connection very much like what Microsoft Window does. You open your windows explorer and drag and drop files from or to another machine. Only that I want to do that programmatically within my application. I start my application and simply request or send for specific file at a specific location. The way I have it written now you have to run two different copies of the same program on different machines - one as a server and the other as a client.
Maybe what I am looking for is a way to get access to the filesystem of another local machine without socket to socket connection.
Thanks in advance.
Windows Explorer is not an application that foreign programs can "connect" to. You need to connect to something that will actually be listening for connections. The most direct way would probably be to set up a network share on the server and then use WNetAddConnection2 to connect to that share on the client.

Resources