upload.xml
<?xml version="1.0" ?>
<ftpConfig>
<Protocol>ftp</Protocol>
<HostName>127.0.0.1</HostName>
<UserName>admin</UserName>
<Password>Password</Password>
<RemotePath>/e/test/path/data/</RemotePath>
<LocalPath>e:\test\path\data\</LocalPath>
</ftpConfig>

$xmlData=[xml](Get-Content "E:\test\path\scripts\upload.xml")
$localPath = $xmlData.ftpConfig.LocalPath
$remotePath = $xmlData.ftpConfig.RemotePath

Powershell read XML format config file的更多相关文章

  1. 配置文件操作(ini、cfg、xml、config等格式)

    配置文件的格式主要有ini.xml.config等,现在对这些格式的配置文件的操作(C#)进行简单说明. INI配置文件操作 调用系统函数GetPrivateProfileString()和Write ...

  2. Camel routes in Spring config file

    The normal spring bean definition configuration file, the xsi:schemaLocation only has two: beans and ...

  3. Create a custom configSection in web.config or app.config file

    config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> ...

  4. 2017.12.20 Java中的 IO/XML学习总结 File类详细

    IO / XML 一.File类 1.定义/概念 Java是面向对象的语言,要想把数据存到文件中,就必须要有一个对象表示这个文件.File类的作用就是代表一个特定的文件或目录,并提供了若干方法对这些文 ...

  5. MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”

     写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...

  6. Example config file /etc/vsftpd.conf

    # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. Thi ...

  7. Can not find connection pool config file

    暂时未解决 checkActivation=====================true Can Not Parse ConnectionCfg! 2019/10/12-11:23:38 > ...

  8. [笔记]HAproxy reload config file with uninterrupt session

    HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...

  9. error in config file "/etc/rabbitmq/rabbitmq.config"

    记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...

随机推荐

  1. 正在连接localhost...无法打开到主机的连接。 在port 8080: 连接失败

      在cmd中用telnet连接tomcat,出现了"正在连接localhost...无法打开到主机的连接. 在port 8080: 连接失败"原因是我的tomcat是绿色版的,没 ...

  2. C# xml格式字符串,插入到数据库出现非法字符

    在debug模式下快速监视看到的数据是完全正常的,即取到的是<xml>,但是把该字符串拷贝到UltraEdit中,取到的第一个字符是问号.使用正则表达式^[^<]进行替换,意思是把开 ...

  3. Cannot change column 'id': used in a foreign key constraint

    原因:为表添加自增长,但由于该表有外键而报错 发现是因为外键的影响,不能随便的更改表结构. 要想更改表结构,首先要把基层的表修改了. A表 作为B表的外键,A表不能随便修改. B表 有A表的外键,必须 ...

  4. 图片,word,Excel等附件上传

    @ResponseBody @RequestMapping("/upload") public String upload(HttpServletRequest request, ...

  5. jquery 点击加载更多

    html部分 <ul class="bill moreadd"> <div class="total"><span>-< ...

  6. struts2 中的 addActionError 、addFieldError、addActionMessage方法的区别添加错误信息

    转自:https://www.cnblogs.com/wangyp/archive/2011/07/13/2104828.html 一.addActionError("错误内容") ...

  7. Centos7搭建日志服务器rsyslog+loganalyzer

    一.系统环境 Rsyslog Server OS:CentOS 7 Rsyslog Server IP:172.28.194.118 Rsyslog Version: rsyslog-7.4.7-12 ...

  8. python学习笔记(十六)python操作redis数据库

    Redis是一个key-value存储系统,它支持丰富的数据类型,如:string.list.set.zset(sorted set).hash. Redis特点 Redis以内存作为数据存储介质,所 ...

  9. python学习笔记(十五)python操作数据库

    1.连接mysql,ip,端口号,密码,账号,数据库 2.建立游标 3.执行sql 4.获取结果 5.关闭连接,关闭游标 游标打开仓库的大门: import pymysql conn=pymysql. ...

  10. 【HDOJ6693】Valentine's Day(概率)

    题意:给定n件物品,每件物品让周驿东开心的概率为a[i] 要求从中选一些,使得周驿东恰好开心一次的概率最大 n<=1e4,0<=a[i]<=1 思路: #include<bit ...