Skip to main content
1 vote
1 answer
46 views

I need to create a ZIP archive from a directory (data) with the following properties: A specific file (.foo) needs to be the first item in the archive, uncompressed The remaining files, if any, need ...
IInspectable's user avatar
0 votes
0 answers
23 views

Cannot Run Apache Airflow Unit Tests: sqlalchemy.exc.OperationalError: unable to open database file I am attempting to run a single unit test within the Apache Airflow repository (airflow-core/tests/...
Mohamed Hany's user avatar
1 vote
0 answers
36 views

I am using the desktop version of Google's new IDE (Antigravity) on Windows 11. When I try to forward a port 5173 to preview my web application, I get the following notification error: error It seems ...
Eliot's user avatar
  • 11
4 votes
2 answers
80 views

I am attempting to use a single element of an array, when creating a string message, but it is using both elements, concatenated by a space, whether I use $myArray[0] or $myArray[1]... # Multiple ...
Todd Powers's user avatar
2 votes
1 answer
99 views

I'm parsing a file using powershell 5.1 and I almost get my goal but I need help in this part. The input file is like this: CODE=MMH4 description=beg somedata - dduik CODE=PPH2 description=beg Area1 -...
Rasec Malkic's user avatar
-1 votes
0 answers
35 views

I have a file with some strings like below for which I want to replace the || with newline using powershell 5.1. This is || some test || string I've follow some advices in this thread and I'm trying ...
Rasec Malkic's user avatar
3 votes
2 answers
79 views

I faced a specific behavior while using verbose output in class. This works like a charm: # SomeModule.psm1 class SomeClass { SomeClass() { Write-Verbose "It works!" } } ...
Aleksej Egorov's user avatar
-1 votes
0 answers
61 views

I have a code which map users to group via a resource ad_group_membership from terraform provider hashicorp/ad locals { # --- Загружаем все YAML-файлы --- yaml_be = yamldecode(file(var....
Dmitry Zimin's user avatar
1 vote
1 answer
156 views

$qusertest = quser | Out-String if ([string]::IsNullOrEmpty($qusertest)){ Restart-Computer -Force } else { Write-Output $qusertest; exit 0 } I am testing out code to automatically reboot ...
FoxCode's user avatar
  • 35
1 vote
1 answer
94 views

I'm using a command similar to the one below to copy a file to a directory: copy-item 'C:\\some\\source\\directory\filename.txt' -Destination 'T:\some\destination\dir' C:\ is a local disk. T:\ is a ...
Michael Remijan's user avatar
2 votes
1 answer
114 views

I'm building an script in PowerShell that runs via an RMM tool, so it executes in the SYSTEM context. The goal is to automatically delete files from the Recycle Bin that are older than 30 days, for ...
smurfexe's user avatar
Advice
0 votes
5 replies
93 views

I'm currently writing a helper module and despite my efforts, some private variable have to be accessed read/write from outside the module. my first attempt was using Export-ModuleMember -Variable but ...
Peyre's user avatar
  • 635
4 votes
2 answers
173 views

Consider this example, a script named test.ps1 function MyTestFunction { [CmdletBinding()] param () try { [bool]$functionBool= $null } catch {throw $_} Get-...
Paul π's user avatar
  • 585
0 votes
1 answer
526 views

In my PowerShell scripts I'm using the ActiveDirectory module, which contains the various *-AD* cmdlets such as Get-ADUser. How can I automate (script) the installation of the PowerShell ...
mklement0's user avatar
  • 452k
0 votes
1 answer
58 views

I'm trying to add commands to a powershell script that finds a username and password test and replaces them with the user's name and password. The issue that I'm running into is with special ...
JoeTheSane's user avatar

15 30 50 per page
1
2 3 4 5
7951