How to set proxy for windows PowerShell

Hiii,
Look! I need to send emails to internet using Powershell Send-MailMessage command Ok?
but the problem is Proxy Server (TMG).
I also configured Internet Option, LAN Setting so I can browse the internet using internet explorer but the Send-MailMessage! Just can't access to internet.
Of curse When I'm using secure NAT it works fine.
Thanks

Send-MailMessage has all the options you need to send an email, including
choice of mail replay server by name or IP
choice of port if using other than the standard port 25
authentication via the -credential parameter
and SSL via the -UseSsl parameter
Type in:
help Send-MailMessage -Full
to see inline help. You should see output like:
NAME
Send-MailMessage
SYNTAX
Send-MailMessage [-To] <string[]> [-Subject] <string> [[-Body] <string>] [[-SmtpServer] <string>] -From <string> [-Attachments <string[]>] [-Bcc <string[]>] [-BodyAsHtml]
[-Encoding <Encoding>] [-Cc <string[]>] [-DeliveryNotificationOption <DeliveryNotificationOptions> {None | OnSuccess | OnFailure | Delay | Never}] [-Priority <MailPriority>
{Normal | Low | High}] [-Credential <pscredential>] [-UseSsl] [-Port <int>] [<CommonParameters>]
PARAMETERS
-Attachments <string[]>
Required? false
Position? Named
Accept pipeline input? true (ByValue)
Parameter set name (All)
Aliases PsPath
Dynamic? false
-Bcc <string[]>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-Body <string>
Required? false
Position? 2
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-BodyAsHtml
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases BAH
Dynamic? false
-Cc <string[]>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-Credential <pscredential>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-DeliveryNotificationOption <DeliveryNotificationOptions>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases DNO
Dynamic? false
-Encoding <Encoding>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases BE
Dynamic? false
-From <string>
Required? true
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-Port <int>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-Priority <MailPriority>
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-SmtpServer <string>
Required? false
Position? 3
Accept pipeline input? false
Parameter set name (All)
Aliases ComputerName
Dynamic? false
-Subject <string>
Required? true
Position? 1
Accept pipeline input? false
Parameter set name (All)
Aliases sub
Dynamic? false
-To <string[]>
Required? true
Position? 0
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-UseSsl
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String[]
OUTPUTS
System.Object
ALIASES
None
REMARKS
Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
-- To download and install Help files for the module that includes this cmdlet, use Update-Help.
-- To view the Help topic for this cmdlet online, type: "Get-Help Send-MailMessage -Online" or
go to http://go.microsoft.com/fwlink/?LinkID=135256
Example:
Send-MailMessage -From [email protected] -To [email protected] -Subject "Test Email" -Body "this is a test" -SmtpServer "Name or IP address of mail replay server" -Port 25 -Credential "if your mail server requires authentication" -UseSsl
Also see
online help and further examples here.
Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

