Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 2704

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and CIM enabling management of remote Linux systems and network devices.

0 votes
1 answer
42 views

Powershell script real-time monitoring via Windows Service

I'm using a script to monitor a file. When a pattern is detected, it will send an email to notify someone. I am creating a Windows Service via NSSM. My question is : How can I improve performance of m …
Cell-o's user avatar
  • 295
1 vote
1 answer
102 views

How to tune my powershell script for best practices?

I have written a script for CVE-2023-24932 like below. But I want to improve my script. I am open to new ideas. Here is my script: $DBXUpdateSuccess = Get-EventLog -LogName System -Source "Microsoft-W …
Cell-o's user avatar
  • 295
2 votes
1 answer
98 views

Removing contact from all mail groups

I want to remove the mail contact from all Groups in the "Member Of" tab. I am able to remove all MemberOf for mail contact. How can I improve the speed of the script? Get-MailContact <name> | ForEac …
Cell-o's user avatar
  • 295
3 votes
0 answers
112 views

Fetching certain eventIDs from servers on network.

The PowerShell script below queries the Security event log on one or more servers for events with id 4663. … When trying to retrieve all audit events for event id 4663 with the following code the computer throws the following exception: how can we to optimize this PowerShell? …
Cell-o's user avatar
  • 295
2 votes
1 answer
156 views

Powershell file parsing

I am using Powershell 7. We have the following PowerShell script that will parse some very large file. I no longer want to use 'Get-Content' as this is to slow. …
Cell-o's user avatar
  • 295
4 votes
1 answer
1k views

Automatically remove O365 license from AD user when using powershell

AsPlainText -Force $LiveCred = New-Object System.Management.Automation.PSCredential ("[email protected]", $password) New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell
Cell-o's user avatar
  • 295
2 votes
1 answer
108 views

Get all AD groups and Exchange features of users

We have about 15000 users and 1000 groups in AD. I have been getting of all AD groups of all AD users and their Exchange features via script like below. But now I have been waiting for more than 3 ho …
Cell-o's user avatar
  • 295
5 votes
2 answers
501 views

Getting NTFS permissions of all shared folders on the local machine

How can I improve the speed of the script? $Excel = New-Object -Com Excel.Application $Excel.visible = $True $Excel = $Excel.Workbooks.Add() $wSheet = $Excel.Worksheets.Item(1) $wSheet.Cells.item(1, …
Cell-o's user avatar
  • 295