powershell

Download audit logs in csv from azure DevOps UI using powershell

南笙酒味 提交于 2021-01-02 04:00:01
问题 Hi I am looking for a script which can download export logs in csv from azure DevOps using powershell for given time frame. like I can enter time frame and then script will download and return csv file from azure DevOps ui - I found this script here https://developercommunity.visualstudio.com/content/problem/615053/question-we-want-to-get-the-export-audit-log-using.html I am not sure what username , password and url to use here $Username = 'domain\user' $Password = 'password' $Url = "https:/

Extracting the key-value pair in loop from text file using Powershell Script

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-01 09:13:32
问题 I am trying to capture the specific key value pairs from a text file having other data as well than key:value pattern using powershell. Can anyone help me out? I have tried the code so far with the help of internet as I am newbie to Powershell. Any help will be appreciated. Source Text sample: ResourceGroupName : DataLake-Gen2 DataFactoryName : dna-production-gen2 TriggerName : TRG_RP_Optimizely_Import TriggerRunId : 08586050680855766354964895535CU57 TriggerType : ScheduleTrigger

Extracting the key-value pair in loop from text file using Powershell Script

梦想的初衷 提交于 2021-01-01 09:12:51
问题 I am trying to capture the specific key value pairs from a text file having other data as well than key:value pattern using powershell. Can anyone help me out? I have tried the code so far with the help of internet as I am newbie to Powershell. Any help will be appreciated. Source Text sample: ResourceGroupName : DataLake-Gen2 DataFactoryName : dna-production-gen2 TriggerName : TRG_RP_Optimizely_Import TriggerRunId : 08586050680855766354964895535CU57 TriggerType : ScheduleTrigger

Extracting the key-value pair in loop from text file using Powershell Script

↘锁芯ラ 提交于 2021-01-01 09:08:39
问题 I am trying to capture the specific key value pairs from a text file having other data as well than key:value pattern using powershell. Can anyone help me out? I have tried the code so far with the help of internet as I am newbie to Powershell. Any help will be appreciated. Source Text sample: ResourceGroupName : DataLake-Gen2 DataFactoryName : dna-production-gen2 TriggerName : TRG_RP_Optimizely_Import TriggerRunId : 08586050680855766354964895535CU57 TriggerType : ScheduleTrigger

Extracting the key-value pair in loop from text file using Powershell Script

烈酒焚心 提交于 2021-01-01 09:07:40
问题 I am trying to capture the specific key value pairs from a text file having other data as well than key:value pattern using powershell. Can anyone help me out? I have tried the code so far with the help of internet as I am newbie to Powershell. Any help will be appreciated. Source Text sample: ResourceGroupName : DataLake-Gen2 DataFactoryName : dna-production-gen2 TriggerName : TRG_RP_Optimizely_Import TriggerRunId : 08586050680855766354964895535CU57 TriggerType : ScheduleTrigger

how to construct authorization header for Azure File share with shared key using powershell

落花浮王杯 提交于 2021-01-01 08:13:34
问题 I am trying to get share stats from Azure File share rest api with shared key as authentication but cant seems to be figure out authorization header $storageAccount = 'XXXX' $key = 'XXXXXXXX' $resource = 'FileShare' $sharedKey = [System.Convert]::FromBase64String($Key) $date = [System.DateTime]::UtcNow.ToString("R") $stringToSign = "GET`n`n`n`n`n`n`n`n`n`n`n`nx-ms-date:$date`nx-ms-type:file`nx-ms-version:2017-04-17`n/$storageAccount/$resource`nrestype:share" $hasher = New-Object System

how to construct authorization header for Azure File share with shared key using powershell

假装没事ソ 提交于 2021-01-01 08:12:04
问题 I am trying to get share stats from Azure File share rest api with shared key as authentication but cant seems to be figure out authorization header $storageAccount = 'XXXX' $key = 'XXXXXXXX' $resource = 'FileShare' $sharedKey = [System.Convert]::FromBase64String($Key) $date = [System.DateTime]::UtcNow.ToString("R") $stringToSign = "GET`n`n`n`n`n`n`n`n`n`n`n`nx-ms-date:$date`nx-ms-type:file`nx-ms-version:2017-04-17`n/$storageAccount/$resource`nrestype:share" $hasher = New-Object System

Data Rows to String to Array issue

本小妞迷上赌 提交于 2021-01-01 08:04:11
问题 I have a very weird problem happening. I have an object populated with a bunch of rows. I can access them all well, but I need to append a "." (dot) to every value inside it, so I end up converting each record to a string using a for each loop and adding a "." after trimming the values. The issue now however, is that I would like to assign each of these rows (And the rows have only one column/Item) to another array/object, so I can access them later. The issue is that even when I declare an

Powershell string variable with UTF-8 encoding

我是研究僧i 提交于 2021-01-01 07:11:37
问题 I checked many related questions about this, but I couldn't find something that solves my problem. Basically, I want to store a UTF-8 encoded string in a variable and then use that string as a file name. For example, I'm trying to download a YouTube video. If we print the video title, the non-English characters show up ( ytd here is youtube-dl): ./ytd https://www.youtube.com/watch?v=GWYndKw_zbw -e Output: [LEEPLAY] 시티팝 입문 City Pop MIX (Playlist) But if I store this in a variable and print it,

How to move Azure blob from one Storage container to another using Java/ REST?

橙三吉。 提交于 2021-01-01 06:53:04
问题 Can someone help with this please? I am following the Java JDK samples, there are lots of examples on how to manage containers and blobs, however, nothing saying how to move from one storage container onto another. Eg I have a blob on StorageOne/ContainerOne/BlobName need to be moved to Storage2/ContainerTwo/BlobName I am looking at this site https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/storage/azure-storage-blob/README.md hoever no luck. Also I have managed to connect via