Similar Messages

  • How to set proxy for 3G connection?

    Can anyone tell me where to set proxy for 3G connection?
    I think I've checked every section in Settings but failed to find anything.
    Thanks for your info.

    It's part of the cellular settings, and is usually set up by your 3G provider. You can't choose your own proxy server

  • How to set proxy for client-server socket connection?

    Hi,
    I'm using the code found on the following page to create a client (mobile) to server (pc) connection and send a text message.
    http://javafaq.nu/java-example-code-503.html
    This works with mobile operators without proxy, but does nothing when the operator uses a proxy. The question is, exactly how to set the proxy and port values for using that code.
    Any help is greatly appreciated, thanks,

    It's part of the cellular settings, and is usually set up by your 3G provider. You can't choose your own proxy server

  • How to set proxy for mail with Gmail account

    Hi, I'm using mail and set up a Gmail pop account. My mac is behind a proxy, say 192.168.0.1:808. I set the system http and https with the above address and can browse the internet with safari. But the mail app cannot receive or send any mails from the google pop/smtp server. Do you know how I can set the proxy for mail so that it can send and receive mail? Thank you very much!

    I solved this problem myself by using an app called proxifier. It's a tunneling tool I guess.

  • How to set proxy for the programme

    Hello Everyone
    I am learning Java Network programming. My connection to Internet has a proxy. When I use URL class to download the information from Internet, it cannot work. I think maybe I have not set the proxy in the programme. Does anybody know how to set it?
    Best wishes
    Aaron Cui Lu

    System.getProperties().put( "proxySet", "true" );
    System.getProperties().put( "proxyHost", "proxyMachineName/IP" );
    System.getProperties().put( "proxyPort", "proxyPort" );

  • How to set Proxy for IE 8.0 on doing Load Testing with OATS 12.1.0.2

    I have tried adding proxy server by adding the address to "Localhost" and Port as 8080.
    but nothing is working out, for recording an EBS instance its working fine ,no need to setup anything in the OATS tool, eg, Proxy settings.
    But when it comes to BPM  with ADF technology , the recorder is not starting the Recording even the pointer navigation also not wokring.
    So, is there way to record the ADF applications in BPM ?
    Thanks in advance.

    Hi Wayne,
    Thing is do we need to add the proxy server here?, as for doing Load testing on EBS application,there is no need of adding a proxy server,
    So the same way it should work with the ADF application too, but its not showing any mouse pointer in the Browser tool bar or recording
    the navigation.
    Point to be noted is, we need to connect to VPN in order to access the Application.
    is it because of VPN connection that its not recording?
    But while doing the functional testing I didn't face anyproblem though as its recording everything even if we are connected to VPN.
    In Functional testing also i found ,all the input fields where we add the "username" or any input data via a "text box" the tool is not able to
    record the field information along with the input we enter.
    If you could let me know ,how to do a Load testing for ADF application using BPM , it would be helpful
    Thanks
    Atish

  • How to set Proxy for iTunes Store?

    I work in my office behind firewall... I have set the proxy in the Network->Proxies in all the options along with my username and password.
    My iTunes is able to show my Store (India), but when I try to sign-in. It give following error
    "We could not complete your iTunes Store request."
    "You must log in to the proxy server in order to access the iTunes Store."
    I couldn't find in iTunes->Preferences... any field to enter my proxy username/password.
    Please help to resolve this issue.
    Thanks.

    I'm having the same problem here in the US. I'm behind a corporate firewall. Proxy settings are correct and I can connect to any web page, but I can't log into the iTunes store.
    I can log into the store on my office PC which has the same proxy settings and is on the same network.. but my PC won't recognize my iPhone due to external device blocking software. I was hoping 8.2 would fix this problem.... any suggestions???????

  • Set up for windows my apple id

    how i set up for windows my apple id

    An update.
    From iCloud Control Panel 2.1.1 for Windows
    "iCloud Control Panel 2.1 and later includes support for Windows 8"
    but you still need to set it up on a Mac or iOS device, "Note: To create an iCloud account you need an iPhone, iPad, or iPod touch with iOS 5 or later, or a Mac with OS X Lion v10.7.5 or later."

  • HT4864 Setting up for windows mail

    How to set up for windows mail

    Go to Settings>Mail,Contacts,Calendars>Add Account>Hotmail and enter your credentials.  See http://support.apple.com/kb/HT1694.

  • How do I transfer animations on a portable hard drive set up for windows os onto my new macro?

    How do I transfer animations on a portable hard drive set up for windows os to my new mac book pro?

    You should be able to copy from a drive even if it is setup for Windows.
    If might help if you can tell us how the drive is formatted.
    Allan

  • How to set ORACLE_HOMES on Windows 2000 for 11i

    How to set ORACLE_HOMES on Windows 2000 for 11i
    As am newbie on windows.
    Its very urgent.

    To set ORACLE_HOME on Windows:
    C:\> set ORACLE_HOME=<location>
    i.e.
    C:\> set ORACLE_HOME=d:\oracle\proddb\10.2.0
    To verify:
    echo %ORACLE_HOME%
    In Apps 11i, you do not have to set it manually, just source the environment file and this will set all environment variables for you.
    - To source the application env file, run envshell.cmd under %APPL_TOP%
    - To source the database env file, run <SID>_<hostname>.cmd under %RDBMS_ORACLE_HOME%

  • How to set proxy authentication using java properties at run time

    Hi All,
    How to set proxy authentication using java properties on the command line, or in Netbeans (Project => Properties
    => Run => Arguments). Below is a simple URL data extract program which works in absence of firewall:
    import java.io.*;
    import java.net.*;
    public class DnldURLWithoutUsingProxy {
       public static void main (String[] args) {
          URL u;
          InputStream is = null;
          DataInputStream dis;
          String s;
          try {
              u = new URL("http://www.yahoo.com.au/index.html");
             is = u.openStream();         // throws an IOException
             dis = new DataInputStream(new BufferedInputStream(is));
             BufferedReader br = new BufferedReader(new InputStreamReader(dis));
          String strLine;
          //Read File Line By Line
          while ((strLine = br.readLine()) != null)      {
          // Print the content on the console
              System.out.println (strLine);
          //Close the input stream
          dis.close();
          } catch (MalformedURLException mue) {
             System.out.println("Ouch - a MalformedURLException happened.");
             mue.printStackTrace();
             System.exit(1);
          } catch (IOException ioe) {
             System.out.println("Oops- an IOException happened.");
             ioe.printStackTrace();
             System.exit(1);
          } finally {
             try {
                is.close();
             } catch (IOException ioe) {
    }However, it generated the following message when run behind the firewall:
    cd C:\Documents and Settings\abc\DnldURL\build\classes
    java -cp . DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:315)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:510)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:487)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:615) at java.net.URL.openStream(URL.java:913) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    I have also tried the command without much luck either:
    java -cp . -Dhttp.proxyHost=wwwproxy -Dhttp.proxyPort=80 DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.yahoo.com.au/index.html
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.URL.openStream(URL.java:1009) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    All outgoing traffic needs to use the proxy wwwproxy (alias to http://proxypac/proxy.pac) on port 80, where it will prompt for valid authentication before allowing to get through.
    There is no problem pinging www.yahoo.com from this system.
    I am running jdk1.6.0_03, Netbeans 6.0 on Windows XP platform.
    I have tried Greg Sporar's Blog on setting the JVM option in Sun Java System Application Server (GlassFish) and
    Java Control Panel - Use browser settings without success.
    Thanks,
    George

    Hi All,
    How to set proxy authentication using java properties on the command line, or in Netbeans (Project => Properties
    => Run => Arguments). Below is a simple URL data extract program which works in absence of firewall:
    import java.io.*;
    import java.net.*;
    public class DnldURLWithoutUsingProxy {
       public static void main (String[] args) {
          URL u;
          InputStream is = null;
          DataInputStream dis;
          String s;
          try {
              u = new URL("http://www.yahoo.com.au/index.html");
             is = u.openStream();         // throws an IOException
             dis = new DataInputStream(new BufferedInputStream(is));
             BufferedReader br = new BufferedReader(new InputStreamReader(dis));
          String strLine;
          //Read File Line By Line
          while ((strLine = br.readLine()) != null)      {
          // Print the content on the console
              System.out.println (strLine);
          //Close the input stream
          dis.close();
          } catch (MalformedURLException mue) {
             System.out.println("Ouch - a MalformedURLException happened.");
             mue.printStackTrace();
             System.exit(1);
          } catch (IOException ioe) {
             System.out.println("Oops- an IOException happened.");
             ioe.printStackTrace();
             System.exit(1);
          } finally {
             try {
                is.close();
             } catch (IOException ioe) {
    }However, it generated the following message when run behind the firewall:
    cd C:\Documents and Settings\abc\DnldURL\build\classes
    java -cp . DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:315)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:510)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:487)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:615) at java.net.URL.openStream(URL.java:913) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    I have also tried the command without much luck either:
    java -cp . -Dhttp.proxyHost=wwwproxy -Dhttp.proxyPort=80 DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.yahoo.com.au/index.html
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.URL.openStream(URL.java:1009) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    All outgoing traffic needs to use the proxy wwwproxy (alias to http://proxypac/proxy.pac) on port 80, where it will prompt for valid authentication before allowing to get through.
    There is no problem pinging www.yahoo.com from this system.
    I am running jdk1.6.0_03, Netbeans 6.0 on Windows XP platform.
    I have tried Greg Sporar's Blog on setting the JVM option in Sun Java System Application Server (GlassFish) and
    Java Control Panel - Use browser settings without success.
    Thanks,
    George

  • How to set proxy setting in all application

    i am using college wifi system, it used by proxy setting and username and password for that,
    in the time of microsft updation I cant access internet, how to setup proxy for that??????

    Hi,
    Was your issue resolved?
    If no, please provide the detailed information of your issue for analysis.
    If the problem happened after Windows Update, let us know which update.
    You could set the proxy as below:
    1. Open Internet Explorer.        
    2. Click the Tools button, and then click
    Internet Options.
    3. Click the Connections tab, and then click
    LAN settings.
    4. Select the Use a proxy server for your LAN check box.
    5. In the Address box, type the address of the proxy server.
    6. In the Port box, type the port number.
    7. If your network requires separate proxy addresses for different services, such as HTTP, HTTPS, or FTP, click the
    Advanced button, and then type the individual proxy server addresses to use.
    8. When you are finished making changes, click OK until you return to Internet Explorer.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to use proxy for all application in XFCE?

    Hi all,
    Is there any way I can setup a proxy and then all applications over XFCE can use it, just like the Internet Option in Windows?
    I tried "export PROXY=..." in command line and setup proxy for Firefox, but those setting is not for overall system.
    If unfortunately there is no way for global setting, at least please tell me how to setup proxy for svn command.
    Thank you.

    Sign in with whatever Apple ID desired on the device in iMessage setup.
    This has no affect on the Apple ID used for store purchases or iCloud.

  • How to prevent iTunes for Windows from "Updating iTunes Library"? (Library is on a NAS and managed by iTunes for Mac. Now getting update wars between Mac and Windows versions of the player.

    How to prevent iTunes for Windows from "Updating iTunes Library"?
    My library is on a NAS and managed by iTunes on a Mac. I can connect from wife's Windows laptop using iTunes for Windows but every time I do, it Updates iTunes Library. Next time I log in from my Mac it Updates iTunes Library in return. It appears I'm experiencing "Update Wars" between the Mac and Windows versions of iTunes. I would like to allow my wife to stream iTunes songs to her new laptop but I don't want any updates from this source... prefer to manage the library from my Mac and not allow Windows to do any thing other than listen to existing playlists.
    Thanks for any help/suggestions.

    Connect the PC to the library on the NAS. Wait while "updated".
    Under Edit > Preferences > Advanced make sure the media folder is correctly pointed at the media folder on the NAS. If not correct, close iTunes, wait a few moments, then open iTunes again.
    Close iTunes on the PC. Do not open iTunes on the Mac.
    Copy the library files, iTunes Library.itl, iTunes Library Extras.itdb, iTunes Library Genius.itdb, sentinel and the folder Album Artwork into an empty iTunes folder on the PC, for example C:\iTunes.
    Click the icon to start iTunes and immediately press and hold down SHIFT. Keep holding until prompted to choose or create a library. Click choose and browse to the copied .itl file, e.g. C:\iTunes\iTunes Library.itl
    The library should now work properly on the PC, however check the setting for the media folder. If needs be correct, close iTunes and reopen.
    Open iTunes on the Mac. It will update again, but that should be last time.
    tt2

Maybe you are looking for