If you are annoyed by the Notification Manager for Adobe Creative Cloud and/or are using VDI and want to get rid of it, use this PS one-liner:
Get-AppxPackage -AllUsers *AdobeNotificationClient* | Remove-AppxPackage -AllUsers
With PowerCLI it is very easy to get a list of provisioned storage for a list of VMs:
Get-VM | Select-Object Name,@{n="ProvisionedGB"; e={(Get-HardDisk -VM $_ | Measure-Object -Sum CapacityGB).Sum}}
You can combine this with other cmdlets to limit the search to a specific folder, datastore, etc...
To get a complete sum of all the VMs, add | Measure-Object -Sum ProvisionedGB at the end.
When configuring a provisioning link (e.g. for 3CX) in DHCP server on a Draytek firewall, and are using certain phones (particular Snom), you may run into the issue where the firewall is complaining about illegal characters when attempting to add the link through the web interface.
The solution is to configure the option through the CLI. Log in using either telnet or SSH (whichever is enabled), and type:
srv dhcp option -e 1 -i 1 -c 66 -v http://192.168.1.10:5000/provisioning/ajehdukzidueh/cfg{mac}
Take particular care to the -i option, which defines the LAN subnet to be used: in this case, 1 references LAN 1 on the Draytek.
You can enforce a password change for Office 365 (Azure AD) users without having to reset the password through Powershell.
For a single user:
Set-MsolUserPassword -UserPrincipalName user@domain.com -ForceChangePasswordOnly $true -ForceChangePassword $true
To force all users to change their password:
Get-MsolUser -All | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true
You can also use filters ? {} to limit the password change enforcement to specific groups of users.
Note that it is recommended to also use Revoke-AzureADUserAllRefreshToken to end all current open sessions, and immediately enforcing the user(s) to log in again and change their passwords.
There are many ways to verify the syntax of a Powershell script (other than running it of course), but the most simple and useful is this one:
Get-Command -Syntax 'path\to\script.ps1'
If the syntax is valid, it will simply return the name of the script. If there are errors, it will provide a detailed syntax error report.
Using Powershell, you can quickly verify the status of the replication between domain controllers in Active Directory. This can be used in monitoring to verify a healthy AD replication. This can be run on any domain controller or on another system with RSAT or ActiveDirectory Powershell module.
Get-ADReplicationPartnerMetadata -Target "$env:USERDNSDOMAIN" -Scope Domain | FT -Auto Server,LastReplication*
To see forest-wide replication, replace -Scope Domain with -Scope Forest.
With the deprecation of Internet Explorer, it is currently no longer possible to install the Exchange Online Powershell module via ECP. But you can also install the Exchange Online Powershell module via Powershell itself:
First install the dependencies:
Install-PackageProvider -Name NuGet -Force Install-Module -Name PowerShellGet -Force
Next install the Exchange Online Management module:
Install-Module -Name ExchangeOnlineManagement
« ‹ | April 2021 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |