This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Register-EditorCommand -Name SignCurrentScript -DisplayName 'Sign Current Script' -ScriptBlock { | |
$cert = (Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert)[0] | |
$currentFile = $psEditor.GetEditorContext().CurrentFile.Path | |
Set-AuthenticodeSignature -Certificate $cert -FilePath $currentFile | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Set-Signature { | |
[CmdletBinding()] | |
[Alias('sig')] | |
param( | |
[Parameter( | |
Mandatory, | |
Position = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT gcs.manufacturer0 AS Make | |
,IIF(gcs.manufacturer0 = 'Lenovo', gcsp.Version0, gcs.model0) AS Model | |
,COUNT(*) AS Count | |
FROM [CM_XXX].[dbo].[v_GS_COMPUTER_SYSTEM] gcs | |
INNER JOIN [CM_XXX].[dbo].[v_GS_COMPUTER_SYSTEM_PRODUCT] gcsp ON gcsp.ResourceID = gcs.ResourceID | |
GROUP BY Manufacturer0 | |
,CASE | |
WHEN gcs.Manufacturer0 = 'Lenovo' | |
THEN gcsp.Version0 | |
ELSE gcs.Model0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules UpdateServices | |
# Site configuration | |
$SiteCode = "CM1" # Site code | |
$ProviderMachineName = "siteServer.fqdn" # SMS Provider machine name | |
$WSUSName = "WSUS.server.fqdn" # SUP WSUS machine name (use FQDN) | |
$WSUSPortNumber = "8531" # SUP WSUS Port number (default for HTTPS is 8531, and 8530 for HTTP) | |
$WSUSSSL = $true # set to false if not using SSL for WSUS | |
# Import the ConfigurationManager.psd1 module | |
if((Get-Module ConfigurationManager) -eq $null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module Microsoft.Graph.Teams | |
$params = @{ | |
ChatType = 'oneOnOne' | |
Members = @( | |
@{ | |
'@odata.type' = '#microsoft.graph.aadUserConversationMember' | |
Roles = @('owner') | |
'User@odata.bind' = "https://graph.microsoft.com/v1.0/users('UPN')" | |
} |
OlderNewer