powershell

Update the Azure Release Variable value in PowerShell

本小妞迷上赌 提交于 2020-12-15 03:30:40
问题 I have Release Variable $(ecomm) = Yes, in Azure Release Pipeline Through Powershell, i want to update the value of $(ecomm) = No Write-Host "Before update: "$(ecomm) Write-Host "##vso[task.setvariable variable=ecomm;]No" Write-Host "After update: "$(ecomm) But the value is not updating. Can you please help me on this. Thanks in advance. 回答1: Repcak is correct. When you use the logging command to set variables in Powershell, you can only change the value of the variable in Pipeline Run

Moving Same Name Folders into Another Folder

我是研究僧i 提交于 2020-12-15 00:52:44
问题 I have report folders that have unique parent folder names as such: C:\User\USER\Downloads\LTFT01\Report C:\User\USER\Downloads\LTFT02\Report I have made a script that changes the name of the 'Report' folder to include the name of its parent folder and move that folder elsewhere (e.g. Report -> LTFT01Report). However, now I'm running into an issue whereby once this is done once, the second report (made within the original folder) has the same name as the one I moved previously and refuses to

Moving Same Name Folders into Another Folder

回眸只為那壹抹淺笑 提交于 2020-12-15 00:44:30
问题 I have report folders that have unique parent folder names as such: C:\User\USER\Downloads\LTFT01\Report C:\User\USER\Downloads\LTFT02\Report I have made a script that changes the name of the 'Report' folder to include the name of its parent folder and move that folder elsewhere (e.g. Report -> LTFT01Report). However, now I'm running into an issue whereby once this is done once, the second report (made within the original folder) has the same name as the one I moved previously and refuses to

How to add same keys with different values to a hashtable in powershell?

淺唱寂寞╮ 提交于 2020-12-14 23:51:58
问题 Here is the code where i used array of hashtables $podnumbers = @(1,3,1) $podInfo = $null $buffer = 0 $podarray = foreach ($pd in $podnumbers) { $podinfo = @() for($i=0;$i -lt $pd;$i = $i+1) { $pod = Read-Host -Prompt "Assign the pod numbers for",$esxarray[$buffer] Write-Output `n } @{$pd = $pod} $buffer = $buffer + 1 } Inputs I gave for $pod is 1 = 1 ; 3 = 2,4,6 ; 1 = 3 I want my arrays of hashtable to be like below, Key : 1 Value : 1 Name : 1 Key : 3 Value : 2,4,6 Name : 3 Key : 1 Value : 3

How to add same keys with different values to a hashtable in powershell?

别来无恙 提交于 2020-12-14 23:45:28
问题 Here is the code where i used array of hashtables $podnumbers = @(1,3,1) $podInfo = $null $buffer = 0 $podarray = foreach ($pd in $podnumbers) { $podinfo = @() for($i=0;$i -lt $pd;$i = $i+1) { $pod = Read-Host -Prompt "Assign the pod numbers for",$esxarray[$buffer] Write-Output `n } @{$pd = $pod} $buffer = $buffer + 1 } Inputs I gave for $pod is 1 = 1 ; 3 = 2,4,6 ; 1 = 3 I want my arrays of hashtable to be like below, Key : 1 Value : 1 Name : 1 Key : 3 Value : 2,4,6 Name : 3 Key : 1 Value : 3

How to add same keys with different values to a hashtable in powershell?

白昼怎懂夜的黑 提交于 2020-12-14 23:43:34
问题 Here is the code where i used array of hashtables $podnumbers = @(1,3,1) $podInfo = $null $buffer = 0 $podarray = foreach ($pd in $podnumbers) { $podinfo = @() for($i=0;$i -lt $pd;$i = $i+1) { $pod = Read-Host -Prompt "Assign the pod numbers for",$esxarray[$buffer] Write-Output `n } @{$pd = $pod} $buffer = $buffer + 1 } Inputs I gave for $pod is 1 = 1 ; 3 = 2,4,6 ; 1 = 3 I want my arrays of hashtable to be like below, Key : 1 Value : 1 Name : 1 Key : 3 Value : 2,4,6 Name : 3 Key : 1 Value : 3

“看门狗”团伙远控木马投毒计,360安全大脑极速斩杀输出体系防御力

跟風遠走 提交于 2020-12-14 21:21:16
近日,360安全大脑独家捕获“看门狗”团伙最新动向,其正通过伪造某聊天软件官网以及钓鱼邮件等方式,对特定目标人群精准投毒祸乱网络。该组织命名来源于攻击样本包含的中文PDB路径,也有安全厂商称其为“金眼狗”组织。 360 安全大脑基于持续跟踪数据,并对攻击样本进行梳理分析后发现,“看门狗”团伙长期通过申请正规软件开发商签名,进而利用白加黑方式执行远控木马;钓鱼邮件定向投毒,并通过漏洞利用启动远控木马;伪装正规聊天工具捆绑远控模块等三大手段横行网络。 手段1:以假乱真,冒用签名投放远控木马 一直以来,冒用软件开发厂商签名都是“看门狗”团伙的惯用伎俩。从360安全大脑长期监测数据来看,9月下旬至今已追踪到该团伙冒用的十余个数字证书,具体如下: 与此同时,360安全大脑最新数据显示,“看门狗”团伙除申请了与原厂商相同的签名外,还申请了部分同名但大小写不同的高迷惑性签名,以便于测试安全软件反应,为冒用签名投放远控木马试水。 手段2:迷惑性诱饵,钓鱼邮件扩散远控木马 冒用签名之外,360安全大脑数据显示,钓鱼邮件是“看门狗”团伙的第二大惯用伎俩。从360安全大脑捕获的钓鱼邮件攻击样本来看,该团伙通过钓鱼邮件,将伪装成技术资料等文档的恶意程序,投递至目标用户邮箱,以诱骗点击下载。 一旦触发,恶意程序会利用muse音乐播放器栈溢出漏洞执行后续shellcode,并经过几轮内存加载后

Azure DevOps Rest Api to get all projects with continuation token

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-14 06:32:53
问题 I'm trying to get a list of all our projects in Azure DevOps with PowerShell using the Azure DevOps Rest Api. However, when I run the script it keeps returning 100 projects. When I add the continuation token it loops and returns the SAME 100 projects 4 times. So giving me in total 400 projects. We currently have 385 projects. $Org = "ORGNAME" $personalToken = "MYTOKEN" ################################################### Write-Host "Initialize authentication context" -ForegroundColor Yellow

Can I debug a dependent assembly from a powershell module

こ雲淡風輕ζ 提交于 2020-12-13 07:19:57
问题 I have a project it has two (or more) projects. For example: Shared.Standard Utility.PoSH The second is a PowerShell binary module that depends on the Shared.Standard class library/project/assembly. Can I debug the Shared.Standard library while I execute commands from the compiled module in a PowerShell session? I'm particularly curious about required config in vscode. 来源: https://stackoverflow.com/questions/59445038/can-i-debug-a-dependent-assembly-from-a-powershell-module

Can I debug a dependent assembly from a powershell module

倖福魔咒の 提交于 2020-12-13 07:19:47
问题 I have a project it has two (or more) projects. For example: Shared.Standard Utility.PoSH The second is a PowerShell binary module that depends on the Shared.Standard class library/project/assembly. Can I debug the Shared.Standard library while I execute commands from the compiled module in a PowerShell session? I'm particularly curious about required config in vscode. 来源: https://stackoverflow.com/questions/59445038/can-i-debug-a-dependent-assembly-from-a-powershell-module