Remove-FileLabel cmdlet is getting stuck sometimes
Hi, I have been exploring the new Microsoft Purview Infromation Protection PowerShell Module. I have been testing Remove-FileLabel cmdlet. Remove-FileLabel -Path "C:\Users\user\Documents\sample" -JustificationMessage "Migration…
How to Delete Duplicate Documents / Files in sharepoint online?
There is too much duplicates files and documents in my company's sharepoint online. our company MS cloud space had reached its limit thus these duplicates files had to be delete to free up space. Thanks
How to add a Sql code to a powershell script
backup_report.txtI have the below sql script to check if any failover happened on the last 24 hrs and we want to use that in the existing powershell backup report script to check that condition before it reports, the below sql code only returns a…
Azure cli behind corporate proxy not working (SSL: WRONG_VERSION_NUMBER)
I have my C:\Users\xxxx\cacert-with-corp-proxy-cert.pem file updated with corporate ssl proxy certificate. To confirm that pem file updated properly and corporate proxy ssl certificates are valid I performed the check with python.exe (Microsoft…
Powershell - Cannot convert value to type "System.Int32"
Dear experts, I'm working on below script trying to replace the value of mailNickName with the prefix part of UPN value. It works great if we had EMPTY mailNickName field (where it showed <not set>). However, if there was value already existing in…
![](https://techprofile.blob.core.windows.net/images/72HU1RH-WEGeY0-fx2oe9g.png?8DBBA8)
Enable and Disable WinRM
Hi, For security reasons, our company wants to disable the WinRM service, but we don't know the impact of disabling it on the production platform. So we thought about the ability to disable the service and re-enable it automatically via GPO as needed…
![](https://techprofile.blob.core.windows.net/images/JkbK_jWKWU6ApeRyuK734A.png?8DA8FF)
Windows 2019 servers patch failed
windows 2019 servers getting security patch failed and when I tried manual then stuck on 80% then I tried to clear table but again stuck, what is solution and how to fix this issue. we have tried below steps DISM /Online /Cleanup-Image /RestoreHealth …
Windows Server DNS issue with Windows Client 10 Client machine
Hi, I have a issue with my Windows Client 10 machines (Notebooks). As you know Notebooks has as well LAN and as WLAN. If the user connected to the LAN, getting here a IP from for example 192.168.178.1 and the WLAN getting a different IP from DHCP for…
The cluster is connected to Azure Arc and I can see the cluster resources on azure arc. But when I perform any commands to the cluster from Cloudshell, it says cluster not found under the resource group.
This is the error I'm getting while accessing the cluster on Azure Arc. This is my cluster connected to AzureArc.
Adding multiple contact lists to a distribution list using PowerShell
I have created ten mail contacts for parents of Year 7 and I created a distribution list so the admin can send announcements to the DL. I need help adding these contact lists to the DL using PowerShell command.
How to add a SQL code to a existing PS script
I have the below sql script to check if any failover happened on the last 24 hrs and we want to use that in the existing powershell backup report script to check that condition before it reports, the below sql code only returns a timestamp ;WITH…
Powershell - DLP - Add Rules to the DLP Policy
Hi Im trying to making Add Rules to DLP Policy with PowerShell # Add Rules to the DLP Policy $RuleName = "DlpRule" $ContentContainsSensitiveInformation = @( New-DlpSensitiveInformationTypeRuleCondition ` -SensitiveInformationType…
![](https://techprofile.blob.core.windows.net/images/iR_yc8GIz0SciJoNPxWq-g.png?8DBA55)
![](https://techprofile.blob.core.windows.net/images/VfQFAmOikEWfBHko2XlWTA.png?8D7F33)
how to set proxy on invoke-webrequest
can someone help me with how I can pass proxy here in this script and if I am missing any syntax here? Full script in comment section! running into defender.ps1 is not recognized and a invalid err token error Invoke-WebRequest @parameters .\defender.ps1…
How can I combine 2 get-ADComputer queries in 1
Can someone please help me? I am trying to find computers that match this criteria (see from screenshot Screenshot 2024-06-26 085801.png) Right now I have 2 queries, Find all enabled computers : $allEnabledComputers=Get-ADComputer -Filter…
powershell script to disable and move computers to other ou
I want to disable a bunch of computers and move them to another OU in AD thru Powershell. Cannot get to work though, have tried several scripts but it does not work: cannot find object beneath dc=xxx,dc=xxx However when i do a move adcomputer in…
Listing file information filtered on values in a file
Hi, I would like to list sizes on all files in a directory, but the listed file names must match filenames picked up from a file. Basic information file size from this; Get-ChildItem -Path "\servername\DATA\files" -File | Select-Object…
Get-AdminPowerApp fails when authenticating using service principal
I registered an application and added it as a Service Principal according to this guide: https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal. I then logged in as this service principal. I am trying to get a list of…
Powershell to copy the folder and files
Dear All, Currently using the below script to copy the single file but I need to copy folder, subfolder and files also. Can you someone help me with this and I need to see the progress of the copy $sourceFiles = Read-Host "Enter The Restored…
![](https://techprofile.blob.core.windows.net/images/as_Tu4nfLUeUI0EOf39xtg.png?8D9529)
How to change SQL Server Failover Cluster IP addresses with PowerShell
Hello, I am trying to create a script that will change Windows Failover Cluster and SQL Server Cluster IP addresses. I can do this by using Failover Cluster Manager GUI, but I need to script it in PowerShell. I cannot find any information on how to…
Synchronization of disabled and enabled Onepremise Active Directory users with Microsoft entra
Hi, Currently when I deactivate a user in the Onpremise active directory it remains activated in Microsoft Entra. I want the user's status to be updated as soon as a change is made to the active directory. I looked at the Synchronization Rules Editor…