Categorie: Windows

Requirements Windows operating system Access to PowerShell Notepad (default Windows text editor) Step-by-Step Instructions Step 1: Open PowerShell Click on the Windows Start button, type PowerShell, and open the PowerShell application. Step 2: Enter the following command in PowerShell: notepad “$env:USERPROFILE\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt”   Step 3: Press Enter. This command opens the ConsoleHost_history.txt file in Notepad, which […]

Meer lezen

In the intricate world of IT and system administration, understanding the nuances of server management is crucial. One question that often arises is, “Who or what has initiated a server reboot or shutdown?” To demystify this, we turn to a powerful ally: PowerShell. PowerShell is not just a tool but a lifeline for administrators, offering […]

Meer lezen

The code in powershell:   Get-Content ‘gebruikers.txt’ | ForEach-Object { Add-ADGroupMember -Identity ‘G_Group_to_add_members’ -Members $_ }   This one-liner works as follows: Get-Content ‘gebruikers.txt’: This command reads the contents of the file ‘gebruikers.txt’. Each line in this file should ideally contain a username that you want to add to a specific group. Pipe (|): The […]

Meer lezen

This article applies to PRTG Network Monitor 16 or later Monitoring WMI Sensors Outside a Domain If the server on which PRTG is installed is part of a domain, whereas a few target machines are not, WMI monitoring often fails with the following error: Connection could not be established (80070005: Access Denied …) This article […]

Meer lezen

To start a PowerShell script in PowerShell from a shortcut, follow these steps: Create a new shortcut by right-clicking on the desktop and selecting “New” > “Shortcut.” In the “Create Shortcut” window, enter the following command in the “Type the location of the item” field:      powershell.exe -ExecutionPolicy Bypass -File “Path\to\Script.ps1” Make sure to […]

Meer lezen

Assuming that you have the ActiveDirectory module installed, you can use the following one-liner to get the group membership information for a specific user in Active Directory and filter the results based on a specific naming pattern:   Get-ADPrincipalGroupMembership -Identity ‘username’ | Where-Object { $_.Name -like “*pattern*” } | Select-Object Name   Replace username with […]

Meer lezen

To display the members of a group in Active Directory with their full name in a single line, you can use the following PowerShell command: Powershell Get-ADGroupMember “Group Name” | ForEach-Object {Get-ADUser $_.samaccountname -Properties DisplayName | Select-Object -ExpandProperty DisplayName} | Out-String -Width 4096 Replace “Group Name” with the name of the group you want to […]

Meer lezen

Open Windows Powershell. To do this, type Powershell in the Windows Start menu command box. Type Get-FileHash followed by a space. Drag the downloaded ZIP file onto the Windows Powershell window after the Get-FileHash command. This inserts the path after the command, to look similar to the following text:   PS C:\Users\UserName> Get-fileHash C:\Users\UserName\Downloads\cdq2019s14_Windows.zip 4. Press Enter. This results in output similar to the following: […]

Meer lezen

Auto-mapping doesn’t work as expected in an Office 365 hybrid environment Exchange Online Symptoms In Microsoft Office 365, mailboxes aren’t automatically mapped together with their Microsoft Outlook profile after a mailbox is moved to another forest in a hybrid deployment. Cause There may be several different causes: User is running an older version of Outlook. […]

Meer lezen

Restart multiple Windows services with PowerShell   Step 1 Create file serverlist.txt with input: server1 server2 server3 server4   Step 2 Open PowerShell at the locations where the serverlist.txt is created.   Start the command: Get-Service -ComputerName (Get-Content “serverlist.txt”) “CryptSvc” | Restart-Service For restarting the service: CryptSvc You can change the name of the servers, […]

Meer lezen

Gets the TLS cipher suites order for a server.   Get-TlsCipherSuite | Format-Table Name   PS C:\Users\Administrator> Get-TlsCipherSuite | Format-Table Name Name —- TLS_AES_256_GCM_SHA384 TLS_AES_128_GCM_SHA256 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

Meer lezen

Using the Windows Management Infrastructure, or WMI, Windows admins can create filters to apply GPOs more granular on specific versions of Windows Server. In this post I provide some basic examples. If you use PowerShell 5.1, you can verify WMI filters with Get-WmiObject in the Win32_OperatingSystem class: PS C:\> Get-WmiObject -Class Win32_OperatingSystem | Select Version, ProductType PS C:\> Get-WmiObject -Class […]

Meer lezen

In short – you do not need to edit any Windows user account privileges at all. Doing so only introduces risk. The process is entirely managed in IIS using inherited privileges. Applying Modify/Write Permissions to the Correct User Account Right-click the domain when it appears under the Sites list, and choose Edit Permissions Under the Security tab, you will see MACHINE_NAME\IIS_IUSRS is listed. […]

Meer lezen

How to enable Schannel Event logging on Windows Server to help troubleshoot TLS and SSL errors   Introduction When adding a Code Sample, please choose the ‘Normal (DIV)’ formatting, in order to avoid text glitch over the page borders Troubleshooting certificate and other errors that cause problems initiating TLS and SSL connections can be difficult […]

Meer lezen

Create a PowerShell script. start PowerShell ( as administrator ) create directory : mkdir “name of te new directoy” cd “name of te new directoy” new-item Get-ADGroupMember-script.ps1 notepad.exe  Get-ADGroupMember-script.ps1 copy and paste the text in to the file:   ################################################################# $name = Read-Host ‘Enter the group you want to view the members of’ Get-ADGroupMember -Identity […]

Meer lezen

If the memory is to be upgraded, then you have to find out whether the new memory is compatible. Therefore you have to find out the type of your currently installed memory. The device manager does not provide any information about this.   Get-WmiObject   Get-WmiObject win32_physicalmemory | Format-Table Manufacturer,Banklabel,Configuredclockspeed,Devicelocator,Capacity,Serialnumber -autosize Get-CimInstance You can also […]

Meer lezen

The latest version of Exchange Online Powershell Module, EXO V2, that we are going to use supports modern authentication and will work with MFA. So you don’t need to create an app password anymore. Requirements for EXO V2 The new Exchange Online PowerShell module only works on PowerShell 5.x and lower. It doesn’t work on Linux or […]

Meer lezen

If you’re currently seeing “This PC doesn’t currently meet Windows 11 system requirements” or “The processor isn’t currently supported for Windows 11,” there’s a Microsoft-approved registry hack that should instantly make it better. Change it to:  You can go from “doesn’t meet requirements” to “ready to install” in mere minutes. (We’ve tested this method working […]

Meer lezen

Search for regedit, and then press Enter. Open HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\​Explorer\Desktop\NameSpace Check if you have several folders under NameSpace. If there are several folders, highlight each folder, and then check the name of the Data on the right hand side. If you see multiple folders with OneDrive as the Data, right click on it, and then select Delete. Important: This section, method, or […]

Meer lezen