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…


Connect-ExchangeOnline: Write-ErrorMessage : Expired or Invalid pagination request. Default Expiry time is 00:30:00
I wrote a script a while back that gets the the UserPrincipalName, DisplayName, LastLogonTime, CreationTime, Inactive Days, MailboxType, AssignedLicenses, ItemCount, MB Size, and Roles from MSOnline and Exchange Online. It works fine on one server and my…
Install-ADServiceAccount fail with unspecified error creating gMSA
Hello, I tried the script inside how-to-prerequisites to create a gMSA to test Azure AD Connect cloud sync; the script is this: $Name = 'aadsyncgMSA' $Description = "Azure AD Cloud Sync service account for LAB-DC1 server" #$Server =…
How to determine/Identify which Users in my Domain environment is able to join Domain on work stations
Hi. My issue is we have only allow 1 users in my enviroment is able to join domain on workstations. but i randomly checked with some users accounts their accounts are also able to join domain to work stations. So how can i identify which users hve…
Pulling Total Physical Memory for Intune Enrolled Devices
I have been asked to determine how many of our current fleet of Intune enrolled Windows 10 devices have 4GB of physical memory. As far as I can tell the best way to get this information without going device by device in MEM is through Microsoft…
Need to remotely open Chrome Settings Help in foreground using powershell
I have a requirement to run a script everyday and automatically update "Chrome Browser" if a new version is released. I am using a powershell script that goes like this: Add-Type -Path "C:\seleniumdrivers\webdriver.dll"…
Convert Powershell to Exe
I am trying to convert a Ps script to an exe, does anyone know of a utility that can do this. The research I have done point to old scripts that are no longer available.
Calling PS scripts with PS remoting from ASP.NET Core 6 Web App issue
Hi, I am evaluating ASP.NET Core 6 Web App (front end for PowerShell scripts). When PS script does not contain Invoke-Command/New-PSSession, Web App does the job, but, with either Invoke-Command or New-PSSession inside PS script I always get very generic…
Set-LocalUser : An unspecified error occurred: status = 3221226252
I am trying to change user password based on below script but getting the error "Set-LocalUser : An unspecified error occurred: status = 3221226252". $pks=Get-Date foreach($pk in…
Download error - 0x80080005, can't update
updates 2024-04 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 11, version 22H2 for x64 (KB5036620) and Windows 11, version 23H2 don't download. I've tried many things, its been like this for months for the first update. The second one…
Script to stop a program that runs at startup after 5 mins
Hi. I have created a task in task scheduler to start my G.Skill RGB software at startup. I am now creating another task that I would like to close it after 5 mins of running. I have got as far as a second task set as at startup with a 5 minute delay and…

Set AD attribute msExchHideFromAddressLists to TRUE
Sorry for posting another question. I want to hide the mailbox for one specific user in the GAL. I know how to do this on the exchange server, but I noticed in AD there is an attribute msExchHideFromAddressLists that is set to TRUE when you hide…
"The SSL connection could not be established, see inner exception." Issue Installing Microsoft.Graph Module in PowerShell in PowerShell
Hi everyone, I'm experiencing an issue when trying to install the Microsoft.Graph module using PowerShell 7. When I run the following command: Install-Module Microsoft.Graph -Scope CurrentUser -Repository PSGallery -Force -verbose I receive the…
A positional parameter cannot be found that accepts argument
Hi All I used the following syntax to grant "TempPolicy1" globally. However, I am encountering an error while trying to remove this policy "TempPolicy1" globally Please guide me. Grant-CsApplicationAccessPolicy -PolicyName…
Issues with Web Front End app for background PS scripts with PS remoting inside
Hi, I have issues with Web Front End app (running on IIS) for background PS scripts with PS remoting inside: $session = New-PSSession -ComputerName dcName -ConfigurationName DomainAdmins Invoke-Command -Session $session -ScriptBlock {...} …
WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.
I can't seem to update modules. I do not know why I keep getting this error. WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications. I'm trying to update Exchange…

How to deploy printer in a GPO via powershell
I'd like to add printers into a GPO via powershell because eventually I need to add 50-100 printers. This is the process. Then, I need to add printers inside "Control Panel Settings" So, I created the first part of the…
Windows 2022 server requesting activation even though it is already activated
Windows 2022 server requesting activation even though it is already activated once i sign into the server the activation disappears for the users
Display SSL certificate expiration dates via PowerShell
Hello! I'm trying to figure out how to display when SSL certificates expire. Currently, I have the following code (which was provided to me by a colleague) and I want to know how to display the certificate's expiration date. If possible I would also like…
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