PowerShell Schedule Task
Hello, I have powershell script to insert some data into SQL server, when i double click on the .ps1 file i can see the data in SQL server. Then i want to make this script running every hours and i schedule this using windows task scheduler. But…
Exporting a list of users with no profile picture in a specific OU via Azure AD Powershell
So I haven't used PowerShell in a while wondering the best way to Export specific OU's users that do not have profile pictures tied to their account via Powershell. …
unable to connect Azure
Hi All I use the below syntax to connect to Azure Powershell, but today i am unable to connect to azure powershell. it prompts me to enter tenant and subscription number. I have 1500 subscriptions, how can i know the subscription number for my…
Windows powershell
I want to install wsl, I triend from powershell just by entering this command(wsl--install) but It appears that It does not recognize It and I restarted mu PC to validate a problem but It does not provide a Solution, what can I do in this Situation? How…
Query a Specific service Value through Powershell
I Need help with the below PowerShell command to query the value of Windows Update "IsDefaultAUService" PS C:\Users\Administrator> $(New-Object -ComObject "Microsoft.Update.ServiceManager").Services Output of this command …
After renaming a SharePoint Online document library folder, from /OldName to /NewName, how to redirect URLs for everything inside the folder, so older URLs forward to new URLs?
Hi there After renaming a SharePoint Online document library folder, from /OldName to /NewName, how to redirect URLs for everything inside the folder, so older URLs forward to new URLs? Happy to use PowerShell or any other way. E.g. …
query on powershell script
Hi All I am trying to use the following lines in a PowerShell script. Lets say extensionAttribute1 represents the job ID of users. When I use the query below, I am getting users with different job IDs as well. What I need is to pull users with job ID 123…
Powershell - making folder using $env:username
Hello, I´m new with Powershell and I have script, where I need to make folder using $env:username plus something else - for ex. username is David_N and I need to have folder David_N_Files I can only make folder called $env:username Is it possible…
Warning PowerShell ID 300
Hi, More than a year after reporting the problem, I continue to receive the same PowerShell warning despite everything working normally and all versions being up to date. Maybe with this new information we can better understand the problem. I know it…
how to get rid of the response from Exchange when password is invalid and catch error message instead?
I have the following command: $null = Connect-ExchangeOnline -Credential $cred -PSSessionOption $proxyOptions -ShowBanner:$false -ErrorAction Stop SilentlyContinue -WarningAction SilentlyContinue -InformationAction SilentlyContinue -ErrorVariable…
Powershell script to enable Microsoft.SQL service endpoint and add to Azure SQL
We have certain VM's that need to be able to access Azure SQL. Since allow public access is turned off, I need to add the Virtual Network/Subnet to SQL Instance. Then also, I need to enable Microsoft.SQL for the service endpoint on any of the subnets…
How to update Scheduled tasks (CimInstanceProperties)?
Hi, I have several servers/workstation collecting user defined Data Collector sets. But unfortunately Microsoft has carried a bug with multiple windows versions, as they state on here: User Defined DCS Doesnt Run As Scheduled The workaround is to…
Prebuilt PowerShell scripts
Hello Please i need your help on this issue. Please do we have any prebuilt PowerShell scripts from Microsoft that can identify teams groups that contain files? Here’s the one we had tried that isn’t working: # Connect to Microsoft…
Update Micorosoft Store and Store Apps with command line?
Hi To update Microsoft Store and Store Apps, I navigate to the Store and select "Get Updates", like above screenshot. Question: Is there any possibility to achieve the same with Command Line /Power Shell or DISM?
How to find and remove security group from local admin group with Powershell
How would I write this in PS where I'm looking for or checking for "Company\Domain Admins" security group from local Administrators group? Get-LocalGroupMember -Group "Administrators" (Gives me a list of groups that are in the Local…
How to capture Error like Get-AzRoleAssignment : Operation returned an invalid status code 'NotFound' and do some activity in if-else block based on this error
How to capture Error like Get-AzRoleAssignment : Operation returned an invalid status code 'NotFound' and do some activity in if-else block based on this error
How to use splatting
I am looking for some help with splatting , I have the below lines to grab a registry key and want it to be passed into a hash table to make it more simpler to view to reduce the length if ($Version -ge 16) { # Grab the value of SAID…
Identification of Process for termination
When I am opening a Power BI file, sometimes the below window pops up : How can I identify this process and terminate it in an automated way? Note : I tried to get distinct process name prior to opening this file and post that and there were several…
Exporting Power Platform environment as CSV or Spreadsheet file?
How can I export the list of Power Platform environments shown in this page: https://admin.powerplatform.microsoft.com/environments as .CSV file ? I need to perform an audit of thousands of unused environments in my tenant.
Access Blob storage using SAS Key via PowerShell
Hi I want to be able to access Blob storage using a SAS key in PowerShell. I have the SAS key set up on the storage account, limited to the IP of the server I'm running the PowerShell from. I want to be able to use the key without signing into Azure or…