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. Spring AOP 简单应用,对请求参数进行拦截处理

    AOP的主要角色 切面:使用切点表达式表示,指定了当前切面逻辑所要包裹的业务模块的范围大小: Advice:也即切面逻辑,指定了当前用于包裹切面指定的业务模块的逻辑 Advice的主要类型 @Befo ...

  2. 查看Xcode里的描述文件

    iOS应用打包离不开描述文件,也就是mobileprovision文件. 一般我们的操作是双击,Xcode就会运行该文件.但是具体文件里是什么,Xcode又是否真的加载了该文件?文件里又描述了什么呢? ...

  3. set unused

    使用 set unused 选项标记不再使用的列 使用 drop unsused columns 丢弃标记为unused的列 alter table tabName set unused column ...

  4. split 分割文件

    1.命令功能 split将文件分割成多个碎片文件. 2.语法格式 split  option  input  prefix split  选项    输入文件名   输出文件名前缀 参数说明 参数 参 ...

  5. cut 从文本中提取一段文字并输出

    1.命令功能 cut 从每个文件中截取选定部分并输出. 2.语法格式 cut  option  file 参数说明 参数 参数说明 -b (–bytes) 字节 -c (--characters) 字 ...

  6. 新特性2-lambda表达式

    最近几天学习了一下lambda表达式,看了不少博客,感觉有一篇博客总结的一句话总结的很好:lambda表达式是一段可以传递的代码,它的核心思想是将面向对象中的传递数据变成传递行为.其实以前也有传递行为 ...

  7. Sass @debug

    @debug 在 Sass 中是用来调试的,当你的在 Sass 的源码中使用了 @debug 指令之后,Sass 代码在编译出错时,在命令终端会输出你设置的提示 Bug: @debug 10em + ...

  8. 二、冯式结构与哈佛结构及ARM处理器状态和处理器模式

    2.1 冯式结构与哈佛结构 2.1.1 两者的区别 如果是独立的存储架构和信号通道那就是哈佛结构,否则就是冯式结构 结构与是否统一编址没有关系,也与 CPU 没有关系,与计算机的整体设计有关 CACH ...

  9. php连接access

    1.在控制面板中打开管理工具图标. 2.双击其中的数据源(ODBC)图标. 3.选择系统 DSN 选项卡. 4.点击系统 DSN 选项卡中的添加. 5.选择Microsoft Access Drive ...

  10. struts2+ajax 前后端传值

    摘要: 主要实现步骤如下: 1.JSP页面使用脚本代码执行ajax请求 2.Action中查询出需要返回的数据,并转换为json类型模式数据 3.配置struts.xml文件 4.页面脚本接受并处理数 ...