118,710 questions
-1
votes
0
answers
10
views
Inconsistency In Microsoft Recommendations Regarding Powershell $Profile
Microsoft's left hand apparently does not know what it's right is doing, so I am writing a script that automates the correct setup of Powershell $profiles on a clean Windows install.
Currently, my ...
1
vote
1
answer
19
views
Issues with winget on Azure VMs
I have several VMs in Azure where I want to update all applications using winget upgrade. The VMs are running Windows Server 2016/2022, and I have manually installed winget on them. When I log into ...
0
votes
1
answer
44
views
Generating SAS account token in powershell
"I generated a token using Azure and it’s working, but I need to create a correct script in PowerShell using the key. The stringToSign I generated is different from the one provided by Azure, and ...
1
vote
0
answers
20
views
PowerShell "Assembly with same name is already loaded" on different Module Versions [duplicate]
I have a script that requires using two versions of the same module with conflicting assemblies:
#Requires -PSEdition Core
# main logic
Install-Module -Name MyModule -RequiredVersion 2 -Scope ...
0
votes
0
answers
26
views
Set-AzureADMSTrustFrameworkPolicy powershell cmdlet works on laptop but not in github actions. No changes done
I have created a service principle in Azure AD B2C and want to upload TrustFrameworkExtensions.xml file to it using Set-AzureADMSTrustFrameworkPolicy powershell cmdlet in GHA. Everything in this works ...
0
votes
0
answers
33
views
When does "Date modified" change for files in Windows Explorer as I want to use it in Powershell? [duplicate]
I'd like to understand the behaviour of the "Date modified" in Windows Explorer. There is a process which syncs folders with csv files beetween a data provider and a network share. I'm ...
0
votes
0
answers
33
views
How concatenate a powershell command with an string variable? [duplicate]
I'm not a PowerShell expert. I wrote a short script to obtain from AD all the computers that contain in their name a substring that is entered by the user. I have not been able to concatenate the ...
0
votes
1
answer
46
views
Powershell invoke-command: why isn't this engaging the foreach loop? [duplicate]
OK, I'm piggybacking off my previous question Powershell script to get IIS app pool recycling time from servers and wondering what I'm doing wrong
I have a list of IIS app pools (apppools.txt) and a ...
0
votes
0
answers
17
views
Remove All Databases From Azure Analysis Server With PowerShell
Ok I have this script, it should be straightforward:
# Load the Microsoft.AnalysisServices assembly from the NuGet package
$amoPath = (Join-Path (Join-Path $env:USERPROFILE ".nuget\packages\...
0
votes
1
answer
17
views
How can I update certificates on winrm when there are two HTTPS listeners?
I have two HTTPS listeners (One Compatibility) on winrm as follows:
Listener
Address = *
Transport = HTTPS
Port = 5986
Hostname = <hostname here>
Enabled = true
URLPrefix ...
0
votes
0
answers
21
views
Alternative PowerShell Solution To Running MDX on a Power Bi Semantic Model Hosted In A Fabric Workspace
So we want to do this, but it's not supported. So we must pursue a alternative solution. Optimally this would something that could be run from SQL Server directly with minimal external code possible.
...
0
votes
0
answers
16
views
PowerShell write progress to log for non-interactive session
Most questions I see are trying to suppress progress in non-interactive mode, but I'd like to be able to output just the message to the console in GitHub Actions, cause now it's hard to see what's ...
1
vote
0
answers
11
views
GPG Encrypting Via CLI output as .pgp rather than .gpg
Got a command that encrypts all files in a folder with our public key.
However, it saves the files as .gpg and the requirement is to output as .pgp.
Using the GUI you just append the name from .gpg to ...
0
votes
0
answers
34
views
Azure DevOps pipeline PowerShell task
I am using Azure DevOps pipeline and task 'AzurePowershell@5'. With that task I trigger script, which is on the repo- let's call it script X. Script X contains commands like 'Import-...
0
votes
1
answer
26
views
Powershell script to get IIS app pool recycling time from servers
I got the cmd below from the following post
Get Specific Recycling Time For IIS With PowerShell
Get-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.schedule.collection
...