Create a table-like custom object from a variable with CSV content
Hi, I have contents in a variable called $file echo $file gives this Timestamp,Category,OperationName 2022-10-26 19:21:23.5114273,Warning,Insert 2022-10-26 19:21:23.5114273,Warning,Update As you see, the variable is really a CSV. I want to create a…
Error to publish module to private repository
I’m trying to publish a module, which I wrote, to a local repository. The repository is correctly created, if I type get-psrepository I see it. When I launch the command Publish-Module -Path C:\Modules\mymodule -Repository MyRepository the error…
interacting with an API using powershell using an API-KEY
I am wanting to retrive data from an API using powershell Ideally it would work the same way this curl command works , any suggestions? [root@svd-nmrobm01 ~]# curl -d '{"sam_account_name":"smithm"}' -H "Content-Type:…
Your domain controller performance is very critical for that you need to write, test and schedule a PowerShell script called “PerfMonitor.ps1” that runs daily at 10:00 AM and repeats every one hour to chck if there is any process that taking more than
Your domain controller performance is very critical for that you need to write, test and schedule a PowerShell script called “PerfMonitor.ps1” that runs daily at 10:00 AM and repeats every one hour to chck if there is any process that taking more than…
Unable to find custom list template and differentiate custom template list and normal list?
Hi, I have created a list custom template from PowerShell utility (Used script from here [https://learn.microsoft.com/en-us/sharepoint/lists-custom-template). Now I am able to see new custom template in 'From your organization' during list creation…
![](https://techprofile.blob.core.windows.net/images/Smr5LKeSzEqH_RvxS0_fKA.png?8D9E7A)
How to pin/un-pin programs in start menu and starkbar windows 11
Im automating some stuff and would like some help, can anyone help me create or show a working powershell script example that can add or remove pinned programs in the task bar and start menu in windows 11? Im not really versed with powershell, i cant…
Invoke-WsusServerCleanup not finishing
We ran into an issue where our update server would not successfully run cleanup for the "Unused updates and update revisions" and "Unneeded update files" options when running the WSUS Server Cleanup Wizard. It kept giving the…
Invoke ADF pipeline using powershell script
i have run the below code but it does not seems to be. i'm geting below rerror Invoke-AzDataFactoryV2Pipeline : The term 'Invoke-AzDataFactoryV2Pipeline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the…
![](https://techprofile.blob.core.windows.net/images/VfQFAmOikEWfBHko2XlWTA.png?8D7F33)
Facing: New-ServicePrincipal : The term 'New-ServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program.
Im trying to setup xoauth2 for our helpdesk aplication. Im following below commands to configure exchange. Install-Module -Name ExchangeOnlineManagement Install-Module Microsoft.Graph Install-Module -Name AzureAD import-module AzureAD Import-module…
Powershell backup-sqldatabase -ExpirationDate
Greetings! I'm just having a bad time trying to set the expiration date to a SQL Server backup through powershell SQLSever Module. My need is that the next backup overwrites the current file in the directory. I've Tried to achieve that with: $Expira =…
Microsoft.Data.SqlClient PowerShell
I would like to use the Microsoft.Data.SqlClient namespace/ objects in a PowerShell script. Two (click1, click2) GitHub posts provide a way to load the dll's, but does Microsoft provide any (official) PS module which could be imported? I don't want the…
Find all users assigned to external access policy for teams
Is there a command in powershell to list out all users assigned to a certain CsExternalAccessPolicy?
Using ForEach with If to Check Computer Accounts for Group Memberships
I'm working on a script that checks the members of an OU to see if they are members of a corresponding group. The script currently just adds devices from the OU to the related group. What I want is for the script to check each device in the OU to see if…
Powershell check user in group and then add if not a member
Hi, The script below keeps dropping into the 'Automation has failed...' else statement once a user has been added into a security group. I can see that the user has been added but need the additional check to write the output as these outputs are being…
Checking resource limits, quotas, and constraints using PowerShell
I am seeking a solution to check for resource limit quotas that have been reached in multiple subscriptions using Lighthouse. Has anyone found a way to accomplish this using PowerShell, Graph, or other methods? Essentially, I am looking for a way to loop…
Powershell how to get Properties values when exporting CSV file
Hello. Need some help, I'm trying to get a report with specific details from the Get-AzRecoveryServicesBackupJobDetail command. So I'm saving the result in an array to later export to a CSV like this: $JobCompletedDetails =…
Get-MgUserAuthenticationMethod fails when AuthenticationMethodId is provided
Get-MgUserAuthenticationMethod fails when parameter AuthenticationMethodId is included. Works fine if only UserId is used: Get-MgUserAuthenticationMethod -AuthenticationMethodId ******** -UserId ********* Get-MgUserAuthenticationMethod :…
![](https://techprofile.blob.core.windows.net/images/tOVHmsOjs0O4eXYCLB7Etg.png?8DACE0)
![](https://techprofile.blob.core.windows.net/images/a1395d6d60e64acc8c1bfc104037f1aa.png)
How to configure MAC filtering using only first MAC digits
Dear Microsoft Community, I am a newbie when it comes to DHCP MAC filtering and I am wondering if there is an option ( either trough Powershell or by using a 3rd party option ) to filter MAC addreses using only the first digits of the mac. The idea is…
Export all users to a CSV file with all OnPremisesExtensionAttributes
Hey Guys I am trying to set up a small script that exports all my AzureAD Users with all their ExtensionAttributes into a CSV-File. Best would be to have a Line for each User with all their Properties. Here is what I have so far: Get-MgUser |…
Read the Data inside a single Sheet inside .xlsx file using Power shell
I have an .xlsx which have the following:- Stored locally inside C drvie contains 5 sheets One sheet named as "Info", contain rows and columns without tables. first row represents the headers with filters, and the final row contain totals …