WMI issues
The business where I work has several computers in our environment which have not getting cumulative updates in months and there are not items in the ccmcache folder. I wrote a very basic script to which checks if the WMI is "working" on a…
Run Schedule Task that Connects to Graph
I need to create a Scheduled Task that will run a Powershell script that connects to Graph. What is the best way to setup the task so the creds are passed and it can log into Graph unattended. I have read some have created an App for this in Entra but I…
Connect-PnPOnline: The sign-in name or password does not match one in the Microsoft account system.
Hello, I am trying to connect to SharePoint via Connect-PnPOnline. When I add my credentials for the SharePoint url in Windows Credential Manager and I type Connect-PnPOnline -Url https://<domain>.sharepoint.com everything works fine.…
Ms Graph - Disable User Account
Hi, I am writing a PowerShell script to disable Azure AD users that are not synced from on-premises. As part of the script I am running a foreach loop to disable the users with the following command: $params = @{ AccountEnabled = "false" …
PoweShell Script to open specific app in secondary monitor
can anyone tell me what is the powershell script to open specific app in secondary monitor
How to schedule on Azure to run a powershell script on different VMs in specific hours.
Hi. I need to run a PowerShell script in different servers and different hours for each VMs. For exemple, Server A must run at 3pm, Server B must run at 5pm and Server C must run at 11am. I can run the PowerShell script successfully on "Run…
Powershell command Connect-IscsiTarget give an error when using CHAP authentication
Hi, I have an iSCSI Target located on a NAS. The IQN is "iqn.2004-04.com.qnap:ts-869pro:iscsi.datastore15qnap.dd1020". CHAP Authentication is set up. On a Windows machine I am able to connect to the LUN with the iSCSI Initiator GUI. However,…
Check if users are in Entra ID Recycle Bin
Hi Folks! I have a script which I am using today to check to see what users are in the Entra ID Recycle Bin and those who are no longer in the Recycle Bin. The script uses the Get-MsolUser -ReturnDeletedUsers command (which is being discontinued). It…
[Active Directory] Export group members to CSV with their emails
Hello, I work in a larger globally managed company. I need to export a list of users from a particular group to a CSV file. I am using a simple command in PowerShell: "Get-AdGroupMember -identity "group-name" | select name |…
Get-MgUserCalendarView "The specified object was not found in the store"
I'm attempting to get info on some of our resource calendars. Since this doesn't function well within the EXO Powershell, I was pointed towards the MSGraph module. So I use these commands: $StartDate = "2024-01-01T19:00:00-08:00" >>…
The local farm is not accessible. cmdlets with featuredependencyid are not registered
Dears, Hope this mail finds you well. We are facing an issue with our SharePoint server while opening either the Windows PowerShell or SharePoint Management Shell, throwing an error as “The local farm is not accessible..”. I tried to run the Shell with…
inactive mailboxes
Hi All, I have a few inactive mailboxes under a retention policy in the Microsoft Purview Portal (Data Lifecycle Management → Retention policies → RP01). Let's say the policy is named RP01, and its GUID is u98k89mn-9876-ht68-mjki-kj78oophgy768. Exporting…
SharePoint Online: Find Duplicate Documents using PowerShell – File Hash Method 5000>
i am trying to get all duplicates files within 1 document library for lists larger than 5000 i am not able to merge the two scripts togther please refer to the script for getting items more than 5000…
Assistance Needed with OneDrive and Office 365 Activity PowerShell Scripts
Dear All, I am using the scripts below to retrieve OneDrive and Office 365 activity details for my tenant. However, in the "User Principal Name" field, I am getting an ID instead of the email address. This issue started recently prior to that,…
WinGet.exe upgrade --all -Exclude
How to exclude the list of apps [third-party application, MS applications, and MS KBnumbers] while running winget upgrade -all commands. Is there any parameter to exclude any application? It will be appriciated
Linux Distribution
Hi All, I want to install Ubuntu 22.04 LTS on Windows Server 2019. I am following the MS article linked below: https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions The article mentions performing the steps listed, but…
How do get this command to return the results I need
First and foremost I am not a programmer, so scripting is hard for me. I have been tasked with creating dynamic distribution lists, while there is a GUI option in AAD it is not allowing for the granularity that we are seeking. We need the list to not…
Printer Server Migration Remove Old Printer Mappings on Clients
I just finished migrating printers from an old windows server to a new 2022 server. The problem the environment is a mess and the printers were listed in Printer Server Manager as Deployed to both user and computers. Of course they were not deployed…
PowerShell File Watcher
Hello, I am looking for a solution how to, instead of waiting 15 seconds add code so my batch will run just after file is fully created (copied) - unlocked. Any help, please? SET FOLDER TO WATCH $watcher = New-Object…
Intune Custom Compliance Script issues
I am trying to setup a compliance policy to check that Crowdstrike is installed. I have tried running the script as the logged in user and not, etc.. same result. I know the script does not error out since I can run it on my workstation and it returns…