powershell

Multiple csv files into a xlsx file but different sheets using powershell

女生的网名这么多〃 提交于 2021-01-24 03:23:08
问题 I have 20 csv files. Each are unrelated. How do I combine them together into one xlsx file with 20 sheets, each named after the csv files. $root = "C:\Users\abc\Desktop\testcsv" $CSVfiles = Get-ChildItem -Path $root -Filter *.csv $xlsx = "C:\Users\abc\Desktop\testxl.xlsx" #output location $delimiter = "," #delimiter #Create a excel $xl=New-Object -ComObject Excel.Application $xl.Visible=$true #add a workbook $wb=$xl.WorkBooks.add(1) ForEach ($csv in $CSVfiles){ #name the worksheet $ws=$wb

Multiple csv files into a xlsx file but different sheets using powershell

不打扰是莪最后的温柔 提交于 2021-01-24 03:22:15
问题 I have 20 csv files. Each are unrelated. How do I combine them together into one xlsx file with 20 sheets, each named after the csv files. $root = "C:\Users\abc\Desktop\testcsv" $CSVfiles = Get-ChildItem -Path $root -Filter *.csv $xlsx = "C:\Users\abc\Desktop\testxl.xlsx" #output location $delimiter = "," #delimiter #Create a excel $xl=New-Object -ComObject Excel.Application $xl.Visible=$true #add a workbook $wb=$xl.WorkBooks.add(1) ForEach ($csv in $CSVfiles){ #name the worksheet $ws=$wb

Unable to get current CPU frequency in Powershell or Python

给你一囗甜甜゛ 提交于 2021-01-23 11:03:10
问题 I am trying to somehow programamtically log the CPU frequency of my windows 10 machine. However I apparently fail to get the current frequency as shown in the task manager. in Powershell, using get-wmiobject Win32_Processor -Property CurrentClockSpeed does only return a clock speed that is exactly the maximum one (even though i can see in task manager that it is not running that high) I even tried this solution: https://www.remkoweijnen.nl/blog/2014/07/18/get-actual-cpu-clock-speed-powershell

Unable to get current CPU frequency in Powershell or Python

Deadly 提交于 2021-01-23 11:01:07
问题 I am trying to somehow programamtically log the CPU frequency of my windows 10 machine. However I apparently fail to get the current frequency as shown in the task manager. in Powershell, using get-wmiobject Win32_Processor -Property CurrentClockSpeed does only return a clock speed that is exactly the maximum one (even though i can see in task manager that it is not running that high) I even tried this solution: https://www.remkoweijnen.nl/blog/2014/07/18/get-actual-cpu-clock-speed-powershell

PowerShell - User Must Change Password at Next Logon

烈酒焚心 提交于 2021-01-23 09:00:55
问题 Here is what I have, everything works great thus far except the part where I need the user to change their password on sign in Import-Csv C:\Users\user\Desktop\newuser.csv | New-ADUser -PassThru | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText '@To03PXaz4' -Force) -PassThru | Enable-ADAccount -PassThru | Set-Aduser -ChangePasswordAtNextLogon $true any guidance would be greatly appreciated 回答1: The syntax is -ChangePasswordAtLogon , not

PowerShell - User Must Change Password at Next Logon

心已入冬 提交于 2021-01-23 09:00:13
问题 Here is what I have, everything works great thus far except the part where I need the user to change their password on sign in Import-Csv C:\Users\user\Desktop\newuser.csv | New-ADUser -PassThru | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText '@To03PXaz4' -Force) -PassThru | Enable-ADAccount -PassThru | Set-Aduser -ChangePasswordAtNextLogon $true any guidance would be greatly appreciated 回答1: The syntax is -ChangePasswordAtLogon , not

How to get one row of info from .Csv file with Powershell?

