Error running Set-AIPFileLabel from Azure PowerShell function - Engine is not initialized, bootstrap might have failed
Trying to remove AIP sensitivity labels from PDF documents using PowerShell Azure Function (triggered by power automate flow passing the file content from SharePoint). Based on this documentation:…
extract .zip files from multilple locations with Batch or Script file
I have a bunch of folders that contain .zip files. is it possible to run a batch that will search for zip files in multiple folders and automatically unzip them in the parent folder?
Get list of installed features and roles on all domain servers - Powershell
Get list of installed features and roles on all domain servers - Powershell Get-ADComputer -Filter 'operatingsystem -like "server" -and enabled -eq "true"' ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address | …
how to list the custom attribute in AD
Hello, we migrated from old to new AD environment ,need to check all the custom attribute list including any extension custom attribute so that same can be created in new environment. I couldn't find any script that work well ,I tried below commands but…
Error while executing CLI script on windows VM for a storage account.
Encountered an error shared at the link below while running a script on the Windows CLI to list data from a storage account. https://github.com/Azure/azure-cli/issues/28534
Powershell script for reading Excel Table and send e-mails
Hello community, Basically I would like to have a powershell code that reads a Table inside an Excel WorkBook and send e-mails to some recipients based on a specific column. That table contains some user's information and the e-mail must be sent to the…
AD Bulk change of EmployeeID with Email form CSV Import
Hi There, I want to be able to Add/update employeeID attribute in AD from a CSV import, the CSV will have two columns: Email address and EmployeeID, so I want the script to be able to search for the user using email address and then add the…
Connect-MgGraph with pre-selected account
Is it possible for microsoft graph powershell to support login with pre-selected account as parameter? ie. Something like this: Connect-MgGraph -AccountId xxx@xxx.xxx.xx Because I see teams powershell can already login to a specified account id,…
Format output from powershell
Good Morning, I'm trying to format the output from the below PowerShell script into a table so it can be imported into an excel spreadsheet. Get-ADGroupMember -Identity "GroupA" | ForEach-Object { Get-ADUser -Identity…
Running Azure Powershell script on Azure portal
Hi Team, On Azure portal, i need to run below Azure Powershell script, could you please mention how could I run it - $FunctionApps = Get-AzFunctionApp $AppInfo = @{} foreach ($App in $FunctionApps) { if ($App.Runtime -eq 'dotnet') { …
Need to create Powershell report for SQL Always on secondary serves.
Hello All, A strange request. We are running multiple always on servers. Backups takes place on secondary replica of always on server. I need to create a report in powershell or t-sql that would identify secondary replica and verify backup…
Windows powershell - missing argument parameter
net user Game Account /time:M-F,6am-8am;M-F,3pm-5pm;M-F,8pm-10pm error: At line:1 char:44 net user Game Account /time:M-F,6am-8am;M-F,3pm-5pm;M-F,8pm-10pm ~ Missing argument in parameter list. At line:1 char:56 net user Game Account…
.Net runtime version for function app
Hi Team, I have a requirement where I need to find the .net runtime version used in my function apps. Below are imp points - Target framework in csproj file of function app is net6.0. On Azure portal,. under app settings of function app, value of…
An empty pipe element is not allowed
Hi All, can anyone help me correct the syntax. i am unable to export the output to a text file [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) { …
powercfg /Qh return wrong result
powercfg /Qh return wrong result After set lid close action "do thing" then query again window return wrong result. powercfg /setdcvalueindex scheme_current sub_buttons lidaction 0 powercfg /setacvalueindex scheme_current sub_buttons…
work account locked
Error Code: 50057 Request Id: f11c05e3-8f37-4a28-b43e-380209fc7e00 Correlation Id: ce7d1ed3-e750-4ae5-9006-7738bcb6dd0f Timestamp: 2024-03-23T18:57:35.243Z
Using SecretManagement and SecretStore PS modules with gMSA scheduled task is running under
Hi, I'd like to securely store Entra ID App secret using SecretManagement and SecretStore PS modules and then use that secret to connect to MS Graph inside PS script (executed periodically as scheduled task running under gMSA). Is that technically…
gMSA Error with DNShostname in Powershell
Hey all, I'm trying to create a new gMSA account and I was following some youtube vids and I'm coming across an error. I first started by using command "add-kdsrootkey" then I waited the 10 hours and basically continued the commands the…
Sending an email notification using PowerShell
Hello. I am running Windows Server 2019, and I am running the PowerShell script shown later in this posting. The particulars for Powershell are the following: Major Minor Build Revision 5 1 17763 4974 The script that I am running is…
Mangement Tools connection
Hi Team, I allow port 80 to the server so that PS can work. But security team concern in why we are not using default port By default PowerShell will use the following ports for communication (They are the same ports as WinRM) TCP/5985 = HTTP …