Skip to main content
1 vote
2 answers
715 views

Whenever I set a delay in powershell using Start-Sleep, e.g: Start-Sleep 10 then it does not ignore CTRLC. I mean when I hit that key stroke the delay quits. How can I ignore it in delays?
avarice's user avatar
  • 15.6k
1 vote
1 answer
510 views

I have a script that uses Get-Service to see if a particular service exists and is running on a group of computers. Get-Service -Name "ServiceName" -Computername "PCName" In Powershell V6.0 the Get-...
Jonah Barrett's user avatar
0 votes
2 answers
2k views

How to check registry key value on computer which is not in domain?? I think that I must use local admin credential for this but I dont know how I tried this: $user = "admin" $password = &...
Alen's user avatar
  • 21
3 votes
2 answers
3k views

I have a PowerShell script that reads a register.psd1 file with contents as below. @{ # Building Zig compiler zig = @{ name = "zig" path = ./python/buildzig.py ...
Amani's user avatar
  • 18.6k
0 votes
2 answers
246 views

If I have some JSON like this: $inputJson = @" { "attachments" : [ { "name": "attachment.eml", "attachment_url": "https://www.attachment1.com"...
user avatar
0 votes
1 answer
436 views

I want to import a CSV file with my working hours. Format is as follows: Description;Start Time;End Time;Duration;Day When I import the CSV, each object gets imported as string. I try to convert the ...
d2minik's user avatar
0 votes
1 answer
1k views

I have a bunch of XLS files. On opening the file I got the prompt: format and extension don't match Later, I found out that this is an old XML based XLS file. For that reason I couldn't directly ...
jw0ng's user avatar
  • 91
0 votes
2 answers
1k views

Edited: Originally, my question was why the first piece of code wont work. the unzip action was working if I run it on it own on on single file outside the loop. but once I wrapped it round with loop,...
jw0ng's user avatar
  • 91
0 votes
1 answer
1k views

I was running Get-CimInstance -Namespace root/CIMV2 -ClassName CIM_Component | Out-File -Encoding utf8 .\CIM_Component.txt and received Get-CimInstance : Call cancelled At line:1 char:2 + (Get-...
Whitequill Riclo's user avatar
7 votes
5 answers
16k views

I have recently installed PowerShell 6.2. If I start a PowerShell 6 (x64) command prompt and run $PSVersionTable.PSVersion this is the result Major Minor Patch PreReleaseLabel BuildLabel ----- --...
Douglas Reid's user avatar
  • 3,898
2 votes
1 answer
4k views

So I am at a big roadblock right now. I was working in PowerShell 5.1 and had the Get-WmiObject with the Win32_Service Class working perfectly fine to remotely stop/start/restart services remotely. ...
Ryan Wakefield's user avatar
5 votes
1 answer
3k views

On Windows, not counting ISE or x86, there are four (4) profile scripts. AllUsersAllHosts @ C:\Program Files\PowerShell\6\profile.ps1 AllUsersCurrentHost @ C:\Program Files\PowerShell\6\Microsoft....
lit's user avatar
  • 16.5k
0 votes
0 answers
232 views

I registered a native application on Azure Active Directory via powershell 6 (module AzureAD.Standard.Preview) and I need to grant the permissions with powershell 6 code (Settings > Required ...
C. Fabiani's user avatar
1 vote
1 answer
186 views

In Powershell v6, the split-path has the -Extension parameter to access the extension of a file name, for example: $pathToResume = "R:\Work\cover.letter_resume_base.odt" $extension = Split-Path -...
user avatar
1 vote
3 answers
160 views

I'm porting lesspass password manager to powershell, but I'm having trouble when implementing the _consume_entropy() method, especially the Python divmod. Reproduce PS> [bigint]$EntropyAsInt = ...
Édouard Lopez's user avatar

15 30 50 per page