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. Java Collection总结

    继续啊啊啊啊啊啊 7. collection基本用法 Collection: add(obj) remove(obj) size() isEmpty() contains(obj) iterator( ...

  2. 简述vue中v-if和v-show的区别

    vue中的 v-if 和 v-show 二者都可以动态的控制元素的隐藏和显示,但是他们控制的原理是不同的 v-if v-if 控制元素显示或隐藏是把dom元素整个的渲染或者删除,如果删除,也就是页面中 ...

  3. linux创建相关待同步目录

    [root@rsync-server-1 ~]# mkdir /data/{web,web_data}/redhat.sx -p [root@rsync-server-1 ~]# tree /data ...

  4. 一、模型验证CoreWebApi 管道方式(非过滤器处理)

    一.新建.Net Core的MVC项目添加WebApi控制器的方式 using System; using System.Collections.Generic; using System.Linq; ...

  5. Oracle Set操作

    并集合 union/uinon all union 会去重,uinon all 不去重 交集 intersect 差集 minus

  6. Python链接liunx 带尝试

    本文实例讲述了python下paramiko模块实现ssh连接登录Linux服务器的方法.分享给大家供大家参考.具体分析如下: python下有个paramiko模块,这个模块可以实现ssh登录lin ...

  7. MFC消息详解 (WindowProc|OnCommand|OnNotify)

    1. 怎样使用MFC发送一个消息用MFC发送一个消息的方法是, 首先,应获取接收消息的CWnd类对象的指针: 然后,调用CWnd的成员函数SendMessage( ). LRESULT Res=pWn ...

  8. orm中 如何模糊匹配某一年的用户和某一事时间段的用户

    导入Q查询

  9. PHP实现跨服务器session共享的方法教程

    今天带来PHP实现跨服务器session共享的方法教程. 本文实例讲述了PHP实现cookie跨域session共享的方法.分享给大家供大家参考,具体如下: 做过web开发的小伙伴们都了解cookie ...

  10. Pycharm创建模板头部默认

    PyCharm 打开,点击左上角 “FILE” 进入 “Settings”,进行头文件设置: 如下: 我的模板: #!/usr/bin/env python# -*- coding:utf-8 -*- ...