Powershell read XML format config file
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的更多相关文章
- 配置文件操作(ini、cfg、xml、config等格式)
配置文件的格式主要有ini.xml.config等,现在对这些格式的配置文件的操作(C#)进行简单说明. INI配置文件操作 调用系统函数GetPrivateProfileString()和Write ...
- Camel routes in Spring config file
The normal spring bean definition configuration file, the xsi:schemaLocation only has two: beans and ...
- Create a custom configSection in web.config or app.config file
config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> ...
- 2017.12.20 Java中的 IO/XML学习总结 File类详细
IO / XML 一.File类 1.定义/概念 Java是面向对象的语言,要想把数据存到文件中,就必须要有一个对象表示这个文件.File类的作用就是代表一个特定的文件或目录,并提供了若干方法对这些文 ...
- MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”
写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...
- Example config file /etc/vsftpd.conf
# Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. Thi ...
- Can not find connection pool config file
暂时未解决 checkActivation=====================true Can Not Parse ConnectionCfg! 2019/10/12-11:23:38 > ...
- [笔记]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 ...
- error in config file "/etc/rabbitmq/rabbitmq.config"
记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...
随机推荐
- 【问题解决方案】GitHub上克隆项目到本地
说明: 克隆线上项目到本地,可以直接clone克隆,不必再自己建文件夹啊,初始化啊. 命令: git clone + 想要克隆的项目的地址 END
- Docker设置容器开机自启动
设置如下: docker update --restart=always 镜像ID 例如:docker update --restart=always e39a959d7bff. 参考:https:/ ...
- Maya2019下载安装与激活
目录 1. 更多推荐 2. 下载地址 2.1. OneDrive 2.2. Window (64位) 2.3. MAC_OSX 3. 安装激活教程 1. 更多推荐 其他Maya版本的下载与激活:htt ...
- spring boot 加载指定xml
方法一:使用@ImportResource 方法二:在test中 @ContextConfiguration(locations = "classpath:spring-profile.xm ...
- Windows 进入上帝模式窗口
Win10上帝模式如何启用? 默认情况下,Win10的上帝模式是隐藏的,如果要开启的话,操作步骤也非常简单,下面就介绍两种方法. 方法一.直接运行命令行 1.使用[Win + R ]快捷键打开“运行” ...
- uniq 去除重复行
1.命令功能 uniq可以输出或忽略文件中的重复行,经常需要使用sort先对文件进行排序,然后使用uniq去重并计数. 2.语法格式 uniq option input uniq 选项 ...
- SSM三大框架整合梳理
整合步骤 0.搭建动态web项目 1.需要的jar包 spring(包括springmvc) mybatis相关jar包 mybatis与spring的整合包(个人建议尽量使用高版本的,避免出现一些奇 ...
- Qt 样式对于QPushbutton 增加 hover press release效果
按钮的三种状态,未被选中,选中(划过),点击时候的效果 使用setStyleSheet即QSS样式实现. QPushButton *MyBtn = new QPushButton(this); MyB ...
- pspice中参数的意义
摘自:http://royroyyy.blog.163.com/blog/static/137650617201102610471196/ 有源器件在符号库中的名称(NAME)通常以关键字开头,后根长 ...
- windows 10 删除资源管理器导航栏 Creative Cloud Files
安装完Adobe的Photoshop.After Effects等软件后,资源管理器导航栏会出现让人讨厌的Creative Cloud Files目录,稍微修改注册表即可删除. 快捷键Windows ...