对着背影说爱祢 提交于 2021-01-23 06:32:24
问题 The powershell script: $test = import-csv “C:\CSVFiles\test.csv” ForEach ($item in $test) { $Name = $item.(“Name”) $property = $item.("property") $location = $item.(“location”) Write-Output "$Name=$Name" Write-Output "Property=$property" Write-Output "Location=$location" } This script shows all the data for name,property and location for each row. I want the results to only show the data of one row;for example the row: n1;13;computer The Cvs file = Name;property;location n1;13;computer n2;65

Powershell - using wildcards to search for filename

瘦欲@ 提交于 2021-01-22 04:58:25
问题 I am trying to make a PowerShell script that will search a folder for a filename that contains a certain file-mask. All files in the folder will have format like *yyyyMd*.txt . I have made a script: [String]$date = $(get-date -format yyyyMd) $date1 = $date.ToString Get-ChildItem C:\Users\pelam\Desktop\DOM | Where-Object {$_.Name -like '*$date1*'} But this does not seem to work.. Can anyone help? It seems the problem is that the date variable is not correct because when I hard code something

远控免杀专题(11)-Avoidz免杀(VT免杀率23/71)

大憨熊 提交于 2021-01-21 23:59:32
声明:文中所涉及的技术、思路和工具仅供以安全为目的的学习交流使用,任何人不得将其用于非法用途以及盈利等目的,否则后果自行承担! 本专题文章导航 1、远控免杀专题(1)-基础篇: https://mp.weixin.qq.com/s/3LZ_cj2gDC1bQATxqBfweg 2、远控免杀专题(2)-msfvenom隐藏的参数: https://mp.weixin.qq.com/s/1r0iakLpnLrjCrOp2gT10w 3、远控免杀专题(3)-msf自带免杀(VT免杀率35/69): https://mp.weixin.qq.com/s/A0CZslLhCLOK_HgkHGcpEA 4、远控免杀专题(4)-Evasion模块(VT免杀率12/71): https://mp.weixin.qq.com/s/YnnCM7W20xScv52k_ubxYQ 5、远控免杀专题(5)-Veil免杀(VT免杀率23/71): https://mp.weixin.qq.com/s/-PHVIAQVyU8QIpHwcpN4yw 6、远控免杀专题(6)-Venom免杀(VT免杀率11/71): https://mp.weixin.qq.com/s/CbfxupSWEPB86tBZsmxNCQ 7、远控免杀专题(7)-Shellter免杀(VT免杀率7/69): https://mp

Kintex-7 FPGA SFP+光口的10G UDP网络通信开发案例|基于FPGA的光口通信开发案例

做~自己de王妃 提交于 2021-01-21 21:05:22
前言 自著名华人物理学家高锟先生提出“光传输理论”,实用化的光纤传输产品始于1976年,经历了PDH→SDH→DWDM→ASON→MSTP的发展历程。本世纪初期,ASON/OADM技术已在通信技术当中广泛应用,逐渐发展成为以骨干网络传输为介质的ROADM技术。 图1 光通信技术具有如下特点: (1) 信息容量大。 (2) 损耗低,可长距离传送。 (3) 抗电磁干扰能力强。 (4) 安全性能和保密性好。 (5) 重量轻,体积小,便于施工维护。 (6) 原材料来源丰富潜在价格低廉。 得益于以上特点,光通信在软件无线电、视频追踪、光电探测、定位导航、水下通信、电力设备等场合应用十分广泛。而10G光模块经历了从300Pin、XENPAK、X2、XFP的发展,最终实现了用和SFP一样的尺寸传输10G的信号,这就是SFP+。SFP凭借其小型化、低成本等优势满足了设备对光模块高密度的需求,从2002年标准推行到2010年,已经取代XFP成为10G市场主流。 创龙科技(Tronlong)的Kintex-7、Zynq-7045/7100等处理板卡已提供2/4通道SFP+光口,可实现UDP或Aurora 10G光口通信。本文将为您分享基于Kintex-7 FPGA SFP+光口的10G UDP网络通信开发案例。如需基于Kinte-7 FPGA或者ZYNQ的Aurora开发案例,欢迎与我们联系。 1