filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_60_94.ps1
# # Module manifest for module 'GCArcService' # # Generated by: Microsoft # # Generated on: 08/09/2020 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'GCArcService.psm1' # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely identify this module GUID = 'c5d905c4-c9a5-4a0a-8115-9216509a36f5' # Author of this module Author = 'Microsoft Corporation' # Company or vendor of this module CompanyName = 'Microsoft Corporation' # Copyright statement for this module Copyright = '(c) 2017 Microsoft Corporation. All rights reserved.' # Description of the functionality provided by this module Description = 'This module is used to install/uninstall Guest Configuration Service.' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '2.0' # Functions to export from this module FunctionsToExport = @('Install-GCArcService', 'Enable-GCArcService', 'Uninstall-GCArcService', 'Update-GCArcService') } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBECPA5J5/o6uzP # EAC976FTzZ20v0rLlWThfMKjQi2k+6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm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gWFKWfGRlfrG+noGDnAroTXKZ5lZXI/sJ08uzkRjHG7NFkcin # XUWmp7pfnYhgelDbxQVun4F/FYwE/kmK2SjLNlGp6Swj+qoSGxP+sfjDTcCOOzap # r5j9j0AVqrQGvrHgTsYxOI2W45CQ5vXPEMXmGjnMtNCxPw1oagjJtYuwr3WuHDsB # YdgMERx69nMWZ3xoLnoPaNfsX3WC+jZcgmSqqhAh634cPyAxGFg4s5ty5miDk0rC # KWXpneJeR7oOgI+pJGwW2tMNKUNZlgldXgQly1MbS3hzcyD+PjIwtvxMu8JTypFn # aAfkjoPOV3aG6DdYFx+s3aiBegbf/jySDWKA13oUbTJBbJhmJpEPQfpbZWWhYKs6 # cHTQLNB0LfVDevIS5FHHDEv10dOd+7kj7EecqGbACb/mNemLUmlj3grVzQZ9Nmv+ # 5EEu # SIG # End signature block
0
2542.ps1
$a = "XSQLUTIL18", "XSQLUTIL19" $a | % ` { $ServerName = $_; cd sqlserver:\ cd sql\$ServerName\default\databases $DBs = dir; $DBs | % ` { $LastBackupDate = $_.LastBackupDate; $LastLogBackupDate = $_.LastLogBackupDate; $LastDiffBackupDate = $_.LastDifferentialBackupDate; invoke-sqlcmd -ServerInstance "XSQLUTIL18" -Database "dbamaint" -query "Insert BackupInfo SELECT '$ServerName', '$lastBackupDate', '$LastLogBackupDate', '$LastDiffBackupDate'" -SuppressProviderContextWarning $ServerName; $_.Name; } }
0
597.ps1
function Backup-AllSQLDBs{ [CmdletBinding()] param( [Parameter(Mandatory=$false)] [String] $Server = $env:COMPUTERNAME, [Parameter(Mandatory=$true)] [String] $Instance, [Parameter(Mandatory=$true)] [String] $Path ) if((Get-PSSnapin "SqlServerCmdletSnapin100" -ErrorAction SilentlyContinue) -eq $Null){ Add-PSSnapin "SqlServerCmdletSnapin100" } if((Get-PSSnapin "SqlServerProviderSnapin100" -ErrorAction SilentlyContinue) -eq $Null){ Add-PSSnapin "SqlServerProviderSnapin100" } Push-Location $SQLInstance = "SQLServer:\SQL\$Server\$Instance\Databases" set-Location $SQLInstance Get-ChildItem $SQLInstance | select name | %{ $BackupPath = $Path + "\" + $_.Name if(! (Test-Path $BackupPath)){ mkdir $BackupPath } } $SQLQuery = @" DECLARE @Name VARCHAR(250) DECLARE @Path VARCHAR(250) DECLARE @FileName VARCHAR(250) DECLARE @TimeStamp VARCHAR(30) SET @Path = '$Path' SELECT @TimeStamp = REPLACE(CONVERT(VARCHAR(26),getdate(),120),':','-') DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases WHERE name NOT IN ('master','model','msdb','tempdb') OPEN db_cursor FETCH NEXT FROM db_cursor INTO @Name WHILE @@FETCH_STATUS = 0 BEGIN SET @FileName = @Path + '\' + @Name + '\' + @Name + ' PRINT @FileName BACKUP DATABASE @Name TO DISK = @FileName FETCH NEXT FROM db_cursor INTO @Name END CLOSE db_cursor DEALLOCATE db_cursor "@ Invoke-Sqlcmd -Query $SQLQuery -QueryTimeout 1000 Pop-Location }
0
3948.ps1
function Check-CmdletReturnType { param($cmdletName, $cmdletReturn) $cmdletData = Get-Command $cmdletName; Assert-NotNull $cmdletData; [array]$cmdletReturnTypes = $cmdletData.OutputType.Name | Foreach-Object { return ($_ -replace "Microsoft.Azure.Commands.Network.Models.","") }; [array]$cmdletReturnTypes = $cmdletReturnTypes | Foreach-Object { return ($_ -replace "System.","") }; $realReturnType = $cmdletReturn.GetType().Name -replace "Microsoft.Azure.Commands.Network.Models.",""; return $cmdletReturnTypes -contains $realReturnType; } function Test-ExpressRouteCircuitCRUDMinimalParameters { $rgname = Get-ResourceGroupName; $rglocation = Get-ProviderLocation ResourceManagement; $rname = Get-ResourceName; $location = Get-ProviderLocation "Microsoft.Network/expressRouteCircuits" "Brazil South"; $SkuTier = "Standard"; $SkuFamily = "MeteredData"; $ServiceProviderName = "Interxion"; $PeeringLocation = "London"; $BandwidthInMbps = 100; $SkuTierSet = "Premium"; $SkuFamilySet = "UnlimitedData"; $BandwidthInMbpsSet = 200; try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation; $vExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -Location $location -SkuTier $SkuTier -SkuFamily $SkuFamily -ServiceProviderName $ServiceProviderName -PeeringLocation $PeeringLocation -BandwidthInMbps $BandwidthInMbps; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "New-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTier $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamily $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $ServiceProviderName $vExpressRouteCircuit.ServiceProviderProperties.ServiceProviderName; Assert-AreEqual $PeeringLocation $vExpressRouteCircuit.ServiceProviderProperties.PeeringLocation; Assert-AreEqual $BandwidthInMbps $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; $vExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTier $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamily $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $ServiceProviderName $vExpressRouteCircuit.ServiceProviderProperties.ServiceProviderName; Assert-AreEqual $PeeringLocation $vExpressRouteCircuit.ServiceProviderProperties.PeeringLocation; Assert-AreEqual $BandwidthInMbps $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*" -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $vExpressRouteCircuit.Sku.Tier = $SkuTierSet; $vExpressRouteCircuit.Sku.Family = $SkuFamilySet; $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps = $BandwidthInMbpsSet; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Set-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTierSet $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamilySet $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $BandwidthInMbpsSet $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; $vExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTierSet $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamilySet $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $BandwidthInMbpsSet $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*" -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $job = Remove-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -PassThru -Force -AsJob; $job | Wait-Job; $removeExpressRouteCircuit = $job | Receive-Job; Assert-AreEqual $true $removeExpressRouteCircuit; Assert-ThrowsContains { Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname } "not found"; Assert-ThrowsContains { Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit } "not found"; } finally { Clean-ResourceGroup $rgname; } } function Test-ExpressRouteCircuitCRUDAllParameters { $rgname = Get-ResourceGroupName; $rglocation = Get-ProviderLocation ResourceManagement; $rname = Get-ResourceName; $location = Get-ProviderLocation "Microsoft.Network/expressRouteCircuits" "Brazil South"; $SkuTier = "Standard"; $SkuFamily = "MeteredData"; $ServiceProviderName = "Interxion"; $PeeringLocation = "London"; $BandwidthInMbps = 100; $AllowClassicOperation = $true; $Tag = @{tag1='test'}; $SkuTierSet = "Premium"; $SkuFamilySet = "UnlimitedData"; $BandwidthInMbpsSet = 200; $AllowClassicOperationSet = $false; $TagSet = @{tag2='testSet'}; try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation; $vExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -Location $location -SkuTier $SkuTier -SkuFamily $SkuFamily -ServiceProviderName $ServiceProviderName -PeeringLocation $PeeringLocation -BandwidthInMbps $BandwidthInMbps -AllowClassicOperation $AllowClassicOperation -Tag $Tag; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "New-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTier $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamily $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $ServiceProviderName $vExpressRouteCircuit.ServiceProviderProperties.ServiceProviderName; Assert-AreEqual $PeeringLocation $vExpressRouteCircuit.ServiceProviderProperties.PeeringLocation; Assert-AreEqual $BandwidthInMbps $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; Assert-AreEqual $AllowClassicOperation $vExpressRouteCircuit.AllowClassicOperations; Assert-AreEqualObjectProperties $Tag $vExpressRouteCircuit.Tag; $vExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTier $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamily $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $ServiceProviderName $vExpressRouteCircuit.ServiceProviderProperties.ServiceProviderName; Assert-AreEqual $PeeringLocation $vExpressRouteCircuit.ServiceProviderProperties.PeeringLocation; Assert-AreEqual $BandwidthInMbps $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; Assert-AreEqual $AllowClassicOperation $vExpressRouteCircuit.AllowClassicOperations; Assert-AreEqualObjectProperties $Tag $vExpressRouteCircuit.Tag; $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*" -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $vExpressRouteCircuit.Sku.Tier = $SkuTierSet; $vExpressRouteCircuit.Sku.Family = $SkuFamilySet; $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps = $BandwidthInMbpsSet; $vExpressRouteCircuit.AllowClassicOperations = $AllowClassicOperationSet; $vExpressRouteCircuit.Tag = $TagSet; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Set-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTierSet $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamilySet $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $BandwidthInMbpsSet $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; Assert-AreEqual $AllowClassicOperationSet $vExpressRouteCircuit.AllowClassicOperations; Assert-AreEqualObjectProperties $TagSet $vExpressRouteCircuit.Tag; $vExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname; Assert-NotNull $vExpressRouteCircuit; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuit" $vExpressRouteCircuit }; Assert-AreEqual $rname $vExpressRouteCircuit.Name; Assert-AreEqual $SkuTierSet $vExpressRouteCircuit.Sku.Tier; Assert-AreEqual $SkuFamilySet $vExpressRouteCircuit.Sku.Family; Assert-AreEqual $BandwidthInMbpsSet $vExpressRouteCircuit.ServiceProviderProperties.BandwidthInMbps; Assert-AreEqual $AllowClassicOperationSet $vExpressRouteCircuit.AllowClassicOperations; Assert-AreEqualObjectProperties $TagSet $vExpressRouteCircuit.Tag; $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName $rgname; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $listExpressRouteCircuit = Get-AzExpressRouteCircuit -ResourceGroupName "*" -Name "*"; Assert-NotNull ($listExpressRouteCircuit | Where-Object { $_.ResourceGroupName -eq $rgname -and $_.Name -eq $rname }); $job = Remove-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -PassThru -Force -AsJob; $job | Wait-Job; $removeExpressRouteCircuit = $job | Receive-Job; Assert-AreEqual $true $removeExpressRouteCircuit; Assert-ThrowsContains { Get-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname } "not found"; Assert-ThrowsContains { Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit } "not found"; } finally { Clean-ResourceGroup $rgname; } } function Test-ExpressRouteCircuitAuthorizationCRUDMinimalParameters { $rgname = Get-ResourceGroupName; $rglocation = Get-ProviderLocation ResourceManagement; $rname = Get-ResourceName; $rnameAdd = "${rname}Add"; $location = Get-ProviderLocation "Microsoft.Network/expressRouteCircuits" "Brazil South"; $ExpressRouteCircuitSkuTier = "Standard"; $ExpressRouteCircuitSkuFamily = "MeteredData"; $ExpressRouteCircuitServiceProviderName = "Interxion"; $ExpressRouteCircuitPeeringLocation = "London"; $ExpressRouteCircuitBandwidthInMbps = 100; try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation; $vExpressRouteCircuitAuthorization = New-AzExpressRouteCircuitAuthorization -Name $rname; Assert-NotNull $vExpressRouteCircuitAuthorization; Assert-True { Check-CmdletReturnType "New-AzExpressRouteCircuitAuthorization" $vExpressRouteCircuitAuthorization }; $vExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -Authorization $vExpressRouteCircuitAuthorization -SkuTier $ExpressRouteCircuitSkuTier -SkuFamily $ExpressRouteCircuitSkuFamily -ServiceProviderName $ExpressRouteCircuitServiceProviderName -PeeringLocation $ExpressRouteCircuitPeeringLocation -BandwidthInMbps $ExpressRouteCircuitBandwidthInMbps -Location $location; Assert-NotNull $vExpressRouteCircuit; Assert-AreEqual $rname $vExpressRouteCircuitAuthorization.Name; $vExpressRouteCircuitAuthorization = Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; Assert-NotNull $vExpressRouteCircuitAuthorization; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitAuthorization" $vExpressRouteCircuitAuthorization }; Assert-AreEqual $rname $vExpressRouteCircuitAuthorization.Name; $listExpressRouteCircuitAuthorization = Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitAuthorization | Where-Object { $_.Name -eq $rname }); $vExpressRouteCircuit = Add-AzExpressRouteCircuitAuthorization -Name $rnameAdd -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuitAuthorization = Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rnameAdd; Assert-NotNull $vExpressRouteCircuitAuthorization; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitAuthorization" $vExpressRouteCircuitAuthorization }; Assert-AreEqual $rnameAdd $vExpressRouteCircuitAuthorization.Name; $listExpressRouteCircuitAuthorization = Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitAuthorization | Where-Object { $_.Name -eq $rnameAdd }); Assert-ThrowsContains { Add-AzExpressRouteCircuitAuthorization -Name $rnameAdd -ExpressRouteCircuit $vExpressRouteCircuit } "already exists"; $vExpressRouteCircuit = Remove-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rnameAdd; $vExpressRouteCircuit = Remove-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Remove-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; Assert-ThrowsContains { Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname } "Sequence contains no matching element"; } finally { Clean-ResourceGroup $rgname; } } function Test-ExpressRouteCircuitPeeringCRUDMinimalParameters { $rgname = Get-ResourceGroupName; $rglocation = Get-ProviderLocation ResourceManagement; $rname = "AzurePrivatePeering"; $location = Get-ProviderLocation "Microsoft.Network/expressRouteCircuits" "Brazil South"; $PeeringType = "AzurePrivatePeering"; $PeerASN = 1; $PrimaryPeerAddressPrefix = "10.0.0.0/30"; $SecondaryPeerAddressPrefix = "12.0.0.0/30"; $VlanId = 1; $PeeringTypeSet = "AzurePrivatePeering"; $PeerASNSet = 2; $PrimaryPeerAddressPrefixSet = "11.0.0.0/30"; $SecondaryPeerAddressPrefixSet = "14.0.0.0/30"; $VlanIdSet = 2; $ExpressRouteCircuitSkuTier = "Standard"; $ExpressRouteCircuitSkuFamily = "MeteredData"; $ExpressRouteCircuitServiceProviderName = "Interxion"; $ExpressRouteCircuitPeeringLocation = "London"; $ExpressRouteCircuitBandwidthInMbps = 100; try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation; $vExpressRouteCircuitPeering = New-AzExpressRouteCircuitPeeringConfig -Name $rname -PeeringType $PeeringType -PeerASN $PeerASN -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefix -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefix -VlanId $VlanId; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "New-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; $vExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -Peering $vExpressRouteCircuitPeering -SkuTier $ExpressRouteCircuitSkuTier -SkuFamily $ExpressRouteCircuitSkuFamily -ServiceProviderName $ExpressRouteCircuitServiceProviderName -PeeringLocation $ExpressRouteCircuitPeeringLocation -BandwidthInMbps $ExpressRouteCircuitBandwidthInMbps -Location $location; Assert-NotNull $vExpressRouteCircuit; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringType $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASN $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefix $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefix $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanId $vExpressRouteCircuitPeering.VlanId; $vExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringType $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASN $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefix $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefix $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanId $vExpressRouteCircuitPeering.VlanId; $listExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitPeering | Where-Object { $_.Name -eq $rname }); $vExpressRouteCircuit = Set-AzExpressRouteCircuitPeeringConfig -Name $rname -ExpressRouteCircuit $vExpressRouteCircuit -PeeringType $PeeringTypeSet -PeerASN $PeerASNSet -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefixSet -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefixSet -VlanId $VlanIdSet; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringTypeSet $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASNSet $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefixSet $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefixSet $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanIdSet $vExpressRouteCircuitPeering.VlanId; $listExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitPeering | Where-Object { $_.Name -eq $rname }); $vExpressRouteCircuit = Remove-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Remove-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; Assert-ThrowsContains { Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname } "Sequence contains no matching element"; Assert-ThrowsContains { Set-AzExpressRouteCircuitPeeringConfig -Name $rname -ExpressRouteCircuit $vExpressRouteCircuit -PeeringType $PeeringTypeSet -PeerASN $PeerASNSet -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefixSet -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefixSet -VlanId $VlanIdSet } "does not exist"; } finally { Clean-ResourceGroup $rgname; } } function Test-ExpressRouteCircuitPeeringCRUDAllParameters { $rgname = Get-ResourceGroupName; $rglocation = Get-ProviderLocation ResourceManagement; $rname = "AzurePrivatePeering"; $location = Get-ProviderLocation "Microsoft.Network/expressRouteCircuits" "Brazil South"; $PeeringType = "AzurePrivatePeering"; $PeerASN = 1; $PrimaryPeerAddressPrefix = "10.0.0.0/30"; $SecondaryPeerAddressPrefix = "12.0.0.0/30"; $VlanId = 1; $SharedKey = "testkey"; $PeerAddressType = "IPv4"; $PeeringTypeSet = "AzurePrivatePeering"; $PeerASNSet = 2; $PrimaryPeerAddressPrefixSet = "11.0.0.0/30"; $SecondaryPeerAddressPrefixSet = "14.0.0.0/30"; $VlanIdSet = 2; $SharedKeySet = "testkey2"; $PeerAddressTypeSet = "IPv4"; $ExpressRouteCircuitSkuTier = "Standard"; $ExpressRouteCircuitSkuFamily = "MeteredData"; $ExpressRouteCircuitServiceProviderName = "Interxion"; $ExpressRouteCircuitPeeringLocation = "London"; $ExpressRouteCircuitBandwidthInMbps = 100; try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation; $vExpressRouteCircuitPeering = New-AzExpressRouteCircuitPeeringConfig -Name $rname -PeeringType $PeeringType -PeerASN $PeerASN -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefix -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefix -VlanId $VlanId -SharedKey $SharedKey -PeerAddressType $PeerAddressType; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "New-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; $vExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName $rgname -Name $rname -Peering $vExpressRouteCircuitPeering -SkuTier $ExpressRouteCircuitSkuTier -SkuFamily $ExpressRouteCircuitSkuFamily -ServiceProviderName $ExpressRouteCircuitServiceProviderName -PeeringLocation $ExpressRouteCircuitPeeringLocation -BandwidthInMbps $ExpressRouteCircuitBandwidthInMbps -Location $location; Assert-NotNull $vExpressRouteCircuit; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringType $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASN $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefix $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefix $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanId $vExpressRouteCircuitPeering.VlanId; $vExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringType $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASN $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefix $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefix $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanId $vExpressRouteCircuitPeering.VlanId; $listExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitPeering | Where-Object { $_.Name -eq $rname }); $vExpressRouteCircuit = Set-AzExpressRouteCircuitPeeringConfig -Name $rname -ExpressRouteCircuit $vExpressRouteCircuit -PeeringType $PeeringTypeSet -PeerASN $PeerASNSet -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefixSet -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefixSet -VlanId $VlanIdSet -SharedKey $SharedKeySet -PeerAddressType $PeerAddressTypeSet; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; $vExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; Assert-NotNull $vExpressRouteCircuitPeering; Assert-True { Check-CmdletReturnType "Get-AzExpressRouteCircuitPeeringConfig" $vExpressRouteCircuitPeering }; Assert-AreEqual $rname $vExpressRouteCircuitPeering.Name; Assert-AreEqual $PeeringTypeSet $vExpressRouteCircuitPeering.PeeringType; Assert-AreEqual $PeerASNSet $vExpressRouteCircuitPeering.PeerASN; Assert-AreEqual $PrimaryPeerAddressPrefixSet $vExpressRouteCircuitPeering.PrimaryPeerAddressPrefix; Assert-AreEqual $SecondaryPeerAddressPrefixSet $vExpressRouteCircuitPeering.SecondaryPeerAddressPrefix; Assert-AreEqual $VlanIdSet $vExpressRouteCircuitPeering.VlanId; $listExpressRouteCircuitPeering = Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull ($listExpressRouteCircuitPeering | Where-Object { $_.Name -eq $rname }); $vExpressRouteCircuit = Remove-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Remove-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname; $vExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $vExpressRouteCircuit; Assert-NotNull $vExpressRouteCircuit; Assert-ThrowsContains { Get-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit $vExpressRouteCircuit -Name $rname } "Sequence contains no matching element"; Assert-ThrowsContains { Set-AzExpressRouteCircuitPeeringConfig -Name $rname -ExpressRouteCircuit $vExpressRouteCircuit -PeeringType $PeeringTypeSet -PeerASN $PeerASNSet -PrimaryPeerAddressPrefix $PrimaryPeerAddressPrefixSet -SecondaryPeerAddressPrefix $SecondaryPeerAddressPrefixSet -VlanId $VlanIdSet -SharedKey $SharedKeySet -PeerAddressType $PeerAddressTypeSet } "does not exist"; } finally { Clean-ResourceGroup $rgname; } }
0
2912.ps1
Framework "2.0" task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) { $output = &dotnet build -version -nologo 2>&1 Assert ($output -NotLike "15.3") '$output should contain 15.3' } }
0
sample_51_71.ps1
# # Module manifest for module 'OCI.PSModules.Servicemesh' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicemesh.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '16189a7b-c9fe-4714-98b6-983f1fa28ccd' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Servicemesh Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Servicemesh.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIServicemeshAccessPoliciesList', 'Get-OCIServicemeshAccessPolicy', 'Get-OCIServicemeshIngressGateway', 'Get-OCIServicemeshIngressGatewayRouteTable', 'Get-OCIServicemeshIngressGatewayRouteTablesList', 'Get-OCIServicemeshIngressGatewaysList', 'Get-OCIServicemeshMesh', 'Get-OCIServicemeshMeshesList', 'Get-OCIServicemeshProxyDetails', 'Get-OCIServicemeshVirtualDeployment', 'Get-OCIServicemeshVirtualDeploymentsList', 'Get-OCIServicemeshVirtualService', 'Get-OCIServicemeshVirtualServiceRouteTable', 'Get-OCIServicemeshVirtualServiceRouteTablesList', 'Get-OCIServicemeshVirtualServicesList', 'Get-OCIServicemeshWorkRequest', 'Get-OCIServicemeshWorkRequestErrorsList', 'Get-OCIServicemeshWorkRequestLogsList', 'Get-OCIServicemeshWorkRequestsList', 'Move-OCIServicemeshAccessPolicyCompartment', 'Move-OCIServicemeshIngressGatewayCompartment', 'Move-OCIServicemeshIngressGatewayRouteTableCompartment', 'Move-OCIServicemeshMeshCompartment', 'Move-OCIServicemeshVirtualDeploymentCompartment', 'Move-OCIServicemeshVirtualServiceCompartment', 'Move-OCIServicemeshVirtualServiceRouteTableCompartment', 'New-OCIServicemeshAccessPolicy', 'New-OCIServicemeshIngressGateway', 'New-OCIServicemeshIngressGatewayRouteTable', 'New-OCIServicemeshMesh', 'New-OCIServicemeshVirtualDeployment', 'New-OCIServicemeshVirtualService', 'New-OCIServicemeshVirtualServiceRouteTable', 'Remove-OCIServicemeshAccessPolicy', 'Remove-OCIServicemeshIngressGateway', 'Remove-OCIServicemeshIngressGatewayRouteTable', 'Remove-OCIServicemeshMesh', 'Remove-OCIServicemeshVirtualDeployment', 'Remove-OCIServicemeshVirtualService', 'Remove-OCIServicemeshVirtualServiceRouteTable', 'Stop-OCIServicemeshWorkRequest', 'Update-OCIServicemeshAccessPolicy', 'Update-OCIServicemeshIngressGateway', 'Update-OCIServicemeshIngressGatewayRouteTable', 'Update-OCIServicemeshMesh', 'Update-OCIServicemeshVirtualDeployment', 'Update-OCIServicemeshVirtualService', 'Update-OCIServicemeshVirtualServiceRouteTable' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Servicemesh' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_34_88.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '16f2e498-6e6b-4e22-8c36-b6c2677410c6' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Marketplacepublisher Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Marketplacepublisher.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Confirm-OCIMarketplacepublisherAndPublishArtifact', 'Enable-OCIMarketplacepublisherTermVersion', 'Get-OCIMarketplacepublisherArtifact', 'Get-OCIMarketplacepublisherArtifactsList', 'Get-OCIMarketplacepublisherCategoriesList', 'Get-OCIMarketplacepublisherCategory', 'Get-OCIMarketplacepublisherListing', 'Get-OCIMarketplacepublisherListingRevision', 'Get-OCIMarketplacepublisherListingRevisionAttachment', 'Get-OCIMarketplacepublisherListingRevisionAttachmentsList', 'Get-OCIMarketplacepublisherListingRevisionNote', 'Get-OCIMarketplacepublisherListingRevisionNotesList', 'Get-OCIMarketplacepublisherListingRevisionPackage', 'Get-OCIMarketplacepublisherListingRevisionPackagesList', 'Get-OCIMarketplacepublisherListingRevisionsList', 'Get-OCIMarketplacepublisherListingsList', 'Get-OCIMarketplacepublisherMarket', 'Get-OCIMarketplacepublisherMarketsList', 'Get-OCIMarketplacepublisherProduct', 'Get-OCIMarketplacepublisherProductsList', 'Get-OCIMarketplacepublisherPublisher', 'Get-OCIMarketplacepublisherPublishersList', 'Get-OCIMarketplacepublisherTerm', 'Get-OCIMarketplacepublisherTermsList', 'Get-OCIMarketplacepublisherTermVersion', 'Get-OCIMarketplacepublisherTermVersionsList', 'Get-OCIMarketplacepublisherWorkRequest', 'Get-OCIMarketplacepublisherWorkRequestErrorsList', 'Get-OCIMarketplacepublisherWorkRequestLogsList', 'Get-OCIMarketplacepublisherWorkRequestsList', 'Invoke-OCIMarketplacepublisherCascadingDeleteListing', 'Invoke-OCIMarketplacepublisherCascadingDeleteListingRevision', 'Invoke-OCIMarketplacepublisherCloneListingRevision', 'Invoke-OCIMarketplacepublisherMarkListingRevisionPackageAsDefault', 'Invoke-OCIMarketplacepublisherPublishListingRevision', 'Invoke-OCIMarketplacepublisherPublishListingRevisionAsPrivate', 'Invoke-OCIMarketplacepublisherPublishListingRevisionPackage', 'Invoke-OCIMarketplacepublisherSubmitListingRevisionForReview', 'Invoke-OCIMarketplacepublisherUnPublishListingRevisionPackage', 'Invoke-OCIMarketplacepublisherWithdrawListingRevision', 'Move-OCIMarketplacepublisherArtifactCompartment', 'Move-OCIMarketplacepublisherListingCompartment', 'Move-OCIMarketplacepublisherListingRevisionToNewStatus', 'Move-OCIMarketplacepublisherTermCompartment', 'New-OCIMarketplacepublisherArtifact', 'New-OCIMarketplacepublisherListing', 'New-OCIMarketplacepublisherListingRevision', 'New-OCIMarketplacepublisherListingRevisionAttachment', 'New-OCIMarketplacepublisherListingRevisionNote', 'New-OCIMarketplacepublisherListingRevisionPackage', 'New-OCIMarketplacepublisherTerm', 'New-OCIMarketplacepublisherTermVersion', 'Remove-OCIMarketplacepublisherArtifact', 'Remove-OCIMarketplacepublisherListing', 'Remove-OCIMarketplacepublisherListingRevision', 'Remove-OCIMarketplacepublisherListingRevisionAttachment', 'Remove-OCIMarketplacepublisherListingRevisionNote', 'Remove-OCIMarketplacepublisherListingRevisionPackage', 'Remove-OCIMarketplacepublisherTerm', 'Remove-OCIMarketplacepublisherTermVersion', 'Stop-OCIMarketplacepublisherWorkRequest', 'Update-OCIMarketplacepublisherArtifact', 'Update-OCIMarketplacepublisherListing', 'Update-OCIMarketplacepublisherListingRevision', 'Update-OCIMarketplacepublisherListingRevisionAttachment', 'Update-OCIMarketplacepublisherListingRevisionAttachmentContent', 'Update-OCIMarketplacepublisherListingRevisionIconContent', 'Update-OCIMarketplacepublisherListingRevisionPackage', 'Update-OCIMarketplacepublisherTerm', 'Update-OCIMarketplacepublisherTermVersion', 'Update-OCIMarketplacepublisherTermVersionContent' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Marketplacepublisher' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
vmware guests subnet.ps1
$snapins = "vmware.vimautomation.core" foreach ($snapin in $snapins){if (!(Get-PSSnapin $snapin -ErrorAction SilentlyContinue)){Add-PSSnapin $snapin}} $vserver = "vmware vCenter Server" $vNetwork = "General_Services" $logfile = "d:\\Scripts\\log\\vm.log" $subnet = "255.255.255.128" connect-viserver -Server $vserver $vms = Get-VM foreach ($vm in $vms){ $nw = $vm|Get-NetworkAdapter if (($nw.networkname) -like $vNetwork){ $NICs = Get-WMIObject Win32_NetworkAdapterConfiguration -ComputerName $vm.name| where{$_.IPEnabled -eq “TRUE”} Foreach($NIC in $NICs) { try{ $NIC.EnableStatic($nic.ipaddress, $subnet) $string = "$vm is adapted" $string $string|Out-File -FilePath $logfile -Append -Encoding OEM } Catch{ $string = "$vm is not adapted" $string $string|Out-File -FilePath $logfile -Append -Encoding OEM } } } }
0
sample_45_79.ps1
# # Script module for module 'Az.IotHub' that is executed when 'Az.IotHub' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 05/16/2024 06:33:07 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where-Object { $_ -ge 461808 }))) { throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher." } } catch [System.Management.Automation.DriveNotFoundException] { Write-Verbose ".NET Framework version check failed." } } function Preload-Assembly { param ( [string] $AssemblyDirectory ) if($PSEdition -eq 'Desktop' -and (Test-Path $AssemblyDirectory -ErrorAction Ignore)) { try { Get-ChildItem -ErrorAction Stop -Path $AssemblyDirectory -Filter "*.dll" | ForEach-Object { try { Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null } catch { Write-Verbose $_ } } } catch {} } } if ($true -and ($PSEdition -eq 'Desktop')) { if ($PSVersionTable.PSVersion -lt [Version]'5.1') { throw "PowerShell versions lower than 5.1 are not supported in Az. Please upgrade to PowerShell 5.1 or higher." } Test-DotNet } if ($true -and ($PSEdition -eq 'Core')) { if ($PSVersionTable.PSVersion -lt [Version]'6.2.4') { throw "Current Az version doesn't support PowerShell Core versions lower than 6.2.4. Please upgrade to PowerShell Core 6.2.4 or higher." } } if (Test-Path -Path "$PSScriptRoot\StartupScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\StartupScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } # [windows powershell] preload assemblies # [windows powershell] preload module alc assemblies $preloadPath = (Join-Path $PSScriptRoot -ChildPath "ModuleAlcAssemblies") Preload-Assembly -AssemblyDirectory $preloadPath if (Get-Module AzureRM.profile -ErrorAction Ignore) { Write-Warning ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") throw ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") } $module = Get-Module Az.Accounts if ($module -ne $null -and $module.Version -lt [System.Version]"3.0.0") { Write-Error "This module requires Az.Accounts version 3.0.0. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information." -ErrorAction Stop } elseif ($module -eq $null) { Import-Module Az.Accounts -MinimumVersion 3.0.0 -Scope Global } Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azure.PowerShell.Cmdlets.IotHub.dll) if (Test-Path -Path "$PSScriptRoot\PostImportScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\PostImportScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } $FilteredCommands = @('Add-AzIotHubEventHubConsumerGroup:ResourceGroupName','Get-AzIotHubEventHubConsumerGroup:ResourceGroupName','Get-AzIotHubConnectionString:ResourceGroupName','Get-AzIotHubJob:ResourceGroupName','Get-AzIotHubQuotaMetric:ResourceGroupName','Get-AzIotHubRegistryStatistic:ResourceGroupName','Get-AzIotHubValidSku:ResourceGroupName','New-AzIotHub:ResourceGroupName','New-AzIotHubExportDevice:ResourceGroupName','New-AzIotHubImportDevice:ResourceGroupName','Remove-AzIotHub:ResourceGroupName','Remove-AzIotHubEventHubConsumerGroup:ResourceGroupName','Set-AzIotHub:ResourceGroupName') if ($Env:ACC_CLOUD -eq $null) { $FilteredCommands | ForEach-Object { $existingDefault = $false foreach ($key in $global:PSDefaultParameterValues.Keys) { if ($_ -like "$key") { $existingDefault = $true } } if (!$existingDefault) { $global:PSDefaultParameterValues.Add($_, { if ((Get-Command Get-AzContext -ErrorAction Ignore) -eq $null) { $context = Get-AzureRmContext } else { $context = Get-AzContext } if (($context -ne $null) -and $context.ExtendedProperties.ContainsKey("Default Resource Group")) { $context.ExtendedProperties["Default Resource Group"] } }) } } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBgl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xeKatlEP4y8qZzjuWL0Ou0IqxELDhX2TLylxIIN # NzCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x # JjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB3MHg # jMJfWF6OAAEAAAHcMCIEIMTvbH6kIHUreuUD/Hq60uvVE0Mtqj5sSIGrAkEVk1NF # MA0GCSqGSIb3DQEBCwUABIICADmdoeizbM60Po19L1MPBkRfvT9B3vPB8OP3IlTt # 9/UIm1PJoDL3YII1rmbYbnqztdq4POyPOagOVUslhOYOnCUib3q0deB2yZq2LB8/ # z5F9GeuZI+qyvM2BmfcN5uFvz16Up4XqPZvNBkiSHuNHr/dkWSD5hlr3fYBlNhJ8 # cNvta848oxjtvYpPOdphqxnw2P20qtGyDEW7/tV9cHi01X8IOvN0mldSELmLDdI4 # hlg9hvSTxzBth8a4Du5fzerCjHHCzlwXonKUY3athTiUcUEZBfPAdm82a26swXX8 # WweUzqqLxSnsDQtVMvcjgtdt3WFUDDTtgjj8IymySsbtMxgbfimfIH4X+lVs7s7H # 46r4YfIB6l9X/ON3p0MjziB1le3rJs5fI93aCgT8o4uI5VA+gAkbE6rKXJFLBrOb # rTCjIVH0EMaFvU2+G/s2C9B64JiJ9QXEZvqW3uNuZbVtDABo9u5r30rpwTOD6BV9 # s0evUwCSbYwBgxiWmMnrICD6aqrhHkuXgCcwd/FvQMjsfvxy07iJSQbF9j/kJ380 # MHRdpf0lTPNFZVPJ2vH4S/JTx1HmQRk6twa5AovqcSYIPa6h0qn0U5QcHd1uPAZX # JlBnMqxhS967H9aAY5X8nvhtBKY/VMGvuHSDt0KaaHA2TTUbqcHaTUyo8Gvdy17r # roKL # SIG # End signature block
0
0ddea161-baf2-439c-b797-afb5c636692f.ps1
#Variables $Date = Get-Date $TempReport = $env:TEMP + "\\temp.csv" $FinalReport = $env:USERPROFILE + "\\" + $Date.Year + "_" + $Date.Month + "_" + $Date.Day + "_" + $Date.Hour + ":" + $Date.Minute + "_Scheduled_Task_Report.csv" $title = Write-Host "Scheduled Task Reporter" -ForegroundColor green $message = Write-Host "Which servers would you like to report on?" -ForegroundColor yellow $EXIT = New-Object System.Management.Automation.Host.ChoiceDescription "&Exit", ` "Exits the script. . . " $ALL = New-Object System.Management.Automation.Host.ChoiceDescription "&All Server Report", ` "Queries for all SERVERS in the domain and reports on their scheduled tasks." $SRV = New-Object System.Management.Automation.Host.ChoiceDescription "&Single Host Report", ` "Queries for the exact server or workstation name entered." $OTHR = New-Object System.Management.Automation.Host.ChoiceDescription "A&NR Report", ` "Peforms an ANR (Ambiguous Name Request) lookup. ANR allows you to do a report against one or more computers by typing part of the computer name." $options = [System.Management.Automation.Host.ChoiceDescription[]]($EXIT, $ALL, $SRV, $OTHR) $result = $host.ui.PromptForChoice($title, $message, $options, 0) switch ($result) { 0 {Write-Host "No selection made. Exiting script. . ."} 1 {Get-QADComputer -sizelimit 0| Where {$_.osname -like "*Server*"} | Sort | % {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport }} 2 {$Computer = Read-Host -Prompt "Enter the server name" Get-QADComputer $Computer | Sort | % {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport}} # | set-content 'export-csv $outputdestination'}} 3 {$Search = Read-Host -Prompt "Type all or part of the computer name" Get-QADComputer -ANR $Search | ForEach-Object {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport}}
0
1459.ps1
function Set-CDotNetAppSetting { [CmdletBinding(SupportsShouldProcess=$true, DefaultParameterSetName='All')] param( [Parameter(Mandatory=$true)] [string] $Name, [Parameter(Mandatory=$true)] [string] $Value, [Switch] $Framework, [Switch] $Framework64, [Switch] $Clr2, [Switch] $Clr4 ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( -not ($Framework -or $Framework64) ) { Write-Error "You must supply either or both of the Framework and Framework64 switches." return } if( -not ($Clr2 -or $Clr4) ) { Write-Error "You must supply either or both of the Clr2 and Clr4 switches." return } $runtimes = @() if( $Clr2 ) { $runtimes += 'v2.0' } if( $Clr4 ) { $runtimes += 'v4.0' } $runtimes | ForEach-Object { $params = @{ FilePath = (Join-Path $CarbonBinDir 'Set-DotNetAppSetting.ps1' -Resolve); ArgumentList = @( (ConvertTo-CBase64 -Value $Name), (ConvertTo-CBase64 -Value $Value) ); Runtime = $_; ExecutionPolicy = [Microsoft.PowerShell.ExecutionPolicy]::RemoteSigned; } if( $Framework ) { Invoke-CPowerShell @params -x86 } if( $Framework64 ) { Invoke-CPowerShell @params } } }
0
sample_32_83.ps1
# Get the version of the Torizon IDE Extension from package.json $env:TEST_EXTENSION_VERSION = ((Get-Content "package.json" -Raw) | ConvertFrom-Json).version $env:TEST_VSCODE_CLEANUP = $true # Start the tests from a clean environment, unless explictly setting to false # the env variable if ($env:TEST_VSCODE_CLEANUP -Eq $true) { # cleanup Write-Output "Clearing dotvscode and ~/.apollox" # remove dotvscode if (Test-Path "dotvscode") { Remove-Item -Recurse -Force "dotvscode" } # remove .apollox if (Test-Path -Path "$env:HOME/.apollox") { Remove-Item -Recurse -Force "$env:HOME/.apollox" } } if (!(Test-Path "dotvscode")) { # get test-resources # If vscode-extension-tester hasn't been released for the latest VSCode: # https://github.com/redhat-developer/vscode-extension-tester # use the -c <vscode version> parameter, ex: npx extest get-vscode -c 1.86.2 # When bumping vscode-extension-tester also bump this version here to the latest supported npx extest get-vscode -s "dotvscode" -c 1.87.2 npx extest get-chromedriver -s "dotvscode" -c 1.87.2 } # clean file stream Write-Host "" > "dotvscode/currentTestTerminalOutput.log" # remove out and recompiled it, this is useful for local tests if (Test-Path .\out) { Remove-Item -Recurse -Force .\out } # compile and pack # apollox npm --prefix ../apollox run pack $APOLLOX_FILE = ((Get-Content "package.json" -Raw) | ConvertFrom-Json).dependencies.apollox $APOLLOX_FILE = $APOLLOX_FILE.replace('file:','') Copy-Item $APOLLOX_FILE . # apollox-vscode npm run pack # install npx extest install-vsix -e "dotvscode/extensions" -f ./apollox-vscode-linux-x64-$env:TEST_EXTENSION_VERSION.vsix -s "dotvscode"
0
sample_48_79.ps1
if ( (Test-Path .web\bufferSource.ts) -and (Test-Path .web\fetchSource.ts) -and (Test-Path .web\extension.ts) -and (Test-Path .web\package-lock.json) -and (Test-Path .web\package.json) -and (Test-Path .web\.vscode\extensions.json) -and (Test-Path .web\.vscode\launch.json) -and (Test-Path .web\.vscode\settings.json) -and (Test-Path .web\.vscode\tasks.json) -and (Test-Path .web\web\test\suite\extension.test.ts) -and (Test-Path .web\web\test\suite\index.ts) -and (Test-Path .web\tsconfig.json) -and (Test-Path .web\gitTransactions.ts) -and (Test-Path .web\tabLabels.ts) -and (Test-Path .web\workspaceClass.ts) ) { New-Item -ItemType Directory -Path ".local" -ErrorAction SilentlyContinue Move-Item src\Buffer\bufferSource.ts .local\bufferSource.ts Move-Item src\Fetch\fetchSource.ts .local\fetchSource.ts Move-Item src\extension.ts .local\extension.ts Move-Item package-lock.json .local\package-lock.json Move-Item package.json .local\package.json Move-Item .vscode .local\.vscode Move-Item tsconfig.json .local\tsconfig.json Move-Item src\export .local\export Move-Item src\import .local\import Move-Item src\workspace\importExport .local\importExport Move-Item src\gitTransactions.ts .local\gitTransactions.ts Move-Item src\workspace\workspaceClass.ts .local\workspaceClass.ts Move-Item src\ttsDebugger .local\ttsDebugger Move-Item src\tabLabels\tabLabels.ts .local\tabLabels.ts Move-Item .web\bufferSource.ts src\Buffer\bufferSource.ts Move-Item .web\fetchSource.ts src\Fetch\fetchSource.ts Move-Item .web\extension.ts src\extension.ts Move-Item .web\package-lock.json package-lock.json Move-Item .web\package.json package.json Move-Item .web\.vscode .vscode Move-Item .web\web src\web Move-Item .web\tsconfig.json tsconfig.json Move-Item .web\gitTransactions.ts src\gitTransactions.ts Move-Item .web\workspaceClass.ts src\workspace\workspaceClass.ts Move-Item .web\tabLabels.ts src\tabLabels\tabLabels.ts npm clean-install } elseif ( (Test-Path .local\bufferSource.ts) -and (Test-Path .local\fetchSource.ts) -and (Test-Path .local\extension.ts) -and (Test-Path .local\package-lock.json) -and (Test-Path .local\package.json) -and (Test-Path .local\.vscode\extensions.json) -and (Test-Path .local\.vscode\launch.json) -and (Test-Path .local\.vscode\settings.json) -and (Test-Path .local\.vscode\tasks.json) -and (Test-Path .local\tsconfig.json) -and (Test-Path .local\export\exportDocuments.ts) -and (Test-Path .local\export\exportFormView.ts) -and (Test-Path .local\import\importDropProvider.ts) -and (Test-Path .local\import\importFiles.ts) -and (Test-Path .local\import\importFileSystemView.ts) -and (Test-Path .local\import\importFormView.ts) -and (Test-Path .local\importExport\types.ts) -and (Test-Path .local\importExport\exportWorkspace.ts) -and (Test-Path .local\importExport\importWorkspace.ts) -and (Test-Path .local\gitTransactions.ts) -and (Test-Path .local\ttsDebugger\debugger\activateTTSDebug.ts) -and (Test-Path .local\ttsDebugger\debugger\debugAdapter.ts) -and (Test-Path .local\ttsDebugger\debugger\debugExtention.ts) -and (Test-Path .local\ttsDebugger\debugger\ttsDebug.ts) -and (Test-Path .local\ttsDebugger\debugger\ttsRuntime.ts) -and (Test-Path .local\ttsDebugger\debugSession.ts) -and (Test-Path .local\ttsDebugger\tts\tts.ts) -and (Test-Path .local\ttsDebugger\tts\windows.ts) -and (Test-Path .local\ttsDebugger\tts\windowsCommand.ts) -and (Test-Path .local\tabLabels.ts) -and (Test-Path .local\workspaceClass.ts) ) { New-Item -ItemType Directory -Path ".web" -ErrorAction SilentlyContinue Move-Item src\Buffer\bufferSource.ts .web\bufferSource.ts Move-Item src\Fetch\fetchSource.ts .web\fetchSource.ts Move-Item src\extension.ts .web\extension.ts Move-Item package-lock.json .web\package-lock.json Move-Item package.json .web\package.json Move-Item .vscode .web\.vscode Move-Item src\web .web\web Move-Item tsconfig.json .web\tsconfig.json Move-Item src\gitTransactions.ts .web\gitTransactions.ts Move-Item src\workspace\workspaceClass.ts .web\workspaceClass.ts Move-Item src\tabLabels\tabLabels.ts .web\tabLabels.ts Move-Item .local\ttsDebugger src\ttsDebugger Move-Item .local\bufferSource.ts src\Buffer\bufferSource.ts Move-Item .local\fetchSource.ts src\Fetch\fetchSource.ts Move-Item .local\extension.ts src\extension.ts Move-Item .local\package-lock.json package-lock.json Move-Item .local\package.json package.json Move-Item .local\.vscode .vscode Move-Item .local\tsconfig.json tsconfig.json Move-Item .local\export src\export Move-Item .local\import src\import Move-Item .local\importExport src\workspace\importExport Move-Item .local\gitTransactions.ts src\gitTransactions.ts Move-Item .local\workspaceClass.ts src\workspace\workspaceClass.ts Move-Item .local\tabLabels.ts src\tabLabels\tabLabels.ts npm clean-install } else { Write-Host ".local or .web broken :(" }
0
ErrorLogstoHTML.ps1
$a="<style>" $a=$a+"BODY{background-color :#FFFFF}" $a=$a+"TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}" $a=$a+"TH{border-width: 0px;padding: 0px;border-style: solid;border-color: black;background-color: ThreeDShadow}" $a=$a+"TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color: Transparent}" $a=$a+"</style>" $log = Get-EventLog -LogName "Security" -Newest 20 $log = $log | ConvertTo-Html -Property EventID,Category,EntryType,UserName,TimeGenerated,Message -head $a -body "<H2>Restricted Folder Audit Log</H2>" $log | Out-File C:\\PowerShellLog.html -Force
0
1914.ps1
Describe "Get-Culture" -Tags "CI" { It "Should return a type of CultureInfo for Get-Culture cmdlet" { $culture = Get-Culture $culture | Should -BeOfType [CultureInfo] ($culture).EnglishName | Should -BeExactly $host.CurrentCulture.EnglishName Get-Culture -NoUserOverrides | Should -BeOfType [CultureInfo] } It "Should have (Get-Culture).Name variable be equivalent to `$PSCulture" { (Get-Culture).Name | Should -BeExactly $PsCulture } It "Should return the specified culture with '-Name' parameter" { $ci = Get-Culture -Name ru-RU $ci | Should -BeOfType [CultureInfo] $ci.Name | Should -BeExactly "ru-RU" $ci = Get-Culture -Name ru-RU -NoUserOverrides $ci | Should -BeOfType [CultureInfo] $ci.Name | Should -BeExactly "ru-RU" } It "Should return specified cultures with '-Name' parameter" { $ciArray = Get-Culture "", "ru-RU" $ciArray | Should -HaveCount 2 $ciArray[0] | Should -BeOfType [CultureInfo] $ciArray[0].EnglishName | Should -BeExactly "Invariant Language (Invariant Country)" $ciArray[1] | Should -BeOfType [CultureInfo] $ciArray[1].Name | Should -BeExactly "ru-RU" $ciArray[1].EnglishName | Should -BeExactly "Russian (Russia)" } It "Should accept values from a pipeline for '-Name' parameter" { $ciArray = "", "ru-RU" | Get-Culture $ciArray | Should -HaveCount 2 $ciArray[0] | Should -BeOfType [CultureInfo] $ciArray[0].EnglishName | Should -BeExactly "Invariant Language (Invariant Country)" $ciArray[1] | Should -BeOfType [CultureInfo] $ciArray[1].Name | Should -BeExactly "ru-RU" $ciArray[1].EnglishName | Should -BeExactly "Russian (Russia)" } It "Should return the culture array with '-ListAvailable' parameter" { $ciArray = Get-Culture -ListAvailable $ciArray.Count | Should -BeGreaterThan 0 $ciArray[0] | Should -BeOfType [CultureInfo] } It "Should write an error on unsupported culture name" { { Get-Culture -Name "abcdefghijkl" -ErrorAction Stop } | Should -PassThru -Throw -ErrorId "ParameterArgumentValidationError,Microsoft.PowerShell.Commands.GetCultureCommand" } } Describe "`$PSCulture" -Tags "CI" { It "`$PSCulture is the current thread culture" { $PSCulture | Should -BeExactly $([System.Threading.Thread]::CurrentThread.CurrentCulture.Name) } It "`$PSUICulture is the current thread culture" { $PSUICulture | Should -BeExactly $([System.Threading.Thread]::CurrentThread.CurrentUICulture.Name) } It "`$PSCulture follows the current thread culture" { $oldCulture = [CultureInfo]::CurrentCulture $newCulture = "ru-RU" if ($oldCulture -eq "ru-RU") { $newCulture = "fr-FR" } try { [CultureInfo]::currentculture = $newCulture $PSCulture | Should -BeExactly $newCulture $PSCulture | Should -BeExactly $([System.Threading.Thread]::CurrentThread.CurrentCulture.Name) } finally { [CultureInfo]::CurrentCulture = $oldCulture } } It "`$PSUICulture follows the current thread culture" { $oldUICulture = [CultureInfo]::CurrentUICulture $newUICulture = "ru-RU" if ($oldUICulture -eq "ru-RU") { $newUICulture = "fr-FR" } try { [CultureInfo]::CurrentUICulture = $newUICulture $PSUICulture | Should -BeExactly $newUICulture $PSUICulture | Should -BeExactly $([System.Threading.Thread]::CurrentThread.CurrentUICulture.Name) } finally { [CultureInfo]::CurrentUICulture = $oldUICulture } } }
0
IP Scan_Local User admin.ps1
# The trigger $obj = New-Object system.Net.NetworkInformation.Ping 100..200 | % { $ip = "10.1.1.$_" $ping = $obj.send($ip,100) write-host "." -noNewLine if ($ping.status -eq "Success"){ C:\\Powershell\\Finduser.ps1 $ping.address.ipaddresstostring }} #-------------------------------- # Finduser.ps1 param ( [string]$strcomputer, [switch]$delete) $computer = [ADSI]("WinNT://" + $strComputer + ",computer") $Users = $computer.psbase.children |where{$_.psbase.schemaclassname -eq "User"} foreach ($member in $Users.psbase.syncroot){ if ($member.name -eq "username"){ write-host Found user! $computer.name if ($delete){ write-host Deleting... .\\set-localaccount.ps1 -UserName username -remove -computerName $computer.name } } } #-------------------------------- # set-localaccount.ps1 ################################################################################## # # Script name: Set-LocalAccount.ps1 # Author: niklas.goude@zipper.se # Homepage: www.powershell.nu # ################################################################################## param([string]$UserName, [string]$Password, [switch]$Add, [switch]$Remove, [switch]$ResetPassword, [switch]$help, [string]$computername) function GetHelp() { $HelpText = @" DESCRIPTION: NAME: Set-LocalAccount.ps1 Adds or Removes a Local Account PARAMETERS: -UserName Name of the User to Add or Remove (Required) -Password Sets Users Password (optional) -Add Adds Local User (Optional) -Remove Removes Local User (Optional) -ResetPassword Resets Local User Password (Optional) -help Prints the HelpFile (Optional) SYNTAX: .\\Set-LocalAccount.ps1 -UserName nika -Password Password1 -Add Adds Local User nika and sets Password to Password1 .\\Set-LocalAccount.ps1 -UserName nika -Remove Removes Local User nika .\\Set-LocalAccount.ps1 -UserName nika -Password Password1 -ResetPassword Sets Local User nika's Password to Password1 .\\Set-LocalAdmin.ps1 -help Displays the helptext "@ $HelpText } function AddRemove-LocalAccount ([string]$UserName, [string]$Password, [switch]$Add, [switch]$Remove, [switch]$ResetPassword, [string]$computerName) { if($Add) { [string]$ConnectionString = "WinNT://$computerName" $ADSI = [adsi]$ConnectionString $User = $ADSI.Create("user",$UserName) $User.SetPassword($Password) $User.SetInfo() } if($Remove) { [string]$ConnectionString = "WinNT://$computerName" $ADSI = [adsi]$ConnectionString $ADSI.Delete("user",$UserName) } if($ResetPassword) { [string]$ConnectionString = "WinNT://" + $ComputerName + "/" + $UserName + ",user" $Account = [adsi]$ConnectionString $Account.psbase.invoke("SetPassword", $Password) } } if($help) { GetHelp; Continue } if($UserName -AND $Password -AND $Add -AND !$ResetPassword) { AddRemove-LocalAccount -UserName $UserName -Password $Password -Add -computerName $computerName} if($UserName -AND $Password -AND $ResetPassword) { AddRemove-LocalAccount -UserName $UserName -Password $Password -ResetPassword -computerName $computerName} if($UserName -AND $Remove) { AddRemove-LocalAccount -UserName $UserName -Remove -computerName $computerName}
0
299.ps1
function Unregister-PSFCallback { [CmdletBinding(DefaultParameterSetName = 'Name')] param ( [Parameter(Mandatory = $true, ParameterSetName = 'Name')] [string[]] $Name, [Parameter(ValueFromPipeline = $true, ParameterSetName = 'Object', Mandatory = $true)] [PSFramework.FlowControl.Callback[]] $Callback ) process { foreach ($callbackItem in $Callback) { [PSFramework.FlowControl.CallbackHost]::Remove($callbackItem) } foreach ($nameString in $Name) { foreach ($callbackItem in ([PSFramework.FlowControl.CallbackHost]::Get($nameString, $false))) { if ($callbackItem.Name -ne $nameString) { continue } [PSFramework.FlowControl.CallbackHost]::Remove($callbackItem) } } } }
0
4182.ps1
[CmdletBinding()] param () function Get-RelativePath { [CmdletBinding()][OutputType([string])] param () $Path = (split-path $SCRIPT:MyInvocation.MyCommand.Path -parent) + "\" Return $Path } $RelativePath = Get-RelativePath $InstalledVersion = [string]((Get-WmiObject Win32_BIOS).SMBIOSBIOSVersion) $Model = ((Get-WmiObject Win32_ComputerSystem).Model).split(" ")[1] [string]$BIOSVersion = (Get-ChildItem -Path $RelativePath | Where-Object { $_.Name -eq $Model } | Get-ChildItem -Filter *.exe) $BIOSVersion = ($BIOSVersion.split("-")[1]).split(".")[0] If ($BIOSVersion -eq $InstalledVersion) { Exit 0 } else { Exit 5 }
0
sample_28_29.ps1
function New-AzDataProtectionRestoreConfigurationClientObject{ [OutputType('PSObject')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates new restore configuration object')] param( [Parameter(Mandatory, HelpMessage='Datasource Type')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] [ValidateSet('AzureKubernetesService')] ${DatasourceType}, [Parameter(Mandatory=$false, HelpMessage='List of resource types to be excluded for restore')] [System.String[]] ${ExcludedResourceType}, [Parameter(Mandatory=$false, HelpMessage='List of resource types to be included for restore')] [System.String[]] ${IncludedResourceType}, [Parameter(Mandatory=$false, HelpMessage='List of namespaces to be excluded for restore')] [System.String[]] ${ExcludedNamespace}, [Parameter(Mandatory=$false, HelpMessage='List of namespaces to be included for restore')] [System.String[]] ${IncludedNamespace}, [Parameter(Mandatory=$false, HelpMessage='List of labels for internal filtering for restore')] [System.String[]] ${LabelSelector}, [Parameter(Mandatory=$false, HelpMessage='Boolean parameter to decide whether cluster scope resources are included for restore. By default this is taken as true.')] [Nullable[System.Boolean]] ${IncludeClusterScopeResource}, [Parameter(Mandatory=$false, HelpMessage='Conflict policy for restore. Allowed values are Skip, Patch. Default value is Skip')] [System.String] [ValidateSet('Skip','Patch')] ${ConflictPolicy}, [Parameter(Mandatory=$false, HelpMessage='Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster.')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.KubernetesClusterRestoreCriteriaNamespaceMappings] ${NamespaceMapping}, [Parameter(Mandatory=$false, HelpMessage='Restore mode for persistent volumes. Allowed values are RestoreWithVolumeData, RestoreWithoutVolumeData. Default value is RestoreWithVolumeData')] [System.String] [ValidateSet('RestoreWithVolumeData','RestoreWithoutVolumeData')] ${PersistentVolumeRestoreMode}, [Parameter(Mandatory=$false, HelpMessage='Hook reference to be executed during restore.')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.NamespacedNameResource[]] ${RestoreHookReference} ) process { $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.KubernetesClusterRestoreCriteria]::new() $restoreCriteria.ObjectType = "KubernetesClusterRestoreCriteria" $restoreCriteria.ExcludedResourceType = $ExcludedResourceType $restoreCriteria.IncludedResourceType = $IncludedResourceType $restoreCriteria.ExcludedNamespace = $ExcludedNamespace $restoreCriteria.IncludedNamespace = $IncludedNamespace $restoreCriteria.LabelSelector = $LabelSelector $restoreCriteria.NamespaceMapping = $NamespaceMapping $restoreCriteria.RestoreHookReference = $RestoreHookReference if($IncludeClusterScopeResource -ne $null) { $restoreCriteria.IncludeClusterScopeResource = $IncludeClusterScopeResource } else { $restoreCriteria.IncludeClusterScopeResource = $true } if($ConflictPolicy -ne "") { $restoreCriteria.ConflictPolicy = $ConflictPolicy } else { $restoreCriteria.ConflictPolicy = "Skip" } if($PersistentVolumeRestoreMode -ne "") { $restoreCriteria.PersistentVolumeRestoreMode = $PersistentVolumeRestoreMode } else { $restoreCriteria.PersistentVolumeRestoreMode = "RestoreWithVolumeData" } $restoreCriteria } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAH+iALtnqksuQJ # BV23pr8BK7MMGbsq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VBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB4NT8 # HxMVH35dAAEAAAHgMCIEII54AP2h7Vh7o+D/3jGv808eKZ8LrGHgQ+q5KtqbazFB # MA0GCSqGSIb3DQEBCwUABIICAAyBWP2rphh+1b9GvRaRXrkANehDW4m4UYsawdeS # GccHFr/5HJlPXUp/PJJFC6MyJncgdAtn3UI2UgFz7sHLoCq9ufil0DqRrNmo5G4J # p67pLImVCMJKh4GSpm962BJzs01KM4qY7KQDOjkZHISbMHuJFqBRnyDQhjUsSFek # Es0VIAriIMHhCH3whnX3Xnaa3MquWU7wYzxuzcQyV8PYfzR94MeKk52+KIa9KbBd # gepfaS/8DEn+Bnqf3P8AOkOPTJjxO64fmUynPAqp6YetDmKZaaHFWG9u+XkYKjJX # R1MC6dLk6s7ktdKvPKh2N47M+T18S6Afh1z1Qrp0fuaUlm0AvEo7cfST14MugPgN # LFYln12AzNGwtua1unwOZxXxX86Dhc/T6CQwuX8+8kKcyp0WLYfKLaxt9dQnJZ9K # uKUbRoCMzTinM8kYxOGAbByLsXkZlT5klKtZUKx8MdPjwHtgY5xpEJBEyInDjfHI # Zhd4eVfdkA9rUnA7wg2Z2eq62jwLdLylDf3N/U87FKVK6N6JIGcoUghDYB0tPh/z # jHrzhYyxT7vIzHaUcqP3ZMUj9UiUXHsJO41tGxTy3yz2ot9W9CzQlnJXuu78VSbl # AIonmdFzA/ivoH+yUeG3bfjBFi6sz3AA9s/7TQLcDbiHMI43S/dIxLrwTJ4EnS2d # L9lM # SIG # End signature block
0
sample_31_69.ps1
@{ GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Start-Transcript", "Stop-Transcript" AliasesToExport = @() NestedModules="Microsoft.PowerShell.ConsoleHost.dll" HelpInfoURI = 'https://aka.ms/powershell73-help' } # SIG # Begin signature block # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAafI9Gy/Jba/h5 # P4E+2b0zPlBjhQyHNjAYnPqkeCyjq6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBjXGlYJcUj6RAzXyeNAN # xSpKXAGd7Fh+ocGHPPphcD9LQTOJgG7Y7aYztHqBLJiQQ4eAgZNU4ac6+8LnEGAL # go1ydC5BJEuJQjYKbNTy959HrKSu7LO3Ws0w8jw6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GFj # SIG # End signature block
0
Find Local Group Members_10.ps1
# Author: Hal Rottenberg # Purpose: Find matching members in a local group # Used tip from RichS here: http://powershellcommunity.org/Forums/tabid/54/view/topic/postid/1528/Default.aspx # Change these two to suit your needs $ChildGroups = "Domain Admins", "Group Two" $LocalGroup = "Administrators" $MemberNames = @() # uncomment this line to grab list of computers from a file # $Servers = Get-Content serverlist.txt $Servers = $env:computername # for testing on local computer foreach ( $Server in $Servers ) { # Put $MemberNames = @() here to clear out the MemberNames variable between servers, otherwise we start to get incorrect results $MemberNames = @() $Group= [ADSI]"WinNT://$Server/$LocalGroup,group" $Members = @($Group.psbase.Invoke("Members")) $Members | ForEach-Object { $MemberNames += $_.GetType().InvokeMember("Name", 'GetProperty', $null, $_, $null) } $ChildGroups | ForEach-Object { $output = "" | Select-Object Server, Group, InLocalAdmin $output.Server = $Server $output.Group = $_ $output.InLocalAdmin = $MemberNames -contains $_ Write-Output $output } }
0
556.ps1
function Add-SPOPrincipalToGroup { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$username, [Parameter(Mandatory=$true, Position=1)] [string]$groupname ) process { Write-Host "Adding principal with username $username to group $groupname" -foregroundcolor black -backgroundcolor yellow $principal = Get-SPOPrincipal -username $username $group = Get-SPOGroup -name $groupname $userExists = $group.Users.GetById($principal.Id) $clientContext.Load($userExists) try { $clientContext.ExecuteQuery() Write-Host "Principal already added to the group" -foregroundcolor black -backgroundcolor yellow } catch { $addedPrincipal = $group.Users.AddUser($principal) $clientContext.Load($addedPrincipal) $clientContext.ExecuteQuery() Write-Host "Succesfully added principal to the group" -foregroundcolor black -backgroundcolor green } } }
0
sample_56_10.ps1
parameters: - name: federatedServiceConnection type: string - name: outputVariableName type: string # Resource to get a token for. Common values include: # - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps # - 'https://storage.azure.com/' for storage # Defaults to Azure DevOps - name: resource type: string default: '499b84ac-1321-427f-aa17-267ca6975798' steps: - task: AzureCLI@2 displayName: 'Getting federated access token for feeds' inputs: azureSubscription: ${{ parameters.federatedServiceConnection }} scriptType: 'pscore' scriptLocation: 'inlineScript' inlineScript: | $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv if ($LASTEXITCODE -ne 0) { Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" exit 1 } Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken"
0
sample_47_53.ps1
# dot-source all function files Get-ChildItem -Path $PSScriptRoot | Unblock-File Get-ChildItem -Path $PSScriptRoot\*.ps1 -Exclude ServiceFabricSDK.ps1 | Foreach-Object{ . $_.FullName } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCeVayTDbx/PyBx # baOMgUQwBzc+KceGUCG0TFLzjeudsqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GC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b3 # UNzEkfe63BhgTdWPxNOzSYG0cIv1kg7L+izE553Lcuax3mY3m+6pHcRu/hBHsUO4 # vg7ky6+1a3RsmQOaDiXFIs78sqgIzbJls9+i2z9vay9afDAkFabGrV13KQvXMtIL # 4dztYGsR2Cg7bvdNYFlriXHKajgpLsCBu/+QDWVKddt8ifS+UeNoliz3f6vcReUS # EMfg3NAY0vD8koxmLaU1ijsTVE2YGQXiBTRFxyQi9TB61XQH49df0GZdehihJMhp # M+k66a5PEBwZLNiJI7bxlxD8zwGrms5YgKdILTF739jhGAa5oIcPAs4TJNuyOk25 # SdXX # SIG # End signature block
0
f5a3c50b-0ede-4fca-ae08-d97b3e9694f1.ps1
function Start-ISE () { <# .synopsis Load some file into ISE .Description Load some file into ISE .Parameter fileObjOrFileName file to be loaded .ReturnValue $null .Notes Author: bernd kriszio e-mail: bkriszio@googlemail.com Created: 2008-12-28 Requires: V2 CTP 3 Todo: I do not see the solution using advanced functions for a variable number of arguments Start-ISE .\\foo.ps1 .\\bar.ps1 fails. .Example Start-ISE $profile get-childitem *.ps1 | Start-ise 'foo.ps1', 'bar.ps1' | Start-ise #> param( [Parameter(Position = 0, Mandatory=$false, ValueFromPipeline=$True)] $fileObjOrFileName ) PROCESS { if ($fileObjOrFileName -ne $null){ if ($fileObjOrFileName.gettype().Name -eq 'FileInfo'){ & "$PSHome/powershell_ise.exe" $fileObjOrFileName.Fullname } elseif ($fileObjOrFileName.gettype().Name -eq 'String') { & "$PSHome/powershell_ise.exe" "$(pwd)\\$fileObjOrFileName" } } } <# End{ foreach ($file in $args) { if ($file.gettype().Name -eq 'FileInfo'){ & "$PSHome/powershell_ise.exe" $file.Fullname } elseif ($file.gettype().Name -eq 'String') { & "$PSHome/powershell_ise.exe" "$(pwd)\\$file" } } } #> }
0
sample_29_68.ps1
{ "Vitest Describe": { "prefix": "videscribe", "body": [ "describe('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest Describe" }, "Vitest Describe - Concurrent": { "prefix": "videscribe-concurrent", "body": [ "describe.concurrent('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest Describe Concurrent" }, "Vitest It": { "prefix": "viit", "body": [ "it('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest It" }, "Vitest It - Concurrent": { "prefix": "viit-concurrent", "body": [ "it.concurrent('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest It Concurrent" }, "Vitest It - Async": { "prefix": "viit-async", "body": [ "it('${1:name}', async () => {", "\t${0}", "})" ], "description": "Vitest It Async" }, "Vitest It - Async Concurrent": { "prefix": "viit-async-concurrent", "body": [ "it.concurrent('${1:name}', async () => {", "\t${0}", "})" ], "description": "Vitest It Async Concurrent" }, "Vitest It - Todo": { "prefix": "viit-todo", "body": [ "it.todo('${1:name}', () => {})" ], "description": "Vitest It Todo" }, "Vitest Test": { "prefix": "vitest", "body": [ "test('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest Test" }, "Vitest Test - Concurrent": { "prefix": "vitest-concurrent", "body": [ "test.concurrent('${1:name}', () => {", "\t${0}", "})" ], "description": "Vitest Test Concurrent" }, "Vitest Test - Async": { "prefix": "vitest-async", "body": [ "test('${1:name}', async () => {", "\t${0}", "})" ], "description": "Vitest Test Async" }, "Vitest Test - Async Concurrent": { "prefix": "vitest-async-concurrent", "body": [ "test.concurrent('${1:name}', async () => {", "\t${0}", "})" ], "description": "Vitest Test Async Concurrent" }, "Vitest Test - Todo": { "prefix": "vitest-todo", "body": [ "test.todo('${1:name}', () => {})" ], "description": "Vitest Test Todo" }, "Vitest Match Snapshot": { "prefix": "visnapshot", "body": [ "expect(${0}).toMatchSnapshot()" ], "description": "Vitest Match Snapshot" }, "Vitest Match Snapshot - Inline": { "prefix": "visnapshot-inline", "body": [ "expect(${0}).toMatchInlineSnapshot()" ], "description": "Vitest Match Inline Snapshot" }, "Vitest Base": { "prefix": "vibase", "body": [ "// @vitest-environment node", "import { describe, expect } from 'vitest'", "", "describe('${TM_FILENAME/\\..*//}', () => {", "\t${0}", "})" ], "description": "Base for Vitest file" }, }
0
SynchronizationScript.ps.ps1
#------- Get-SPServiceContext function Get-SPServiceContext([Microsoft.SharePoint.Administration.SPServiceApplication]$profileApp) { if($profileApp -eq $null) { #----- Get first User Profile Service Application $profileApp = @(Get-SPServiceApplication | ? { $_.TypeName -eq "User Profile Service Application" })[0] } return [Microsoft.SharePoint.SPServiceContext]::GetContext( $profileApp.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default) } $serviceContext= Get-SPServiceContext $configManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($serviceContext) if($configManager.IsSynchronizationRunning() -eq $false) { $configManager.StartSynchronization($true) Write-Host "Started Synchronizing" } else { Write-Host "Already Synchronizing" }
0
sample_35_75.ps1
(self.webpackChunkshell_app=self.webpackChunkshell_app||[]).push([[179,429],{4174:(W,F,d)=>{"use strict";d.d(F,{X:()=>f});var u=d(8714);let f=(()=>{class s{static themeStorageKey="msft.sme.shell-assetManager-theme";static defaultTheme="light";static darkTheme="dark";static assets;static get theme(){const c=MsftSme.LocalStorageHandler.getItem(s.themeStorageKey);return s.ensureValidTheme(c)}static set theme(c){c=s.ensureValidTheme(c),MsftSme.LocalStorageHandler.setItem(s.themeStorageKey,c),u.R.assetManager.setTheme(c)}static getBaseLocationPath(c,N=!0){const m=MsftSme.self();return`${m.Host.isWeb||"http:"===location.protocol?window.location.origin:m.Environment.loadPath}/${c}${N?`?v=${m.Environment.version}`:""}`}static getAssetLocationPath(c){return this.getBaseLocationPath(`assets/styles/${c}`)}static getLibraryLocationPath(c){return this.getBaseLocationPath(`external/${c}`,!1)}static initialize(c){u.R.localizationManager.getLocaleId();const m=MsftSme.getLocationSearchParameter("theme");m&&(s.theme=m.value),s.configureWithBrowserTheme(),s.assets={css:[s.getAssetLocationPath("fonts.css")],cssV2:[s.getAssetLocationPath("fonts.css")],js:[]},u.R.assetManager.loadAssets(s.theme,s.assets);const E=MsftSme.self();E.Resources.assets.css.push(s.getAssetLocationPath("main.css")),E.Resources.assets.cssV2.push(s.getAssetLocationPath("main-v2.css")),E.Resources.assets.js.push(),E.Resources.lib={monaco:{"0.17.1":this.getLibraryLocationPath("monaco/0.17.1/vs"),"0.36.1":this.getLibraryLocationPath("monaco/0.36.1/vs")},jsll:{"4.2.18":this.getLibraryLocationPath("jsll/4.2.18/")}}}static ensureValidTheme(c){const N=[s.defaultTheme,s.darkTheme];return(MsftSme.isNullOrWhiteSpace(c)||N.every(m=>m!==c))&&(c=s.defaultTheme),c}static configureWithBrowserTheme(){!MsftSme.LocalStorageHandler.getItem(s.themeStorageKey)&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(s.theme=s.darkTheme)}}return s})()},3905:(W,F,d)=>{"use strict";d.d(F,{c:()=>u});class u{static get element(){return document.getElementById("sme-splash")}static get progress(){return document.getElementById("sme-splash-progress")}static get message(){return document.getElementById("sme-splash-message")}static get errorElement(){return document.getElementById("sme-splash-error")}static get errorResponse(){return document.getElementById("sme-splash-error-response-message")}static setProgressValue(s,b){if(u.progress){const c=Number(s);if(isNaN(c))return;const N=Number(u.progress.getAttribute("value"));if(!isNaN(N)&&c<N)return;u.progress.setAttribute("value",s),u.progress.setAttribute("aria-valuenow",s),u.message.innerText=b}}static complete(){if(!u.element)return;const s=MsftSme.getStrings();u.setProgressValue("100",s.MsftSmeShell.App.Splash.Messages.applicationReady),u.element.remove()}static aadSsoError(s){u.element&&(u.errorElement.style.display="inline",u.message.style.display="none",u.errorResponse.innerHTML=s)}}},3054:(W,F,d)=>{"use strict";var u;d.d(F,{B:()=>u}),function(f){let s,b,c,N;var m;f.module="Microsoft.SME.Shell",f.resourceName="MsftSmeShell",f.powerShellPrefix="WACSH",f.Get_CimWin32OperatingSystem={command:"Get-CimWin32OperatingSystem",script:"##Get-CimWin32OperatingSystem##:Get-CimWin32OperatingSystem.ps1\nimport-module CimCmdlets\nGet-CimInstance -Namespace root/cimv2 -ClassName Win32_OperatingSystem\n"},(s=f.Internal||(f.Internal={})).Get_SystemLockdownPolicy={command:"Get-SystemLockdownPolicy",script:"##Get-SystemLockdownPolicy##:Get-SystemLockdownPolicy.ps1\nreturn [System.Management.Automation.Security.SystemPolicy]::GetSystemLockdownPolicy().ToString()\n"},(m=b=f.Azure||(f.Azure={})).Set_AzureHybridManagement={command:"Set-AzureHybridManagement",script:'##Set-AzureHybridManagement##:Set-AzureHybridManagement.ps1\nparam (\n[Parameter(Mandatory = $true)]\n[String]\n$subscriptionId,\n[Parameter(Mandatory = $true)]\n[String]\n$resourceGroup,\n[Parameter(Mandatory = $true)]\n[String]\n$tenantId,\n[Parameter(Mandatory = $true)]\n[String]\n$azureRegion,\n[Parameter(Mandatory = $true)]\n[boolean]\n$useProxyServer,\n[Parameter(Mandatory = $false)]\n[String]\n$proxyServerIpAddress,\n[Parameter(Mandatory = $false)]\n[String]\n$proxyServerIpPort,\n[Parameter(Mandatory = $true)]\n[string]\n$authToken,\n[Parameter(Mandatory = $true)]\n[string]\n$correlationId\n)\nSet-StrictMode -Version 5.0\nfunction setupScriptEnv() {\nSet-Variable -Name LogName -Option ReadOnly -Value "Microsoft-ServerManagementExperience" -Scope Script\nSet-Variable -Name LogSource -Option ReadOnly -Value "SMEScript" -Scope Script\nSet-Variable -Name ScriptName -Option ReadOnly -Value "Set-HybridManagement.ps1" -Scope Script\nSet-Variable -Name Machine -Option ReadOnly -Value "Machine" -Scope Script\nSet-Variable -Name HybridAgentFile -Option ReadOnly -Value "AzureConnectedMachineAgent.msi" -Scope Script\nSet-Variable -Name HybridAgentPackageLink -Option ReadOnly -Value "https://aka.ms/AzureConnectedMachineAgent" -Scope Script\nSet-Variable -Name HybridAgentExecutable -Option ReadOnly -Value "$env:ProgramFiles\\AzureConnectedMachineAgent\\azcmagent.exe" -Scope Script\nSet-Variable -Name HttpsProxy -Option ReadOnly -Value "https_proxy" -Scope Script\n}\nfunction cleanupScriptEnv() {\nRemove-Variable -Name LogName -Scope Script -Force\nRemove-Variable -Name LogSource -Scope Script -Force\nRemove-Variable -Name ScriptName -Scope Script -Force\nRemove-Variable -Name Machine -Scope Script -Force\nRemove-Variable -Name HybridAgentFile -Scope Script -Force\nRemove-Variable -Name HybridAgentPackageLink -Scope Script -Force\nRemove-Variable -Name HybridAgentExecutable -Scope Script -Force\nRemove-Variable -Name HttpsProxy -Scope Script -Force\n}\nfunction main(\n[string]$subscriptionId,\n[string]$resourceGroup,\n[string]$tenantId,\n[string]$azureRegion,\n[boolean]$useProxyServer,\n[string]$proxyServerIpAddress,\n[string]$proxyServerIpPort,\n[string]$authToken,\n[string]$correlationId\n) {\n$err = $null\n$args = @{}\nInvoke-WebRequest -Uri $HybridAgentPackageLink -OutFile $HybridAgentFile -ErrorAction SilentlyContinue -ErrorVariable +err\nif ($err) {\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Error `\n-Message "[$ScriptName]:Couldn\'t download the hybrid management package. Error: $err" -ErrorAction SilentlyContinue\nWrite-Error @($err)[0]\nreturn @()\n}\nmsiexec /i $HybridAgentFile /l*v installationlog.txt /qn | Out-String -ErrorAction SilentlyContinue -ErrorVariable +err\nif ($err) {\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Error `\n-Message "[$ScriptName]:Error while installing the hybrid agent package. Error: $err" -ErrorAction SilentlyContinue\nWrite-Error @($err)[0]\nreturn @()\n}\nif ($useProxyServer) {\n[System.Environment]::SetEnvironmentVariable($HttpsProxy, $proxyServerIpAddress+\':\'+$proxyServerIpPort, $Machine)\n$env:https_proxy = [System.Environment]::GetEnvironmentVariable($HttpsProxy, $Machine)\n}\n& $HybridAgentExecutable connect --resource-group $resourceGroup --tenant-id $tenantId --location $azureRegion `\n--subscription-id $subscriptionId --access-token $authToken --correlation-id $correlationId\nRestart-Service -Name himds -ErrorAction SilentlyContinue -ErrorVariable +err\nif ($err) {\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Error `\n-Message "[$ScriptName]:Couldn\'t restart the himds service. Error: $err" -ErrorAction SilentlyContinue\nWrite-Error @($err)[0]\nreturn $err\n}\n}\nsetupScriptEnv\ntry {\nMicrosoft.PowerShell.Management\\New-EventLog -LogName $LogName -Source $LogSource -ErrorAction SilentlyContinue\nreturn main $subscriptionId $resourceGroup $tenantId $azureRegion $useProxyServer $proxyServerIpAddress $proxyServerIpPort $authToken $correlationId\n} finally {\ncleanupScriptEnv\n}\n'},m.Test_ScriptCanBeRun={command:"Test-ScriptCanBeRun",script:"##Test-ScriptCanBeRun##:Test-ScriptCanBeRun.ps1\nparam(\n[Parameter(Mandatory = $True)]\n[string]\n$nodeName\n)\nreturn @{ ScriptCanRun = $true }\n"},function(m){m.Disable_CredSspClientRole={command:"Disable-CredSspClientRole",script:'##Disable-CredSspClientRole##:Disable-CredSspClientRole.ps1\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable -Name WsManApplication -Option ReadOnly -Scope Script -Value "wsman"\nSet-Variable -Name CredSSPClientAuthPath -Option ReadOnly -Scope Script -Value "localhost\\Client\\Auth\\CredSSP"\n}\nfunction cleanupScriptEnv() {\nRemove-Variable -Name WsManApplication -Scope Script -Force\nRemove-Variable -Name CredSSPClientAuthPath -Scope Script -Force\n}\nfunction getCredSSPClientEnabled() {\n$path = "{0}:\\{1}" -f $WsManApplication, $CredSSPClientAuthPath\n$credSSPClientEnabled = $false;\n$credSSPClientService = Get-Item $path -ErrorAction SilentlyContinue\nif ($credSSPClientService) {\n$credSSPClientEnabled = [System.Convert]::ToBoolean($credSSPClientService.Value)\n}\nreturn $credSSPClientEnabled\n}\nfunction disableCredSSP() {\n$err = $null\n$result = Disable-WSManCredSSP -Role Client -ErrorAction SilentlyContinue -ErrorVariable +err\nreturn $err\n}\nfunction main() {\nsetupScriptEnv\ntry {\nif (getCredSSPClientEnabled) {\n$err = disableCredSSP\nif ($err) {\nif (getCredSSPClientEnabled) {\nthrow @($err)[0]\n}\n}\n}\n} catch {\nWrite-Error $_.Exception.Message\nthrow $_.Exception.Message\n} finally {\ncleanupScriptEnv\n}\nreturn $true\n}\n$results = $null\nif (-not ($env:pester)) {\n$results = main\n}\nreturn $results\n'},m.Disable_CredSspManagedServer={command:"Disable-CredSspManagedServer",script:'##Disable-CredSspManagedServer##:Disable-CredSspManagedServer.ps1\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction getCredSSPClientEnabled() {\nSet-Variable credSSPClientPath -Option Constant -Value "WSMan:\\localhost\\Client\\Auth\\CredSSP" -ErrorAction SilentlyContinue\n$credSSPClientEnabled = $false;\n$credSSPClientService = Get-Item $credSSPClientPath -ErrorAction SilentlyContinue\nif ($credSSPClientService) {\n$credSSPClientEnabled = [System.Convert]::ToBoolean($credSSPClientService.Value)\n}\nreturn $credSSPClientEnabled\n}\nfunction disableCredSSPClientRole() {\n$err = $null\n$result = Disable-WSManCredSSP -Role Client -ErrorAction SilentlyContinue -ErrorVariable +err\nreturn $err\n}\nfunction disableCredSSPClient() {\nif (-not (getCredSSPClientEnabled)) {\nreturn $null\n}\n$err = disableCredSSPClientRole\nif ($err) {\nif (-not (getCredSSPClientEnabled)) {\nreturn $null\n}\nreturn $err\n}\nreturn $null\n}\nfunction getCredSSPServerEnabled() {\nSet-Variable credSSPServicePath -Option Constant -Value "WSMan:\\localhost\\Service\\Auth\\CredSSP" -ErrorAction SilentlyContinue\n$credSSPServerEnabled = $false;\n$credSSPServerService = Get-Item $credSSPServicePath -ErrorAction SilentlyContinue\nif ($credSSPServerService) {\n$credSSPServerEnabled = [System.Convert]::ToBoolean($credSSPServerService.Value)\n}\nreturn $credSSPServerEnabled\n}\nfunction disableCredSSPServerRole() {\n$err = $null\n$result = Disable-WSManCredSSP -Role Server -ErrorAction SilentlyContinue -ErrorVariable +err\nreturn $err\n}\nfunction disableCredSSPServer() {\nif (-not (getCredSSPServerEnabled)) {\nreturn $null\n}\n$err = disableCredSSPServerRole\nif ($err) {\nif (-not (getCredSSPServerEnabled)) {\nreturn $null\n}\nreturn $err\n}\nreturn $null\n}\nfunction main() {\n$err = disableCredSSPServer\nif ($err) {\nthrow $err\n}\n$err = disableCredSSPClient\nif ($err) {\nthrow $err\n}\nreturn $true\n}\nif (-not ($env:pester)) {\nreturn main\n}\n'},m.Enable_CredSSPClientRole={command:"Enable-CredSSPClientRole",script:'##Enable-CredSSPClientRole##:Enable-CredSSPClientRole.ps1\nparam (\n[Parameter(Mandatory=$True)]\n[string[]]$serverNames\n)\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable -Name WsManApplication -Option ReadOnly -Scope Script -Value "wsman"\nSet-Variable -Name CredSSPClientAuthPath -Option ReadOnly -Scope Script -Value "localhost\\Client\\Auth\\CredSSP"\nSet-Variable -Name CredentialsDelegationPolicyPath -Option ReadOnly -Scope Script -Value "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CredentialsDelegation"\nSet-Variable -Name AllowFreshCredentialsPath -Option ReadOnly -Scope Script -Value "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CredentialsDelegation\\AllowFreshCredentials"\nSet-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPath -Option ReadOnly -Scope Script -Value "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CredentialsDelegation\\AllowFreshCredentialsWhenNTLMOnly"\nSet-Variable -Name AllowFreshCredentialsPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentials"\nSet-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentialsWhenNTLMOnly"\nSet-Variable -Name TypeAlreadyExistsHResult -Option ReadOnly -Scope Script -Value -2146233088\n Set-Variable -Name NativeCode -Option ReadOnly -Scope Script -Value @"\n using Microsoft.Win32;\n using System;\n using System.Collections.Generic;\n using System.Globalization;\n using System.Linq;\n using System.Runtime.InteropServices;\n using System.Text;\n using System.Threading;\n \n namespace SME\n {\n public static class LocalGroupPolicy\n {\n [Guid("EA502722-A23D-11d1-A7D3-0000F87571E3")]\n [ComImport]\n [ClassInterface(ClassInterfaceType.None)]\n public class GPClass\n {\n }\n \n [ComImport, Guid("EA502723-A23D-11d1-A7D3-0000F87571E3"),\n InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\n public interface IGroupPolicyObject\n {\n void New(\n [MarshalAs(UnmanagedType.LPWStr)] string pszDomainName,\n [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName,\n uint dwFlags);\n \n void OpenDSGPO(\n [MarshalAs(UnmanagedType.LPWStr)] string pszPath,\n uint dwFlags);\n \n void OpenLocalMachineGPO(uint dwFlags);\n \n void OpenRemoteMachineGPO(\n [MarshalAs(UnmanagedType.LPWStr)] string pszComputerName,\n uint dwFlags);\n \n void Save(\n [MarshalAs(UnmanagedType.Bool)] bool bMachine,\n [MarshalAs(UnmanagedType.Bool)] bool bAdd,\n [MarshalAs(UnmanagedType.LPStruct)] Guid pGuidExtension,\n [MarshalAs(UnmanagedType.LPStruct)] Guid pGuid);\n \n void Delete();\n \n void GetName(\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName,\n int cchMaxLength);\n \n void GetDisplayName(\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName,\n int cchMaxLength);\n \n void SetDisplayName(\n [MarshalAs(UnmanagedType.LPWStr)] string pszName);\n \n void GetPath(\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath,\n int cchMaxPath);\n \n void GetDSPath(\n uint dwSection,\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath,\n int cchMaxPath);\n \n void GetFileSysPath(\n uint dwSection,\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath,\n int cchMaxPath);\n \n IntPtr GetRegistryKey(uint dwSection);\n \n uint GetOptions();\n \n void SetOptions(uint dwOptions, uint dwMask);\n \n void GetMachineName(\n [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName,\n int cchMaxLength);\n \n uint GetPropertySheetPages(out IntPtr hPages);\n }\n \n private const int GPO_OPEN_LOAD_REGISTRY = 1;\n private const int GPO_SECTION_MACHINE = 2;\n private const string ApplicationName = @"wsman";\n private const string AllowFreshCredentials = @"AllowFreshCredentials";\n private const string AllowFreshCredentialsWhenNTLMOnly = @"AllowFreshCredentialsWhenNTLMOnly";\n private const string ConcatenateDefaultsAllowFresh = @"ConcatenateDefaults_AllowFresh";\n private const string PathCredentialsDelegationPath = @"SOFTWARE\\Policies\\Microsoft\\Windows";\n private const string GPOpath = @"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy Objects";\n private const string Machine = @"Machine";\n private const string CredentialsDelegation = @"\\CredentialsDelegation";\n private const string PoliciesPath = @"Software\\Policies\\Microsoft\\Windows";\n private const string BackSlash = @"\\";\n \n public static string EnableAllowFreshCredentialsPolicy(string[] serverNames, bool hasNTLMOnlyUpdateBeenMade)\n {\n if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)\n {\n return EnableAllowFreshCredentialsPolicyImpl(serverNames, hasNTLMOnlyUpdateBeenMade);\n }\n else\n {\n string value = null;\n \n var thread = new Thread(() =>\n {\n value = EnableAllowFreshCredentialsPolicyImpl(serverNames, hasNTLMOnlyUpdateBeenMade);\n });\n \n thread.SetApartmentState(ApartmentState.STA);\n thread.Start();\n thread.Join();\n \n return value;\n }\n }\n \n public static string RemoveServersFromAllowFreshCredentialsPolicy(string[] serverNames)\n {\n if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)\n {\n return RemoveServersFromAllowFreshCredentialsPolicyImpl(serverNames);\n }\n else\n {\n string value = null;\n \n var thread = new Thread(() =>\n {\n value = RemoveServersFromAllowFreshCredentialsPolicyImpl(serverNames);\n });\n \n thread.SetApartmentState(ApartmentState.STA);\n thread.Start();\n thread.Join();\n \n return value;\n }\n }\n \n private static string EnableAllowFreshCredentialsPolicyImpl(string[] serverNames, bool hasNTLMOnlyUpdateBeenMade)\n {\n IGroupPolicyObject gpo = (IGroupPolicyObject)new GPClass();\n gpo.OpenLocalMachineGPO(GPO_OPEN_LOAD_REGISTRY);\n \n var KeyHandle = gpo.GetRegistryKey(GPO_SECTION_MACHINE);\n \n try\n {\n var rootKey = Registry.CurrentUser;\n \n using (RegistryKey GPOKey = rootKey.OpenSubKey(GPOpath, true))\n {\n foreach (var keyName in GPOKey.GetSubKeyNames())\n {\n if (keyName.EndsWith(Machine, StringComparison.OrdinalIgnoreCase))\n {\n var key = GPOpath + BackSlash + keyName + BackSlash + PoliciesPath;\n \n UpdateGpoRegistrySettingsAllowFreshCredentials(ApplicationName, serverNames, Registry.CurrentUser, key, hasNTLMOnlyUpdateBeenMade);\n }\n }\n }\n \n //saving gpo settings\n gpo.Save(true, true, new Guid("35378EAC-683F-11D2-A89A-00C04FBBCFA2"), new Guid("7A9206BD-33AF-47af-B832-D4128730E990"));\n }\n catch (Exception ex)\n {\n return ex.Message;\n }\n finally\n {\n KeyHandle = IntPtr.Zero;\n }\n \n return null;\n }\n \n private static string RemoveServersFromAllowFreshCredentialsPolicyImpl(string[] serverNames)\n {\n IGroupPolicyObject gpo = (IGroupPolicyObject)new GPClass();\n gpo.OpenLocalMachineGPO(GPO_OPEN_LOAD_REGISTRY);\n \n var KeyHandle = gpo.GetRegistryKey(GPO_SECTION_MACHINE);\n \n try\n {\n var rootKey = Registry.CurrentUser;\n \n using (RegistryKey GPOKey = rootKey.OpenSubKey(GPOpath, true))\n {\n foreach (var keyName in GPOKey.GetSubKeyNames())\n {\n if (keyName.EndsWith(Machine, StringComparison.OrdinalIgnoreCase))\n {\n var key = GPOpath + BackSlash + keyName + BackSlash + PoliciesPath;\n \n UpdateGpoRegistrySettingsRemoveServersFromFreshCredentials(ApplicationName, serverNames, Registry.CurrentUser, key);\n }\n }\n }\n \n //saving gpo settings\n gpo.Save(true, true, new Guid("35378EAC-683F-11D2-A89A-00C04FBBCFA2"), new Guid("7A9206BD-33AF-47af-B832-D4128730E990"));\n }\n catch (Exception ex)\n {\n return ex.Message;\n }\n finally\n {\n KeyHandle = IntPtr.Zero;\n }\n \n return null;\n }\n \n private static void UpdateGpoRegistrySettingsAllowFreshCredentials(string applicationName, string[] serverNames, RegistryKey rootKey, string registryPath, bool hasNTLMOnlyUpdateBeenMade)\n {\n var registryPathCredentialsDelegation = registryPath + CredentialsDelegation;\n var credentialDelegationKey = rootKey.OpenSubKey(registryPathCredentialsDelegation, true);\n \n try\n {\n if (credentialDelegationKey == null)\n {\n credentialDelegationKey = rootKey.CreateSubKey(registryPathCredentialsDelegation, RegistryKeyPermissionCheck.ReadWriteSubTree);\n }\n \n credentialDelegationKey.SetValue(AllowFreshCredentials, 1, RegistryValueKind.DWord);\n credentialDelegationKey.SetValue(ConcatenateDefaultsAllowFresh, 1, RegistryValueKind.DWord);\n }\n finally\n {\n credentialDelegationKey.Dispose();\n credentialDelegationKey = null;\n }\n \n var allowFreshCredentialKey = rootKey.OpenSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentials, true);\n \n try\n {\n\n if (allowFreshCredentialKey == null)\n {\n allowFreshCredentialKey = rootKey.CreateSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentials, RegistryKeyPermissionCheck.ReadWriteSubTree);\n }\n\n if (allowFreshCredentialKey != null)\n {\n var values = allowFreshCredentialKey.ValueCount;\n var valuesToAdd = serverNames.ToDictionary(key => string.Format(CultureInfo.InvariantCulture, @"{0}/{1}", applicationName, key), value => value);\n var valueNames = allowFreshCredentialKey.GetValueNames();\n var existingValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n \n foreach (var valueName in valueNames)\n {\n var value = allowFreshCredentialKey.GetValue(valueName).ToString();\n \n if (!existingValues.ContainsKey(value))\n {\n existingValues.Add(value, value);\n }\n }\n \n foreach (var key in valuesToAdd.Keys)\n {\n if (!existingValues.ContainsKey(key))\n {\n allowFreshCredentialKey.SetValue(Convert.ToString(values + 1, CultureInfo.InvariantCulture), key, RegistryValueKind.String);\n values++;\n }\n }\n }\n }\n finally\n {\n allowFreshCredentialKey.Dispose();\n allowFreshCredentialKey = null;\n }\n\n if (hasNTLMOnlyUpdateBeenMade) {\n var allowFreshCredentialWhenNTLMOnlyKey = rootKey.OpenSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentialsWhenNTLMOnly, true);\n \n try\n {\n\n if (allowFreshCredentialWhenNTLMOnlyKey == null)\n {\n allowFreshCredentialWhenNTLMOnlyKey = rootKey.CreateSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentialsWhenNTLMOnly, RegistryKeyPermissionCheck.ReadWriteSubTree);\n }\n\n if (allowFreshCredentialWhenNTLMOnlyKey != null)\n {\n var values = allowFreshCredentialWhenNTLMOnlyKey.ValueCount;\n var valuesToAdd = serverNames.ToDictionary(key => string.Format(CultureInfo.InvariantCulture, @"{0}/{1}", applicationName, key), value => value);\n var valueNames = allowFreshCredentialWhenNTLMOnlyKey.GetValueNames();\n var existingValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n \n foreach (var valueName in valueNames)\n {\n var value = allowFreshCredentialWhenNTLMOnlyKey.GetValue(valueName).ToString();\n \n if (!existingValues.ContainsKey(value))\n {\n existingValues.Add(value, value);\n }\n }\n \n foreach (var key in valuesToAdd.Keys)\n {\n if (!existingValues.ContainsKey(key))\n {\n allowFreshCredentialWhenNTLMOnlyKey.SetValue(Convert.ToString(values + 1, CultureInfo.InvariantCulture), key, RegistryValueKind.String);\n values++;\n }\n }\n }\n }\n finally\n {\n allowFreshCredentialWhenNTLMOnlyKey.Dispose();\n allowFreshCredentialWhenNTLMOnlyKey = null;\n }\n }\n }\n \n private static void UpdateGpoRegistrySettingsRemoveServersFromFreshCredentials(string applicationName, string[] serverNames, RegistryKey rootKey, string registryPath)\n {\n var registryPathCredentialsDelegation = registryPath + CredentialsDelegation;\n \n using (var allowFreshCredentialKey = rootKey.OpenSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentials, true))\n {\n if (allowFreshCredentialKey != null)\n {\n var valuesToRemove = serverNames.ToDictionary(key => string.Format(CultureInfo.InvariantCulture, @"{0}/{1}", applicationName, key), value => value);\n var valueNames = allowFreshCredentialKey.GetValueNames();\n \n foreach (var valueName in valueNames)\n {\n var value = allowFreshCredentialKey.GetValue(valueName).ToString();\n \n if (valuesToRemove.ContainsKey(value))\n {\n allowFreshCredentialKey.DeleteValue(valueName);\n }\n }\n }\n }\n\n using (var allowFreshCredentialWhenNTLMOnlyKey = rootKey.OpenSubKey(registryPathCredentialsDelegation + BackSlash + AllowFreshCredentialsWhenNTLMOnly, true))\n {\n if (allowFreshCredentialWhenNTLMOnlyKey != null)\n {\n var valuesToRemove = serverNames.ToDictionary(key => string.Format(CultureInfo.InvariantCulture, @"{0}/{1}", applicationName, key), value => value);\n var valueNames = allowFreshCredentialWhenNTLMOnlyKey.GetValueNames();\n \n foreach (var valueName in valueNames)\n {\n var value = allowFreshCredentialWhenNTLMOnlyKey.GetValue(valueName).ToString();\n \n if (valuesToRemove.ContainsKey(value))\n {\n allowFreshCredentialWhenNTLMOnlyKey.DeleteValue(valueName);\n }\n }\n }\n }\n }\n }\n }\n"@ # Cannot have leading whitespace on this line!\n}\n\n<#\n\n.SYNOPSIS\nClean up all added global variables, constants, etc.\n\n.DESCRIPTION\nClean up all added global variables, constants, etc.\n\n#>\n\nfunction cleanupScriptEnv() {\n Remove-Variable -Name WsManApplication -Scope Script -Force\n Remove-Variable -Name CredSSPClientAuthPath -Scope Script -Force\n Remove-Variable -Name CredentialsDelegationPolicyPath -Scope Script -Force\n Remove-Variable -Name AllowFreshCredentialsPath -Scope Script -Force\n Remove-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPath -Scope Script -Force\n Remove-Variable -Name AllowFreshCredentialsPropertyName -Scope Script -Force\n Remove-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Scope Script -Force\n Remove-Variable -Name TypeAlreadyExistsHResult -Scope Script -Force\n Remove-Variable -Name NativeCode -Scope Script -Force\n}\n\n<#\n\n.SYNOPSIS\nEnable CredSSP client role on this computer.\n\n.DESCRIPTION\nEnable the CredSSP client role on this computer. This computer should be a \nWindows Admin Center gateway, desktop or service mode.\n\n#>\n\nfunction enableCredSSPClient() {\n $path = "{0}:\\{1}" -f $WsManApplication, $CredSSPClientAuthPath\n\n Set-Item -Path $path True -Force -ErrorAction SilentlyContinue -ErrorVariable +err\n\n return $err\n}\n\n<#\n\n.SYNOPSIS\nGet if CredSSP is enabled on client.\n\n.DESCRIPTION\nGet if CredSSP is enabled on client for client role.\n\n#>\n\nfunction getCredSSPClientEnabled() {\n $credSSPClientEnabled = $false;\n\n $path = "{0}:\\{1}" -f $WsManApplication, $CredSSPClientAuthPath\n $credSSPClientService = Get-Item $path -ErrorAction SilentlyContinue\n\n if ($credSSPClientService) {\n $credSSPClientEnabled = [System.Convert]::ToBoolean($credSSPClientService.Value)\n }\n\n return $credSSPClientEnabled\n}\n\n<#\n\n.SYNOPSIS\nGet the CredentialsDelegation container from the registry.\n\n.DESCRIPTION\nGet the CredentialsDelegation container from the registry. If the container\ndoes not exist then a new one will be created.\n\n#>\n\nfunction getCredentialsDelegationItem() {\n $credentialDelegationItem = Get-Item $CredentialsDelegationPolicyPath -ErrorAction SilentlyContinue\n if (-not ($credentialDelegationItem)) {\n $credentialDelegationItem = New-Item $CredentialsDelegationPolicyPath\n }\n\n return $credentialDelegationItem\n}\n\n<#\n\n.SYNOPSIS\nCreates the CredentialsDelegation\\AllowFreshCredentials / CredentialsDelegation\\AllowFreshCredentialsWhenNTLMOnly container from the registry.\n\n.DESCRIPTION\nCreate the CredentialsDelegation\\AllowFreshCredentials / CredentialsDelegation\\AllowFreshCredentialsWhenNTLMOnly container from the registry. If the container\ndoes not exist then a new one will be created.\n\n#>\n\nfunction createCredentialsDelegationItem([string] $propertyPath) {\n $allowFreshCredentialsItem = Get-Item $propertyPath -ErrorAction SilentlyContinue\n if (-not ($allowFreshCredentialsItem)) {\n New-Item $propertyPath\n }\n}\n\n<#\n\n.SYNOPSIS\nSet the AllowFreshCredentials / AllowFreshCredentialsWhenNTLMOnly property value in the CredentialsDelegation container.\n\n.DESCRIPTION\nSet the AllowFreshCredentials / AllowFreshCredentialsWhenNTLMOnly property value in the CredentialsDelegation container.\nIf the value exists then it is not changed.\n\n#>\n\nfunction setCredentialsDelegationProperty([Object] $credentialDelegationItem, [string] $propertyName) {\n $credentialDelegationItem | New-ItemProperty -Name $propertyName -Value 1 -Type DWord -Force\n}\n\n<#\n\n.SYNOPSIS\nAdd the passed in server(s) to the AllowFreshCredentials / AllowFreshCredentialsWhenNTLMOnly key/container.\n\n.DESCRIPTION\nAdd the passed in server(s) to the AllowFreshCredentials / AllowFreshCredentialsWhenNTLMOnly key/container. \nIf a given server is already present then do not add it again.\n\n#>\n\nfunction addServersToCredentialsDelegationItem([string[]] $serverNames, [string] $propertyName, [string] $propertyPath) {\n $valuesAdded = 0\n\n foreach ($serverName in $serverNames) {\n $newValue = "{0}/{1}" -f $WsManApplication, $serverName\n\n $hasValue = $false\n\n # Check if any registry-value nodes values of registry-key node have certain value.\n $key = Get-ChildItem $CredentialsDelegationPolicyPath | ? PSChildName -eq $propertyName\n\n if ($null -eq $key) {\n New-Item -Path $propertyPath\n $valueNames = @()\n } else {\n $valueNames = @($key.GetValueNames())\n\n foreach ($valueName in $valueNames) {\n $value = $key.GetValue($valueName)\n \n if ($value -eq $newValue) {\n $hasValue = $true\n break\n }\n }\n }\n\n if (-not ($hasValue)) {\n New-ItemProperty $propertyPath -Name ($valueNames.Length + 1) -Value $newValue -Force\n $valuesAdded++\n }\n }\n\n return $valuesAdded -gt 0\n}\n\n<#\n\n.SYNOPSIS\nAdd the passed in server(s) to the delegation list in the registry.\n\n.DESCRIPTION\nAdd the passed in server(s) to the delegation list in the registry.\n\n#>\n\nfunction addServersToDelegation([string[]] $serverNames) {\n # Get the CredentialsDelegation key/container\n $credentialDelegationItem = getCredentialsDelegationItem\n\n # Test, and create if needed, the AllowFreshCredentials property value\n setCredentialsDelegationProperty $credentialDelegationItem $AllowFreshCredentialsPropertyName\n # Test, and create if needed, the AllowFreshCredentialsWhenNTLMOnly property value\n setCredentialsDelegationProperty $credentialDelegationItem $AllowFreshCredentialsWhenNTLMOnlyPropertyName\n\n # Create the AllowFreshCredentials key/container\n createCredentialsDelegationItem $AllowFreshCredentialsPath\n # Create the AllowFreshCredentialsWhenNTLMOnly key/container\n createCredentialsDelegationItem $AllowFreshCredentialsWhenNTLMOnlyPath\n\n # Add the servers to the AllowFreshCredentials key/container, if not already present\n $updateFreshCredentialsGroupPolicy = addServersToCredentialsDelegationItem $serverNames $AllowFreshCredentialsPropertyName $AllowFreshCredentialsPath\n # Add the servers to the AllowFreshCredentialsWhenNTLMOnly key/container, if not already present\n $updateFreshCredentialsWhenNTLMOnlyGroupPolicy = addServersToCredentialsDelegationItem $serverNames $AllowFreshCredentialsWhenNTLMOnlyPropertyName $AllowFreshCredentialsWhenNTLMOnlyPath\n\n if ($updateFreshCredentialsGroupPolicy) {\n $hasNTLMOnlyUpdateBeenMade = $false\n if ($updateFreshCredentialsWhenNTLMOnlyGroupPolicy) {\n $hasNTLMOnlyUpdateBeenMade = $true\n }\n setLocalGroupPolicy $serverNames $hasNTLMOnlyUpdateBeenMade\n }\n}\n\n<#\n\n.SYNOPSIS\nSet the local group policy to match the settings that have already been made.\n\n.DESCRIPTION\nLocal Group Policy must match the settings that were made by this script to\nensure that an older Local GP setting does not overwrite the thos settings.\n\n#>\n\nfunction setLocalGroupPolicy([string[]] $serverNames, [bool] $hasNTLMOnlyUpdateBeenMade) {\n try {\n Add-Type -TypeDefinition $NativeCode\n } catch {\n if ($_.Exception.HResult -ne $TypeAlreadyExistsHResult) {\n throw $_.Exception.Message\n }\n }\n\n $errorMessage = [SME.LocalGroupPolicy]::EnableAllowFreshCredentialsPolicy($serverNames, $hasNTLMOnlyUpdateBeenMade)\n\n if ($errorMessage) {\n throw $errorMessage\n }\n\n return $true\n}\n\n<#\n\n.SYNOPSIS\nMain function of this script.\n\n.DESCRIPTION\nEnable CredSSP client role and add the passed in servers to the list\nof servers to which this client can delegate credentials.\n\n#>\nfunction main([string[]] $serverNames) {\n setupScriptEnv\n\n try {\n # If client role is enabled, skip to adding servers to delegation\n if (-not (getCredSSPClientEnabled)) {\n # If not enabled try to enable\n $err = enableCredSSPClient\n if ($err) {\n # If there was an error, and server role is not enabled return error.\n if (-not (getCredSSPClientEnabled)) {\n throw $err\n }\n }\n }\n\n addServersToDelegation $serverNames\n } catch {\n Write-Error $_.Exception.Message\n\n throw $_.Exception.Message\n } finally {\n cleanupScriptEnv\n }\n\n return $true\n}\n\n###############################################################################\n# Script execution starts here\n###############################################################################\nif (-not ($env:pester)) {\n return main $serverNames\n}\n'},m.Enable_CredSspManagedServer={command:"Enable-CredSspManagedServer",script:'##Enable-CredSspManagedServer##:Enable-CredSspManagedServer.ps1\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable CredSSPServicePath -Option ReadOnly -Scope Script -Value "WSMan:\\localhost\\Service\\Auth\\CredSSP"\n}\nfunction cleanupScriptEnv() {\nRemove-Variable CredSSPServicePath -Scope Script -Force\n}\nfunction getCredSSPServerEnabled()\n{\n$credSSPServerEnabled = $false;\n$credSSPServerService = Get-Item $CredSSPServicePath -ErrorAction SilentlyContinue\nif ($credSSPServerService) {\n$credSSPServerEnabled = [System.Convert]::ToBoolean($credSSPServerService.Value)\n}\nreturn $credSSPServerEnabled\n}\nfunction enableCredSSP() {\n$err = $null\n$result = Enable-WSManCredSSP -Role Server -Force -ErrorAction SilentlyContinue -ErrorVariable +err\nreturn $err\n}\nfunction main() {\nsetupScriptEnv\ntry {\nif (-not (getCredSSPServerEnabled)) {\n$err = enableCredSSP\nif ($err) {\nif (-not (getCredSSPServerEnabled)) {\nthrow $err\n}\n}\n}\n} catch {\nWrite-Error $err\nthrow $_.Exception.Message\n} finally {\ncleanupScriptEnv\n}\nreturn $true\n}\nif (-not ($env:pester)) {\nreturn main\n}\n'},m.Get_CredSspClientConfigurationOnGateway={command:"Get-CredSspClientConfigurationOnGateway",script:'##Get-CredSspClientConfigurationOnGateway##:Get-CredSspClientConfigurationOnGateway.ps1\nparam (\n[Parameter(Mandatory=$True)]\n[string[]]$serverNames\n)\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable -Name WsManApplication -Option ReadOnly -Scope Script -Value "wsman"\nSet-Variable -Name CredSSPClientAuthPath -Option ReadOnly -Scope Script -Value "localhost\\Client\\Auth\\CredSSP"\nSet-Variable -Name CredentialsDelegationPolicyPath -Option ReadOnly -Scope Script -Value "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CredentialsDelegation"\nSet-Variable -Name AllowFreshCredentialsPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentials"\nSet-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentialsWhenNTLMOnly"\n}\nfunction cleanupScriptEnv() {\nRemove-Variable -Name WsManApplication -Scope Script -Force\nRemove-Variable -Name CredSSPClientAuthPath -Scope Script -Force\nRemove-Variable -Name CredentialsDelegationPolicyPath -Scope Script -Force\nRemove-Variable -Name AllowFreshCredentialsPropertyName -Scope Script -Force\nRemove-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Scope Script -Force\n}\nfunction getCredSSPClientStatus() {\n$path = "{0}:\\{1}" -f $WsManApplication, $CredSSPClientAuthPath\n$credSSPClientEnabled = $false;\n$credSSPClientService = Get-Item $path -ErrorAction SilentlyContinue\nif ($credSSPClientService) {\n$credSSPClientEnabled = [System.Convert]::ToBoolean($credSSPClientService.Value)\n}\nreturn $credSSPClientEnabled\n}\nfunction verifyCredentialsDelegationRegKeyPresent([string] $registryKeyName) {\n$credentialDelegationItem = Get-Item $CredentialsDelegationPolicyPath -ErrorAction SilentlyContinue\nif ($credentialDelegationItem) {\n$key = Get-ChildItem $CredentialsDelegationPolicyPath | Where-Object PSChildName -eq $registryKeyName\nif ($key -and $key.GetValueNames()) {\nreturn $True\n}\n}\nreturn $False\n}\nfunction getDelegatableServersListForRegKey([string]$registryKeyName) {\n$serversList = @()\n$key = Get-ChildItem $CredentialsDelegationPolicyPath | Where-Object PSChildName -eq $registryKeyName\n$valueNames = $key.GetValueNames()\nforeach ($valueName in $valueNames) {\n$serversList += $key.GetValue($valueName).ToLower()\n}\nreturn $serversList\n}\nfunction main([string[]] $serverNames) {\nsetupScriptEnv\n$serverNames = $serverNames | ForEach-Object { $_.ToLower() }\n$isGatewayConfiguredAsClientRole = getCredSSPClientStatus\n$allowFreshCredentialsKeyPresent = verifyCredentialsDelegationRegKeyPresent $AllowFreshCredentialsPropertyName\n$allowFreshCredentialsWhenNTLMOnlyKeyPresent = verifyCredentialsDelegationRegKeyPresent $AllowFreshCredentialsWhenNTLMOnlyPropertyName\n$allowFreshCredentialsDelegatableServers = @()\n$allowFreshCredentialsWhenNTLMOnlyDelegatableServers = @()\n$notDelegatableServers = @()\nif ($allowFreshCredentialsKeyPresent) {\n$freshCredentialsServers = getDelegatableServersListForRegKey $AllowFreshCredentialsPropertyName\n[array]$allowFreshCredentialsDelegatableServers = $serverNames | Where-Object { $freshCredentialsServers.Contains("$WsManApplication/$($_)") }\n}\nif (-not $allowFreshCredentialsDelegatableServers) {\n$allowFreshCredentialsDelegatableServers = @()\n}\nif ($allowFreshCredentialsWhenNTLMOnlyKeyPresent) {\n$freshCredentialsWhenNTLMServers = getDelegatableServersListForRegKey $AllowFreshCredentialsWhenNTLMOnlyPropertyName\n[array]$allowFreshCredentialsWhenNTLMOnlyDelegatableServers = $serverNames | Where-Object { $freshCredentialsWhenNTLMServers.Contains("$WsManApplication/$($_)") }\n}\nif (-not $allowFreshCredentialsWhenNTLMOnlyDelegatableServers) {\n$allowFreshCredentialsWhenNTLMOnlyDelegatableServers = @()\n}\n[array]$notDelegatableServers = $serverNames | Where-Object { -not $allowFreshCredentialsDelegatableServers.Contains($_) -and -not $allowFreshCredentialsWhenNTLMOnlyDelegatableServers.Contains($_) }\nif (-not $notDelegatableServers) {\n$notDelegatableServers = @()\n}\ncleanupScriptEnv\n$result = [PSCustomObject]@{\nIsGatewayConfiguredAsClientRole = $isGatewayConfiguredAsClientRole\nAllowFreshCredentialsKeyPresent = $allowFreshCredentialsKeyPresent\nAllowFreshCredentialsWhenNTLMOnlyKeyPresent = $allowFreshCredentialsWhenNTLMOnlyKeyPresent\nAllowFreshCredsDelegatableServers = $allowFreshCredentialsDelegatableServers\nAllowFreshCredsWhenNTLMOnlyDelegatableServers = $allowFreshCredentialsWhenNTLMOnlyDelegatableServers\nNotDelegatableServers = $notDelegatableServers\n}\nreturn $result\n}\nreturn main $serverNames\n'},m.Get_CredSspClientRole={command:"Get-CredSspClientRole",script:'##Get-CredSspClientRole##:Get-CredSspClientRole.ps1\nparam (\n[Parameter(Mandatory=$True)]\n[string[]]$serverNames\n)\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable -Name WsManApplication -Option ReadOnly -Scope Script -Value "wsman"\nSet-Variable -Name CredSSPClientAuthPath -Option ReadOnly -Scope Script -Value "localhost\\Client\\Auth\\CredSSP"\nSet-Variable -Name CredentialsDelegationPolicyPath -Option ReadOnly -Scope Script -Value "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CredentialsDelegation"\nSet-Variable -Name AllowFreshCredentialsPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentials"\nSet-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Option ReadOnly -Scope Script -Value "AllowFreshCredentialsWhenNTLMOnly"\n}\nfunction cleanupScriptEnv() {\nRemove-Variable -Name WsManApplication -Scope Script -Force\nRemove-Variable -Name CredSSPClientAuthPath -Scope Script -Force\nRemove-Variable -Name CredentialsDelegationPolicyPath -Scope Script -Force\nRemove-Variable -Name AllowFreshCredentialsPropertyName -Scope Script -Force\nRemove-Variable -Name AllowFreshCredentialsWhenNTLMOnlyPropertyName -Scope Script -Force\n}\nfunction getCredSSPClientEnabled() {\n$path = "{0}:\\{1}" -f $WsManApplication, $CredSSPClientAuthPath\n$credSSPClientEnabled = $false;\n$credSSPClientService = Get-Item $path -ErrorAction SilentlyContinue\nif ($credSSPClientService) {\n$credSSPClientEnabled = [System.Convert]::ToBoolean($credSSPClientService.Value)\n}\nreturn $credSSPClientEnabled\n}\nfunction getServersDelegated([string[]] $serverNames, [string] $propertyName) {\n$valuesFound = 0\nforeach ($serverName in $serverNames) {\n$newValue = "{0}/{1}" -f $WsManApplication, $serverName\n$key = Get-ChildItem $CredentialsDelegationPolicyPath | ? PSChildName -eq $propertyName\n$valueNames = $key.GetValueNames()\nforeach ($valueName in $valueNames) {\n$value = $key.GetValue($valueName)\nif ($value -eq $newValue) {\n$valuesFound++\nbreak\n}\n}\n}\nreturn $valuesFound -eq $serverNames.Length\n}\nfunction areCredentialsDelegationItemsPresent([string] $propertyName) {\n$credentialDelegationItem = Get-Item $CredentialsDelegationPolicyPath -ErrorAction SilentlyContinue\nif ($credentialDelegationItem) {\n$key = Get-ChildItem $CredentialsDelegationPolicyPath | ? PSChildName -eq $propertyName\nif ($key) {\n$valueNames = $key.GetValueNames()\nif ($valueNames) {\nreturn $true\n}\n}\n}\nreturn $false\n}\nfunction main([string[]] $serverNames) {\nsetupScriptEnv\n$isServersDelegatedToAllowFreshCredentials = $false\n$isServersDelegatedToAllowFreshCredentialsWhenNTLMOnly = $false\n$isClientEnabled = getCredSSPClientEnabled\nif (areCredentialsDelegationItemsPresent $AllowFreshCredentialsPropertyName) {\n$isServersDelegatedToAllowFreshCredentials = getServersDelegated $serverNames $AllowFreshCredentialsPropertyName\n}\nif (areCredentialsDelegationItemsPresent $AllowFreshCredentialsWhenNTLMOnlyPropertyName) {\n$isServersDelegatedToAllowFreshCredentialsWhenNTLMOnly = getServersDelegated $serverNames $AllowFreshCredentialsWhenNTLMOnlyPropertyName\n}\ncleanupScriptEnv\nreturn $isClientEnabled -and $isServersDelegatedToAllowFreshCredentials -and $isServersDelegatedToAllowFreshCredentialsWhenNTLMOnly\n}\nreturn main $serverNames\n'},m.Get_CredSspManagedServer={command:"Get-CredSspManagedServer",script:'##Get-CredSspManagedServer##:Get-CredSspManagedServer.ps1\nSet-StrictMode -Version 5.0\nImport-Module Microsoft.WSMan.Management -ErrorAction SilentlyContinue\nfunction setupScriptEnv() {\nSet-Variable -Name WsManApplication -Option ReadOnly -Scope Script -Value "wsman"\nSet-Variable -Name CredSSPServiceAuthPath -Option ReadOnly -Scope Script -Value "localhost\\Service\\Auth\\CredSSP"\n}\nfunction cleanupScriptEnv() {\nRemove-Variable -Name WsManApplication -Scope Script -Force\nRemove-Variable -Name CredSSPServiceAuthPath -Scope Script -Force\n}\nfunction getCredSSPServerEnabled() {\n$path = "{0}:\\{1}" -f $WsManApplication, $CredSSPServiceAuthPath\n$credSSPServerEnabled = $false;\n$credSSPServerService = Get-Item $path -ErrorAction SilentlyContinue\nif ($credSSPServerService) {\n$credSSPServerEnabled = [System.Convert]::ToBoolean($credSSPServerService.Value)\n}\nreturn $credSSPServerEnabled\n}\nfunction main() {\nsetupScriptEnv\n$result = getCredSSPServerEnabled\ncleanupScriptEnv\nreturn $result\n}\nif (-not ($env:pester)) {\nreturn main\n}\n'},m.Test_CredSsp={command:"Test-CredSsp",script:"##Test-CredSsp##:Test-CredSsp.ps1\nparam (\n[Parameter(Mandatory = $true)]\n[string]\n$ServerName,\n[Parameter(Mandatory = $true)]\n[string]\n$Username,\n[Parameter(Mandatory = $true)]\n[string]\n$Password\n)\n$secure_password = ConvertTo-SecureString $Password -AsPlainText -Force\n$cred = New-Object System.Management.Automation.PSCredential ($Username, $secure_password)\nTest-WSMan -computerName $ServerName -Authentication Credssp -Credential $cred\n"}}(c=f.CredSsp||(f.CredSsp={})),function(m){m.Get_ArcStatus={command:"Get-ArcStatus",script:'##Get-ArcStatus##:Get-ArcStatus.ps1\n$LogName = "Microsoft-ServerManagementExperience"\n$LogSource = "SMEScript"\n$ScriptName = "Get-ArcStatus.ps1"\n$AzcmagentExecutable = "$env:ProgramFiles\\AzureConnectedMachineAgent\\azcmagent.exe"\nfunction main() {\n$service = Get-Service -Name himds -ErrorVariable Err -ErrorAction SilentlyContinue\nif(!!$Err){\n$Err = "Failed to retrieve HIMDS service. Details: $Err"\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Information `\n-Message "[$ScriptName]: $Err" -ErrorAction SilentlyContinue\n$status = "NotInstalled"\n}\nelseif ($service.Status -ne "Running") {\n$Err = "The Azure arc agent is not running. Details: HIMDS service is $($service.Status)"\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Information `\n-Message "[$ScriptName]: $Err" -ErrorAction SilentlyContinue\n$status = "Disconnected"\n}\nelse {\n$rawStatus = Invoke-Command { & $AzcmagentExecutable show --json --log-stderr } -ErrorVariable Err 2>$null\nif (!!$Err) {\n$Err = "The Azure arc agent failed to communicate. Details: $rawStatus"\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Error `\n-Message "[$ScriptName]: $Err" -ErrorAction SilentlyContinue\n$status = "Disconnected"\n}\nelseif (!$rawStatus) {\n$Err = "The Azure arc agent is not connected. Details: $rawStatus"\nMicrosoft.PowerShell.Management\\Write-EventLog -LogName $LogName -Source $LogSource -EventId 0 -Category 0 -EntryType Information `\n-Message "[$ScriptName]: $Err" -ErrorAction SilentlyContinue\n$status = "Disconnected"\n}\nelse {\n$status = ($rawStatus | ConvertFrom-Json -ErrorAction Stop).status\n}\n}\n$computerSummary = Get-CimInstance Win32_ComputerSystem -ErrorAction SilentlyContinue | Microsoft.PowerShell.Utility\\Select-Object Name\n@{\nazureArcStatus = $status\ncomputerName = $computerSummary.Name\n}\n}\nif (-not ($env:pester)) {\nMicrosoft.PowerShell.Management\\New-EventLog -LogName $LogName -Source $LogSource -ErrorAction SilentlyContinue\nreturn main\n}\n'},m.Get_RebootPendingStatus={command:"Get-RebootPendingStatus",script:'##Get-RebootPendingStatus##:Get-RebootPendingStatus.ps1\nimport-module CimCmdlets\nfunction Get-ComputerNameChangeStatus {\n$currentComputerName = (Get-ItemProperty "HKLM:SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName"-ErrorAction SilentlyContinue).ComputerName\n$activeComputerName = (Get-ItemProperty "HKLM:SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName"-ErrorAction SilentlyContinue).ComputerName\nreturn $currentComputerName -ne $activeComputerName\n}\nfunction Get-CCMRebootPending {\n$status = Invoke-WmiMethod -Namespace "ROOT\\ccm\\ClientSDK" -Class CCM_ClientUtilities -Name ` DetermineIfRebootPending -ErrorAction SilentlyContinue\nreturn $status\n}\nfunction Test-PendingReboot {\nif ($value = Get-ChildItem "HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending" -ErrorAction Ignore) {\nreturn @{\nrebootRequired = $true\nadditionalInformation = $value\n}\n}\nif ($value = Get-Item "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update\\RebootRequired" -ErrorAction Ignore) {\nreturn @{\nrebootRequired = $true\nadditionalInformation = $value\n}\n}\nif (Get-ComputerNameChangeStatus) {\nreturn @{\nrebootRequired = $true\nadditionalInformation = \'Computer ID changed\'\n}\n}\n$status = Get-CCMRebootPending\nif (($status -ne $null) -and $status.RebootPending) {\nreturn @{\nrebootRequired = $true\nadditionalInformation = $status\n}\n}\nreturn @{\nrebootRequired = $false\nadditionalInformation = $null\n}\n}\nTest-PendingReboot\n'},m.Get_ScheduledTask={command:"Get-ScheduledTask",script:"##Get-ScheduledTask##:Get-ScheduledTask.ps1\nImport-Module ScheduledTasks -ErrorAction SilentlyContinue\nGet-ScheduledTaskInfo -TaskName WACInstallUpdates\n"},m.Get_UpdateStatus={command:"Get-UpdateStatus",script:"##Get-UpdateStatus##:Get-UpdateStatus.ps1\n$fileContent = Get-Content $env:temp\\InstallLog.txt -ErrorAction SilentlyContinue\nif($null -eq $fileContent){\nreturn @{failedToUpdate = $false}\n}\n$file_data = Get-Content $env:temp\\InstallLog.txt | Where-Object { $_ -like '*Windows Admin Center -- Installation failed*' }\nif ( $file_data ) {\nreturn @{failedToUpdate = $true}\n}\nreturn @{failedToUpdate = $false}\n"},m.New_WindowsAdminCenterUpdateSchedule={command:"New-WindowsAdminCenterUpdateSchedule",script:'##New-WindowsAdminCenterUpdateSchedule##:New-WindowsAdminCenterUpdateSchedule.ps1\nparam (\n[Parameter(Mandatory = $true)]\n[string]$installTime,\n[Parameter(Mandatory = $true)]\n[string]$downloadWACUrl,\n[Parameter(Mandatory = $true)]\n[bool]$installNow,\n[Parameter(Mandatory = $true)]\n[boolean]\n$fromTaskScheduler\n)\nImport-Module ScheduledTasks -ErrorAction SilentlyContinue\nfunction newWindowsAdminCenterUpdateSchedule() {\nparam (\n[string]\n$downloadWACUrl\n)\nfunction Get-CurrentSslCertificates([string]$portNumber) {\nWrite-Host "Retrieving current certificate for $portNumber"\n$netshCommand = "netsh http show sslcert ipport=0.0.0.0:{0}" -f $portNumber\n$portCertificate = (Invoke-Expression $netshCommand) -Join \' \'\n$pattern = "Certificate hash\\s+: (\\w+)"\n$thumbprint = $portCertificate | Microsoft.PowerShell.Utility\\Select-String -Pattern $pattern | ForEach-Object { $_ -match $pattern > $null; $matches[1] };\nreturn @{ thumbprint = $thumbprint }\n}\nfunction Set-ErrorLogContent {\nParam(\n[Parameter(Mandatory = $True)]\n[bool] $failedToUpdate,\n[Parameter(Mandatory = $True)]\n[string] $errorCode,\n[Parameter(Mandatory = $True)]\n[string] $errorMessage\n)\n$errorLogFile = $env:temp + "\\WindowsAdminCenterErrorLogFile.json"\n$fileContents = ""\n$errorContent = "{ ""failedToUpdate"": ""$($failedToUpdate)"", ""time"": ""$(Get-Date)"", ""errorCode"": ""$($errorCode)"", ""errorMessage"": ""$($errorMessage)""}"\nif (-Not(Test-Path $errorLogFile)) {\nnew-item $errorLogFile\n$json = \'{\n"errors":[]\n}\'\n$fileContents = ConvertFrom-Json -InputObject $json\n}\nelse {\n$fileContents = ([System.IO.File]::ReadAllText($errorLogFile) | ConvertFrom-Json)\nif ($fileContents.errors -eq $null) {\n$json = \'{\n"errors":[]\n}\'\n$fileContents = ConvertFrom-Json -InputObject $json\n}\n}\n$fileContents.errors += $errorContent\nConvertTo-Json -InputObject $fileContents | Out-File $errorLogFile\n}\n$serviceFound = Get-Service ServerManagementGateway -ErrorAction SilentlyContinue\nif ($null -eq $serviceFound) {\n$isServiceMode = $false\n}\nelse {\n$isServiceMode = $true\n}\n$isHAEnabled = "false"\nif (Test-Path -Path "Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ServerManagementGateway\\Ha") {\n$HARegistryResult = Get-ItemPropertyValue -path "Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ServerManagementGateway\\HA" -Name isHAEnabled\n$isHAEnabled = $HARegistryResult\n}\n$registryResult = Get-ItemPropertyValue -path "Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ServerManagementGateway" -Name SmePort\n$port = $registryResult\n$directoryForDownload = "$($env:Temp)"\n$tempDlPath = $directoryForDownload + "\\WAC.msi"\n$privacyType = Get-ItemPropertyValue -path "Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ServerManagementGateway" -Name SmeTelemetryPrivacyType\n$devMode = Get-ItemPropertyValue -path "Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ServerManagementGateway" -Name DevMode\nif ($null -eq $devMode -or \'\' -eq $devMode) {\n$devMode = \'0\'\n}\n$testConnection = Test-NetConnection\nif ($testConnection.pingSucceeded -eq $false) {\n$errorMessage = "InternetConnectionFailed"\nSet-ErrorLogContent $true "503" $errorMessage\nreturn $errorMessage\n}\nif ($isServiceMode -eq $true) {\nStop-Service ServerManagementGateway\n}\nelse {\nStop-Process -Name SmeDesktop\n}\nfor ($i = 1; $i -le 5 ; $i++) {\ntry {\nInvoke-WebRequest $downloadWACUrl -OutFile $tempDlPath -ErrorVariable +err\nBreak\n}\ncatch {\nif ($i -ge 5) {\n$statusMessage = $Error[0].Exception.Message\n$errorMessage = "WACDownloadNotFound " + $statusMessage\nSet-ErrorLogContent $true "404" $errorMessage\nreturn @{err = $err }\n}\nelse {\nStart-Sleep -s 1\n}\n}\n}\n$logPath = "$($env:Temp)" + "\\installLog.txt"\n$certResults = Get-CurrentSslCertificates($port)\n$certThumbprint = $certResults.thumbprint\nif ($isHAEnabled -eq "true") {\n$zipFilePath = $directoryForDownload + "Install-WindowsAdminCenterHA-1907.zip"\nInvoke-WebRequest "http://aka.ms/WACHAScript" -OutFile $zipFilePath\nExpand-Archive -Path $zipFilePath -DestinationPath $directoryForDownload -Verbose -Force\nRemove-Item $zipFilePath\nSet-Location $directoryForDownload # so we can locate and run the install-WindowsAdminCenterHA.ps1 script\n.\\Install-WindowsAdminCenterHA.ps1 -msiPath $tempDlPath -Verbose\n}\nelse {\n$exitCode = 0;\n$updateFailed = $false\nif ($null -eq $certThumbprint) {\n$process = Start-Process -NoNewWindow -Wait -FilePath \'msiexec.exe\' `\n-ArgumentList "/i $tempDlPath /qn /L*v ""$($logPath)"" SME_PORT=$port SSL_CERTIFICATE_OPTION=generate DEV_MODE=$devMode SME_TELEMETRY_PRIVACY_TYPE=$privacyType" `\n-Passthru\n$exitCode = $process.exitCode\n}\nelse {\n$process = Start-Process -NoNewWindow -Wait -FilePath "msiexec.exe" `\n-ArgumentList "/i $tempDlPath /qn /L*v ""$($logPath)"" SME_PORT=$port SME_THUMBPRINT=$certThumprint SSL_CERTIFICATE_OPTION=installed DEV_MODE=$devMode SME_TELEMETRY_PRIVACY_TYPE=$privacyType" `\n-Passthru\n$exitCode = $process.exitCode\n}\n$errorMessage = "WAC_InstallSuccessful"\nif ( $exitCode -ne 0 ) {\n$errorMessage = "WAC_InstallFailed"\n$updateFailed = $true\n}\nSet-ErrorLogContent $updateFailed $exitCode $errorMessage\nif ($isServiceMode -eq $true) {\nRestart-Service ServerManagementGateway\n}\nelse {\nStart-Process "$env:ProgramFiles\\Windows Admin Center\\SmeDesktop.exe"\n}\n}\nRemove-item $tempDlPath\n}\nenum UpdateScheduleErrorCode {\nnoError = 0\nscriptNotCreated = 1\nnotAnAdmin = 2\nschedulerNoConnection = 3\n}\n$isWdacEnforced = $ExecutionContext.SessionState.LanguageMode -eq \'ConstrainedLanguage\';\nif ($isWdacEnforced) {\nif ($fromTaskScheduler) {\nnewWindowsAdminCenterUpdateSchedule $downloadWACUrl;\nreturn;\n}\n}\nelse {\n$ScriptFile = $env:Temp + "\\WACInstall-Updates.ps1"\n}\n$Scheduler = New-Object -ComObject Schedule.Service\nfor ($i = 1; $i -le 3; $i++) {\nTry {\n$Scheduler.Connect()\nBreak\n}\nCatch {\nif ($i -ge 3) {\nWrite-EventLog -LogName Application -Source "SME Windows Updates Install Updates" -EntryType Error -EventID 1 -Message "Can\'t connect to Schedule service"\nWrite-Error "Can\'t connect to Schedule service" -ErrorAction Stop\nreturn @{\nIsSuccess = $false\nErrorCode = [UpdateScheduleErrorCode]::schedulerNoConnection\n}\n}\nelse {\nStart-Sleep -s 1\n}\n}\n}\n$cmdInstallNowValue = if ($installNow -eq $true) { "`$true" } else { "`$false" }\nif ($isWdacEnforced) {\n$arg = "-WindowStyle Hidden -command ""&{Import-Module Microsoft.SME.Shell; New-WACSHWindowsAdminCenterUpdateSchedule -fromTaskScheduler `$true -installTime $installTime -installNow $cmdInstallNowValue -downloadWACUrl $downloadWACUrl}"""\n}\nelse {\n(Get-Command newWindowsAdminCenterUpdateSchedule).ScriptBlock | Set-Content -path $ScriptFile\nif (-Not(Test-Path $ScriptFile)) {\n$message = "Failed to create file:" + $ScriptFile\nWrite-Error $message\nreturn @{\nIsSuccess = $false\nErrorCode = [UpdateScheduleErrorCode]::scriptNotCreated\n}\n}\n$arg = "-WindowStyle Hidden -File $ScriptFile -downloadWACUrl $downloadWACUrl"\n}\n$RootFolder = $Scheduler.GetFolder("\\")\n$taskName = "WACInstallUpdates"\nif ($RootFolder.GetTasks(0) | Where-Object { $_.Name -eq $taskName }) {\nWrite-Debug("Deleting existing task" + $taskName)\nUnregister-ScheduledTask -TaskName \'WACInstallUpdates\' -Confirm:$false\n}\n$taskTrigger = New-ScheduledTaskTrigger -Once -At $installTime\n$taskSettings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -WakeToRun -RunOnlyIfNetworkAvailable\n$taskAction = New-ScheduledTaskAction `\n-Execute \'powershell.exe\' `\n-Argument $arg\n$description = "Update WAC to the latest version at the defined time"\n$id = [System.Security.Principal.WellKnownSidtype]::BuiltinAdministratorsSid\n$x = new-object System.Security.Principal.SecurityIdentifier -ArgumentList $id, $null\n$translatedID = $x.Translate([System.Security.Principal.NTAccount])\n$taskPrincipal = New-ScheduledTaskPrincipal -GroupId $translatedID.value -RunLevel Highest\nRegister-ScheduledTask `\n-TaskName $taskName `\n-Action $taskAction `\n-Trigger $taskTrigger `\n-Description $description `\n-Settings $taskSettings `\n-Principal $taskPrincipal | Out-Null\nif ($installNow -eq $true) {\nStart-ScheduledTask -TaskName "WACInstallUpdates"\n}\nreturn @{\nIsSuccess = $true\nErrorCode = [UpdateScheduleErrorCode]::noError\n}\n'},m.Remove_InstallUpdateScheduledTask={command:"Remove-InstallUpdateScheduledTask",script:"##Remove-InstallUpdateScheduledTask##:Remove-InstallUpdateScheduledTask.ps1\nImport-Module ScheduledTasks -ErrorAction SilentlyContinue\nUnregister-ScheduledTask -TaskName 'WACInstallUpdates' -Confirm:$false\n"}}(N=f.Updates||(f.Updates={}))}(u||(u={}))},9906:(W,F,d)=>{"use strict";var u=d(6150),s=(d(4155),d(5281)),b=d(8714),c=d(5610),N=d(3678),m=d(7011),E=d(564),M=d(5930);let L=(()=>{class g{preload(l,o){return l.data&&l.data.preload?o():(0,M.of)(null)}static \u0275fac=function(o){return new(o||g)};static \u0275prov=s.Yz7({token:g,factory:g.\u0275fac})}return g})();var I=d(1387);const x=[{path:"extensions",loadChildren:()=>d.e(177).then(d.bind(d,2177)).then(g=>g.ExtensionsRootModule)},{path:"",loadChildren:()=>Promise.all([d.e(420),d.e(576),d.e(817),d.e(975),d.e(531),d.e(380),d.e(485),d.e(417),d.e(709)]).then(d.bind(d,2709)).then(g=>g.ShellModule)}];let z=(()=>{class g{static \u0275fac=function(o){return new(o||g)};static \u0275mod=s.oAB({type:g});static \u0275inj=s.cJS({imports:[I.Bz.forRoot(x,{initialNavigation:"enabledBlocking",preloadingStrategy:L}),I.Bz]})}return g})(),_=(()=>{class g{static \u0275fac=function(o){return new(o||g)};static \u0275cmp=s.Xpm({type:g,selectors:[["sme-root"]],decls:1,vars:0,template:function(o,h){1&o&&s._UZ(0,"router-outlet")},dependencies:[I.lC],encapsulation:2})}return g})(),X=(()=>{class g{static \u0275fac=function(o){return new(o||g)};static \u0275mod=s.oAB({type:g,bootstrap:[_]});static \u0275inj=s.cJS({providers:[L],imports:[m.ez,u.b2,z,E.ioB]})}return g})();var K=d(4174),U=d(3905);var Z=d(3054);let Q=(()=>class g{static version="4.174.0"})();(0,s.G48)();const D={name:N.Xd.nameOfShell,version:Q.version,powerShellModuleName:Z.B.module,powerShellPrefix:Z.B.powerShellPrefix,isProduction:true},Y={},G={};let q=MsftSme.noop;if(window.location.pathname.startsWith("/extensions/")||window.location.pathname.startsWith("/idle"))D.name="msft.sme.shell-extensions",G.websocket=!0,G.cssV2=!0,window.location.pathname.startsWith("/extensions/background")&&(G.disableAccessibility=!0,G.disableStyleInjection=!0);else{console.log('%cWelcome to the Windows Admin Center debugging api. Type "MsftSme.help()" to see a list of available commands',"font-size: medium; font-weight: bold; color: #0078D7;");const g=MsftSme.getLocationSearchParameter("l");g&&!MsftSme.isNullOrWhiteSpace(g.value)&&(Y.azureLocale=g.value),q=()=>{MsftSme.self().Host.isElectron&&(MsftSme.self().Environment.loadPath=location.href.substring(0,location.href.indexOf("/index.html")));const A=MsftSme.getStrings();U.c.setProgressValue("10",A.MsftSmeShell.App.Splash.Messages.preparingAssets),K.X.initialize(true),U.c.setProgressValue("20",A.MsftSmeShell.App.Splash.Messages.bootstrappingAngular)}}b.R.initialize(D,Y,G).then(()=>{q(),u.q6().bootstrapModule(X)},g=>{const A=g;if(!A.extendedSource&&A.extendedSource!==c.U.sources.getNoCache&&A.extendedSource!==c.U.sources.aadSso)throw g;if(A.extendedSource===c.U.sources.aadSso&&!MsftSme.isNullOrWhiteSpace(A.message))return U.c.aadSsoError(A.message),void console.error(A);const l=new URL(A.extended.url);if(403===A.extended.status){const o=window.location,h=new URLSearchParams(o.search),v=new URLSearchParams;for(const $ of["l","theme","staticVersion"])h.has($)&&v.append($,h.get($));const S=encodeURI(o.origin+o.pathname);v.append("redirect",S),window.location.replace(`${l.origin}?${v.toString()}`)}else(0===A.extended.status||404===A.extended.status)&&console.error(`Couldn't access to ${l.origin}: ${A.message}`)})},4155:(W,F,d)=>{"use strict";d(1122),d(5753)},4915:(W,F,d)=>{"use strict";d.d(F,{CA:()=>A,Tb:()=>g,Tx:()=>q,Y:()=>_,kz:()=>U});var u,f,s,b,c=function(l,o){return{name:l,value:void 0===o?-1:o,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},N=function(l,o){try{if(PerformanceObserver.supportedEntryTypes.includes(l)){if("first-input"===l&&!("PerformanceEventTiming"in self))return;var h=new PerformanceObserver(function(v){return v.getEntries().map(o)});return h.observe({type:l,buffered:!0}),h}}catch{}},m=function(l,o){var h=function v(S){"pagehide"!==S.type&&"hidden"!==document.visibilityState||(l(S),o&&(removeEventListener("visibilitychange",v,!0),removeEventListener("pagehide",v,!0)))};addEventListener("visibilitychange",h,!0),addEventListener("pagehide",h,!0)},E=function(l){addEventListener("pageshow",function(o){o.persisted&&l(o)},!0)},M=function(l,o,h){var v;return function(S){o.value>=0&&(S||h)&&(o.delta=o.value-(v||0),(o.delta||void 0===v)&&(v=o.value,l(o)))}},L=-1,I=function(){return"hidden"===document.visibilityState?0:1/0},x=function(){m(function(l){L=l.timeStamp},!0)},z=function(){return L<0&&(L=I(),x(),E(function(){setTimeout(function(){L=I(),x()},0)})),{get firstHiddenTime(){return L}}},_=function(l,o){var h,v=z(),S=c("FCP"),$=function(e){"first-contentful-paint"===e.name&&(O&&O.disconnect(),e.startTime<v.firstHiddenTime&&(S.value=e.startTime,S.entries.push(e),h(!0)))},C=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],O=C?null:N("paint",$);(C||O)&&(h=M(l,S,o),C&&$(C),E(function(e){S=c("FCP"),h=M(l,S,o),requestAnimationFrame(function(){requestAnimationFrame(function(){S.value=performance.now()-e.timeStamp,h(!0)})})}))},X=!1,K=-1,U=function(l,o){X||(_(function(n){K=n.value}),X=!0);var h,v=function(n){K>-1&&l(n)},S=c("CLS",0),$=0,C=[],O=function(n){n.hadRecentInput||($&&n.startTime-C[C.length-1].startTime<1e3&&n.startTime-C[0].startTime<5e3?($+=n.value,C.push(n)):($=n.value,C=[n]),$>S.value&&(S.value=$,S.entries=C,h()))},e=N("layout-shift",O);e&&(h=M(v,S,o),m(function(){e.takeRecords().map(O),h(!0)}),E(function(){$=0,K=-1,S=c("CLS",0),h=M(v,S,o)}))},V={passive:!0,capture:!0},Z=new Date,Q=function(l,o){u||(u=o,f=l,s=new Date,G(removeEventListener),D())},D=function(){if(f>=0&&f<s-Z){var l={entryType:"first-input",name:u.type,target:u.target,cancelable:u.cancelable,startTime:u.timeStamp,processingStart:u.timeStamp+f};b.forEach(function(o){o(l)}),b=[]}},Y=function(l){if(l.cancelable){var o=(l.timeStamp>1e12?new Date:performance.now())-l.timeStamp;"pointerdown"==l.type?(h=o,v=l,S=function(){Q(h,v),C()},$=function(){C()},C=function(){removeEventListener("pointerup",S,V),removeEventListener("pointercancel",$,V)},addEventListener("pointerup",S,V),addEventListener("pointercancel",$,V)):Q(o,l)}var h,v,S,$,C},G=function(l){["mousedown","keydown","touchstart","pointerdown"].forEach(function(o){return l(o,Y,V)})},q=function(l,o){var h,v=z(),S=c("FID"),$=function(O){O.startTime<v.firstHiddenTime&&(S.value=O.processingStart-O.startTime,S.entries.push(O),h(!0))},C=N("first-input",$);h=M(l,S,o),C&&m(function(){C.takeRecords().map($),C.disconnect()},!0),C&&E(function(){S=c("FID"),h=M(l,S,o),b=[],f=-1,u=null,G(addEventListener),b.push($),D()})},ee={},g=function(l,o){var h,v=z(),S=c("LCP"),$=function(e){var n=e.startTime;n<v.firstHiddenTime&&(S.value=n,S.entries.push(e),h())},C=N("largest-contentful-paint",$);if(C){h=M(l,S,o);var O=function(){ee[S.id]||(C.takeRecords().map($),C.disconnect(),ee[S.id]=!0,h(!0))};["keydown","click"].forEach(function(e){addEventListener(e,O,{once:!0,capture:!0})}),m(O,!0),E(function(e){S=c("LCP"),h=M(l,S,o),requestAnimationFrame(function(){requestAnimationFrame(function(){S.value=performance.now()-e.timeStamp,ee[S.id]=!0,h(!0)})})})}},A=function(l){var o,h=c("TTFB");o=function(){try{var v=performance.getEntriesByType("navigation")[0]||function(){var S=performance.timing,$={entryType:"navigation",startTime:0};for(var C in S)"navigationStart"!==C&&"toJSON"!==C&&($[C]=Math.max(S[C]-S.navigationStart,0));return $}();if(h.value=h.delta=v.responseStart,h.value<0||h.value>performance.now())return;h.entries=[v],l(h)}catch{}},"complete"===document.readyState?setTimeout(o,0):addEventListener("load",function(){return setTimeout(o,0)})}},6616:(W,F,d)=>{var u={"./af":76,"./af.js":76,"./ar":9392,"./ar-dz":9786,"./ar-dz.js":9786,"./ar-kw":9616,"./ar-kw.js":9616,"./ar-ly":2415,"./ar-ly.js":2415,"./ar-ma":1950,"./ar-ma.js":1950,"./ar-sa":7565,"./ar-sa.js":7565,"./ar-tn":4264,"./ar-tn.js":4264,"./ar.js":9392,"./az":3843,"./az.js":3843,"./be":7544,"./be.js":7544,"./bg":5557,"./bg.js":5557,"./bm":4431,"./bm.js":4431,"./bn":8769,"./bn-bd":3546,"./bn-bd.js":3546,"./bn.js":8769,"./bo":4012,"./bo.js":4012,"./br":9654,"./br.js":9654,"./bs":6772,"./bs.js":6772,"./ca":8172,"./ca.js":8172,"./cs":4145,"./cs.js":4145,"./cv":5084,"./cv.js":5084,"./cy":7684,"./cy.js":7684,"./da":2621,"./da.js":2621,"./de":268,"./de-at":5784,"./de-at.js":5784,"./de-ch":4364,"./de-ch.js":4364,"./de.js":268,"./dv":5772,"./dv.js":5772,"./el":1758,"./el.js":1758,"./en-au":2557,"./en-au.js":2557,"./en-ca":4831,"./en-ca.js":4831,"./en-gb":9589,"./en-gb.js":9589,"./en-ie":6950,"./en-ie.js":6950,"./en-il":7356,"./en-il.js":7356,"./en-in":3623,"./en-in.js":3623,"./en-nz":3223,"./en-nz.js":3223,"./en-sg":6268,"./en-sg.js":6268,"./eo":4190,"./eo.js":4190,"./es":6983,"./es-do":611,"./es-do.js":611,"./es-mx":2010,"./es-mx.js":2010,"./es-us":7210,"./es-us.js":7210,"./es.js":6983,"./et":4419,"./et.js":4419,"./eu":8558,"./eu.js":8558,"./fa":9169,"./fa.js":9169,"./fi":8719,"./fi.js":8719,"./fil":4176,"./fil.js":4176,"./fo":8604,"./fo.js":8604,"./fr":4354,"./fr-ca":1744,"./fr-ca.js":1744,"./fr-ch":4285,"./fr-ch.js":4285,"./fr.js":4354,"./fy":7505,"./fy.js":7505,"./ga":1667,"./ga.js":1667,"./gd":5128,"./gd.js":5128,"./gl":2411,"./gl.js":2411,"./gom-deva":172,"./gom-deva.js":172,"./gom-latn":4252,"./gom-latn.js":4252,"./gu":9612,"./gu.js":9612,"./he":9301,"./he.js":9301,"./hi":9232,"./hi.js":9232,"./hr":1094,"./hr.js":1094,"./hu":9430,"./hu.js":9430,"./hy-am":719,"./hy-am.js":719,"./id":2186,"./id.js":2186,"./is":1763,"./is.js":1763,"./it":765,"./it-ch":6969,"./it-ch.js":6969,"./it.js":765,"./ja":9834,"./ja.js":9834,"./jv":4278,"./jv.js":4278,"./ka":3959,"./ka.js":3959,"./kk":4302,"./kk.js":4302,"./km":1573,"./km.js":1573,"./kn":2808,"./kn.js":2808,"./ko":3006,"./ko.js":3006,"./ku":2370,"./ku.js":2370,"./ky":3965,"./ky.js":3965,"./lb":8729,"./lb.js":8729,"./lo":3297,"./lo.js":3297,"./lt":8418,"./lt.js":8418,"./lv":9153,"./lv.js":9153,"./me":2569,"./me.js":2569,"./mi":223,"./mi.js":223,"./mk":9234,"./mk.js":9234,"./ml":3043,"./ml.js":3043,"./mn":6420,"./mn.js":6420,"./mr":1637,"./mr.js":1637,"./ms":8068,"./ms-my":4459,"./ms-my.js":4459,"./ms.js":8068,"./mt":9128,"./mt.js":9128,"./my":6525,"./my.js":6525,"./nb":8897,"./nb.js":8897,"./ne":2387,"./ne.js":2387,"./nl":9534,"./nl-be":6937,"./nl-be.js":6937,"./nl.js":9534,"./nn":2817,"./nn.js":2817,"./oc-lnc":7214,"./oc-lnc.js":7214,"./pa-in":4973,"./pa-in.js":4973,"./pl":2878,"./pl.js":2878,"./pt":2608,"./pt-br":4452,"./pt-br.js":4452,"./pt.js":2608,"./ro":8095,"./ro.js":8095,"./ru":5819,"./ru.js":5819,"./sd":2149,"./sd.js":2149,"./se":6870,"./se.js":6870,"./si":8647,"./si.js":8647,"./sk":871,"./sk.js":871,"./sl":4347,"./sl.js":4347,"./sq":4741,"./sq.js":4741,"./sr":5074,"./sr-cyrl":2928,"./sr-cyrl.js":2928,"./sr.js":5074,"./ss":4577,"./ss.js":4577,"./sv":6967,"./sv.js":6967,"./sw":7580,"./sw.js":7580,"./ta":9384,"./ta.js":9384,"./te":8228,"./te.js":8228,"./tet":74,"./tet.js":74,"./tg":6952,"./tg.js":6952,"./th":1539,"./th.js":1539,"./tk":2277,"./tk.js":2277,"./tl-ph":252,"./tl-ph.js":252,"./tlh":8966,"./tlh.js":8966,"./tr":2200,"./tr.js":2200,"./tzl":509,"./tzl.js":509,"./tzm":2231,"./tzm-latn":1580,"./tzm-latn.js":1580,"./tzm.js":2231,"./ug-cn":5582,"./ug-cn.js":5582,"./uk":4162,"./uk.js":4162,"./ur":5284,"./ur.js":5284,"./uz":9449,"./uz-latn":8127,"./uz-latn.js":8127,"./uz.js":9449,"./vi":7288,"./vi.js":7288,"./x-pseudo":8275,"./x-pseudo.js":8275,"./yo":5249,"./yo.js":5249,"./zh-cn":8119,"./zh-cn.js":8119,"./zh-hk":9610,"./zh-hk.js":9610,"./zh-mo":3741,"./zh-mo.js":3741,"./zh-tw":7512,"./zh-tw.js":7512};function f(b){var c=s(b);return d(c)}function s(b){if(!d.o(u,b)){var c=new Error("Cannot find module '"+b+"'");throw c.code="MODULE_NOT_FOUND",c}return u[b]}f.keys=function(){return Object.keys(u)},f.resolve=s,W.exports=f,f.id=6616},4795:(W,F,d)=>{"use strict";function u(s,b,c,N,m,E,M){try{var L=s[E](M),I=L.value}catch(x){return void c(x)}L.done?b(I):Promise.resolve(I).then(N,m)}function f(s){return function(){var b=this,c=arguments;return new Promise(function(N,m){var E=s.apply(b,c);function M(I){u(E,N,m,M,L,"next",I)}function L(I){u(E,N,m,M,L,"throw",I)}M(void 0)})}}d.d(F,{Z:()=>f})},2970:(W,F,d)=>{"use strict";function c(e,n,r,t){var p,i=arguments.length,a=i<3?n:null===t?t=Object.getOwnPropertyDescriptor(n,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,t);else for(var P=e.length-1;P>=0;P--)(p=e[P])&&(a=(i<3?p(a):i>3?p(n,r,a):p(n,r))||a);return i>3&&a&&Object.defineProperty(n,r,a),a}function N(e,n){return function(r,t){n(r,t,e)}}function I(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function x(e,n,r,t){return new(r||(r=Promise))(function(a,p){function P(w){try{y(t.next(w))}catch(R){p(R)}}function j(w){try{y(t.throw(w))}catch(R){p(R)}}function y(w){w.done?a(w.value):function i(a){return a instanceof r?a:new r(function(p){p(a)})}(w.value).then(P,j)}y((t=t.apply(e,n||[])).next())})}function D(e){return this instanceof D?(this.v=e,this):new D(e)}function Y(e,n,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,t=r.apply(e,n||[]),a=[];return i={},p("next"),p("throw"),p("return"),i[Symbol.asyncIterator]=function(){return this},i;function p(T){t[T]&&(i[T]=function(k){return new Promise(function(B,H){a.push([T,k,B,H])>1||P(T,k)})})}function P(T,k){try{!function j(T){T.value instanceof D?Promise.resolve(T.value.v).then(y,w):R(a[0][2],T)}(t[T](k))}catch(B){R(a[0][3],B)}}function y(T){P("next",T)}function w(T){P("throw",T)}function R(T,k){T(k),a.shift(),a.length&&P(a[0][0],a[0][1])}}function q(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function K(e){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&e[n],t=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r);function t(a){r[a]=e[a]&&function(p){return new Promise(function(P,j){!function i(a,p,P,j){Promise.resolve(j).then(function(y){a({value:y,done:P})},p)}(P,j,(p=e[a](p)).done,p.value)})}}}d.d(F,{FC:()=>Y,KL:()=>q,fM:()=>N,gn:()=>c,mG:()=>x,qq:()=>D,w6:()=>I}),"function"==typeof SuppressedError&&SuppressedError}},W=>{W.O(0,[817,975,509,531,865,57,683,436,967,37],()=>W(W.s=9906)),W.O()}]);
0
3669.ps1
function Test-GetServerServiceObjective { $rg = Create-ResourceGroupForTest $rg | Out-String | Write-Output $server = Create-ServerForTest $rg $server | Out-String | Write-Output $requestedSlo = "GP_Gen5_2" $requestedSloFilter = "GP_Gen*_2" try { $o = Get-AzSqlServerServiceObjective $rg.ResourceGroupName $server.ServerName Assert-AreNotEqual 0 $o.Length "Expected more than 0 service objectives" $o = Get-AzSqlServerServiceObjective $rg.ResourceGroupName $server.ServerName $requestedSlo Assert-AreEqual 1 $o.Length "Could not find exactly 1 service objective for $requestedSlo" $o = Get-AzSqlServerServiceObjective -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ServiceObjectiveName $requestedSlo Assert-AreEqual 1 $o.Length "Could not find exactly 1 service objective for $requestedSlo" $o = Get-AzSqlServerServiceObjective -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ServiceObjectiveName $requestedSloFilter Assert-True {$o.Length -ge 2} "Expected 2 or more service objectives for $requestedSloFilter, actual $($o.Length)" } finally { Remove-ResourceGroupForTest $rg } } function Test-GetServerServiceObjectiveByLocation { $location = "Japan East" $requestedSlo = "GP_Gen5_2" $requestedSloFilter = "GP_Gen*_2" $o = Get-AzSqlServerServiceObjective -Location $location Assert-AreNotEqual 0 $o.Length "Expected more than 0 service objectives" $o = Get-AzSqlServerServiceObjective -Location $location -ServiceObjectiveName $requestedSlo Assert-AreEqual 1 $o.Length "Could not find exactly 1 service objective for $requestedSlo" $o = Get-AzSqlServerServiceObjective -Location $location -ServiceObjectiveName $requestedSloFilter Assert-True {$o.Length -ge 2} "Expected 2 or more service objectives for $requestedSloFilter, actual $($o.Length)" }
0
2280.ps1
[CmdLetBinding()] param( [parameter(Mandatory=$true, HelpMessage="Name of the Site server with the SMS Provider")] [ValidateNotNullOrEmpty()] [string]$SiteServer, [parameter(Mandatory=$true, HelpMessage="Name of the device that will be checked for warranty")] [ValidateNotNullOrEmpty()] [string]$DeviceName, [parameter(Mandatory=$true, HelpMessage="ResourceID of the device")] [ValidateNotNullOrEmpty()] [string]$ResourceID ) Begin { try { $SiteCodeObjects = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction Stop foreach ($SiteCodeObject in $SiteCodeObjects) { if ($SiteCodeObject.ProviderForLocalSite -eq $true) { $SiteCode = $SiteCodeObject.SiteCode } } } catch [Exception] { Throw "Unable to determine SiteCode" } } Process { function Load-Form { $Form.Controls.AddRange(@( $BlogLink, $ButtonGet, $TBComputerName, $TBServiceTag, $TBModel, $GBServiceTag, $GBComputerName, $GBModel, $DataGridView )) $Form.Add_Shown({$Form.Activate()}) [void]$Form.ShowDialog() } function Prompt-MessageBox { param( [Parameter(Mandatory=$true)] [string]$Message, [Parameter(Mandatory=$true)] [string]$WindowTitle, [Parameter(Mandatory=$true)] [System.Windows.Forms.MessageBoxButtons]$Buttons = [System.Windows.Forms.MessageBoxButtons]::OK, [Parameter(Mandatory=$true)] [System.Windows.Forms.MessageBoxIcon]$Icon = [System.Windows.Forms.MessageBoxIcon]::None ) return [System.Windows.Forms.MessageBox]::Show($Message, $WindowTitle, $Buttons, $Icon) } function Get-AssetInformation { param( [Parameter(Mandatory=$true)] [alias("SerialNumber")] [string]$ServiceTag ) $WebService = New-WebServiceProxy -Uri "http://xserv.dell.com/services/AssetService.asmx?WSDL" -UseDefaultCredential $AssetInformation = $WebService.GetAssetInformation(([GUID]::NewGuid()).Guid,"Dell Warranty",$ServiceTag) $AssetHeaderData = $AssetInformation | Select-Object -Property AssetHeaderData $Entitlements = $AssetInformation | Select-Object -Property Entitlements foreach ($Entitlement in $Entitlements.Entitlements | Where-Object { ($_.ServiceLevelCode -ne "D") }) { if (($Entitlement.ServiceLevelDescription -ne $null) -or ($Entitlement.ServiceLevelCode -ne $null)) { $DataGridView.Rows.Add( $Entitlement.ServiceLevelDescription, (Get-Date -Year ($Entitlement.StartDate.Year) -Month ($Entitlement.StartDate.Month) -Day ($Entitlement.StartDate.Day)).ToShortDateString(), (Get-Date -Year ($Entitlement.EndDate.Year) -Month ($Entitlement.EndDate.Month) -Day ($Entitlement.EndDate.Day)).ToShortDateString(), $Entitlement.DaysLeft, $Entitlement.EntitlementType ) } } } function Get-DeviceComputerSystemInfo { param( [Parameter(Mandatory=$true)] [string]$ResourceID, [Parameter(Mandatory=$true)] [ValidateSet("Model","SerialNumber")] [string]$Property ) switch ($Property) { "Model" { $DeviceQuery = "SELECT * FROM SMS_G_System_COMPUTER_SYSTEM WHERE ResourceID like '$($ResourceID)'" } "SerialNumber" { $DeviceQuery = "SELECT * FROM SMS_G_System_PC_BIOS WHERE ResourceID like '$($ResourceID)'" } } $DeviceComputerSystem = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Query $DeviceQuery -ComputerName $SiteServer -ErrorAction SilentlyContinue if ($DeviceComputerSystem -ne $null) { return $DeviceComputerSystem } } function Validate-DeviceHardwareInventory { param( [Parameter(Mandatory=$true)] [string]$ResourceID ) $DeviceQuery = "SELECT * FROM SMS_G_System_COMPUTER_SYSTEM WHERE ResourceID like '$($ResourceID)'" $DeviceValidation = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Query $DeviceQuery -ComputerName $SiteServer -ErrorAction SilentlyContinue if ($DeviceValidation -eq $null) { $ButtonClicked = Prompt-MessageBox -Message "No valid hardware inventory found for $($Script:DeviceName)" -WindowTitle "Hardware inventory error" -Buttons OK -Icon Error if ($ButtonClicked -eq "OK") { $Form.Dispose() $Form.Close() } } else { return $true } } function Show-Warranty { $ButtonGet.Enabled = $false if ($DataGridView.RowCount -ge 1) { $DataGridView.Rows.Clear() } $TBModel.ResetText() $TBServiceTag.ResetText() if ((Validate-DeviceHardwareInventory -ResourceID $ResourceID) -eq $true) { $SerialNumber = Get-DeviceComputerSystemInfo -ResourceID $ResourceID -Property SerialNumber | Select-Object -ExpandProperty SerialNumber if ($SerialNumber.Length -eq 7) { $Model = Get-DeviceComputerSystemInfo -ResourceID $ResourceID -Property Model | Select-Object -ExpandProperty Model $TBServiceTag.Text = $SerialNumber $TBModel.Text = $Model [System.Windows.Forms.Application]::DoEvents() Get-AssetInformation -ServiceTag $SerialNumber } else { $ButtonClicked = Prompt-MessageBox -Message "A non-Dell service tag was found for $($Script:DeviceName)" -WindowTitle "Service tag error" -Buttons OK -Icon Error if ($ButtonClicked -eq "OK") { $Form.Dispose() $Form.Close() } } } $ButtonGet.Enabled = $true } Add-Type -AssemblyName "System.Drawing" Add-Type -AssemblyName "System.Windows.Forms" $Form = New-Object System.Windows.Forms.Form $Form.Size = New-Object System.Drawing.Size(600,315) $Form.MinimumSize = New-Object System.Drawing.Size(600,315) $Form.MaximumSize = New-Object System.Drawing.Size(600,315) $Form.SizeGripStyle = "Hide" $Form.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($PSHome + "\powershell.exe") $Form.Text = "Dell Warranty Status 2.0" $GBComputerName = New-Object System.Windows.Forms.GroupBox $GBComputerName.Location = New-Object System.Drawing.Size(10,10) $GBComputerName.Size = New-Object System.Drawing.Size(160,50) $GBComputerName.Text = "Device name" $GBServiceTag = New-Object System.Windows.Forms.GroupBox $GBServiceTag.Location = New-Object System.Drawing.Size(180,10) $GBServiceTag.Size = New-Object System.Drawing.Size(100,50) $GBServiceTag.Text = "Service tag" $GBModel = New-Object System.Windows.Forms.GroupBox $GBModel.Location = New-Object System.Drawing.Size(290,10) $GBModel.Size = New-Object System.Drawing.Size(170,50) $GBModel.Text = "Model" $TBComputerName = New-Object System.Windows.Forms.TextBox $TBComputerName.Location = New-Object System.Drawing.Size(20,30) $TBComputerName.Size = New-Object System.Drawing.Size(140,20) $TBComputerName.Text = $DeviceName $TBComputerName.ReadOnly = $true $TBServiceTag = New-Object System.Windows.Forms.TextBox $TBServiceTag.Location = New-Object System.Drawing.Size(190,30) $TBServiceTag.Size = New-Object System.Drawing.Size(80,20) $TBServiceTag.ReadOnly = $true $TBModel = New-Object System.Windows.Forms.TextBox $TBModel.Location = New-Object System.Drawing.Size(300,30) $TBModel.Size = New-Object System.Drawing.Size(150,20) $TBModel.ReadOnly = $true $ButtonGet = New-Object System.Windows.Forms.Button $ButtonGet.Location = New-Object System.Drawing.Size(475,23) $ButtonGet.Size = New-Object System.Drawing.Size(100,30) $ButtonGet.Text = "Show Warranty" $ButtonGet.Add_Click({Show-Warranty}) $OpenLink = {[System.Diagnostics.Process]::Start("http://www.scconfigmgr.com")} $BlogLink = New-Object System.Windows.Forms.LinkLabel $BlogLink.Location = New-Object System.Drawing.Size(9,255) $BlogLink.Size = New-Object System.Drawing.Size(150,25) $BlogLink.Text = "www.scconfigmgr.com" $BlogLink.Add_Click($OpenLink) $DataGridView = New-Object System.Windows.Forms.DataGridView $DataGridView.Location = New-Object System.Drawing.Size(10,70) $DataGridView.Size = New-Object System.Drawing.Size(565,180) $DataGridView.AllowUserToAddRows = $false $DataGridView.AllowUserToDeleteRows = $false $DataGridView.AutoSizeColumnsMode = [System.Windows.Forms.DataGridViewAutoSizeColumnsMode]::Fill $DataGridView.ColumnCount = 5 $DataGridView.ColumnHeadersVisible = $true $DataGridView.Columns[0].Name = "Warranty Type" $DataGridView.Columns[0].AutoSizeMode = "Fill" $DataGridView.Columns[1].Name = "Start Date" $DataGridView.Columns[1].AutoSizeMode = "Fill" $DataGridView.Columns[2].Name = "End Date" $DataGridView.Columns[2].AutoSizeMode = "Fill" $DataGridView.Columns[3].Name = "Days Left" $DataGridView.Columns[3].AutoSizeMode = "Fill" $DataGridView.Columns[4].Name = "Status" $DataGridView.Columns[4].AutoSizeMode = "Fill" $DataGridView.ColumnHeadersHeightSizeMode = "DisableResizing" $DataGridView.AllowUserToResizeRows = $false $DataGridView.RowHeadersWidthSizeMode = "DisableResizing" $DataGridView.RowHeadersVisible = $false $DataGridView.Anchor = "Top, Bottom, Left, Right" $DataGridView.Name = "DGVWarranty" $DataGridView.ReadOnly = $true $DataGridView.BackGroundColor = "White" $DataGridView.TabIndex = "5" Load-Form }
0
sample_7_99.ps1
#************************************************ # TS_IntersiteMessagingStateCheck.ps1 # Version 1.0.1 # Date: 6/6/2012 # Author: v-kaw # Description: [Idea ID 2882] [Windows] The stop of Intersite Messaging service on ISTG causes DFSN cannot calculate site costs # Rule number: 2882 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?ID=2882 #************************************************ Import-LocalizedData -BindingVariable ScriptStrings Display-DefaultActivity -Rule -RuleNumber 2882 $RuleApplicable = $false $RootCauseDetected = $false $RootCauseName = "RC_IntersiteMessagingStateCheck" $PublicContent = "http://technet.microsoft.com/en-us/library/cc755994(v=WS.10).aspx#w2k3tr_repto_how_imft" $InternalContent = "" $Verbosity = "Warning" $Visibility = "4" $SupportTopicsID = "8038" $Title = $ScriptStrings.ID_IntersiteMessagingStateCheck_ST $InformationCollected = new-object PSObject # *************************** # Data Gathering # *************************** Function AppliesToSystem { #Add your logic here to specify on which environments this rule will apply return ( ( (($OSVersion.Major -eq 5) -and ($OSVersion.Minor -eq 2)) -or # Windows Server 2003, (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 0)) -or # Windows Server 2008, (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 1)) -or # Windows 2008 R2, (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 2)) -or # Windows Server 2012 ($OSVersion.Major -eq 10) ) -and (IsDomainController) ) # Domain Controller } Function IsDomainController() #Check if the machine is a DC. { return (CheckReg -Key "HKLM:\SYSTEM\CurrentControlSet\Control\ProductOptions" -Property "ProductType" -Value "LanmanNT") } function CheckReg($Key,$Property,$Value) #Check if the registry key property has a specific value. { if(Test-Path -Path $Key) { if(((Get-ItemProperty -Path $Key).$Property) -eq $Value) { return $true } } return $false } Function CollectedData { if(CheckIsmServState) { Add-member -InputObject $InformationCollected -membertype noteproperty -name "Service Name" -value $Service.Name Add-member -InputObject $InformationCollected -membertype noteproperty -name "Current State" -value $Service.State Add-member -InputObject $InformationCollected -membertype noteproperty -name "Startup Type" -value $Service.StartMode return $true } } # ************** # Detection Logic # ************** Function CheckIsmServState() { $Script:Service = Get-CimInstance -Class Win32_service -Namespace "root\CIMV2" -Filter "Name='IsmServ'" if($Service.State -eq 'Stopped') #Check if the 'Intersite Messaging' (IsmServ) is stopped { return $true } return $false } #Check to see if rule is applicable to this computer if (AppliesToSystem) { $RuleApplicable = $true if (CollectedData -eq $true) { $RootCauseDetected = $true } } # ********************* # Root Cause processing # ********************* if ($RuleApplicable) { if ($RootCauseDetected) { # Red/ Yellow Light Update-DiagRootCause -id $RootCauseName -Detected $true Write-GenericMessage -RootCauseId $RootCauseName -PublicContentURL $PublicContent -InformationCollected $InformationCollected -Verbosity $Verbosity -Visibility $Visibility -SupportTopicsID $SupportTopicsID -InternalContentURL $InternalContent -SolutionTitle $Title } else { # Green Light Update-DiagRootCause -id $RootCauseName -Detected $false } } # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAX8qDgNhaGEGsw # pu+kTlXnJkKwnk7pBXfkxxFr0RUZ1qCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxM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JlB/ # 1wm7lASakdnqW2ePizE7CEUSKOShv6Cr0d/fBgkUykm8ljGeYama5HsfRxT/OYHL # I9KhhFFpWKnqI0WBMPdyxj79sDdpDgKklTeig+xOFp58DGBFbabVb8FmjBLytDGE # fyAUEHj5CgvIDtvkR1DjBTP9B4dBjnMqcHUsOhSVEx9fS2inW8LzzAgA94WLfqae # SNIgkujc+Y+4CSk7+iwBvTPyyoD5OwGNeIv7xjLVlqQOlJ8zdNL4TGWQxt2VKwq3 # jnzGVZSlXg9a1fgb2zBG5vpwRm7uqlnEsTTX1oq1fVzfrZWy6D+SuHRMpFJ12CP1 # 57CIjBn/mOsD3CjXnqG3UiIiq+eSkDIN856QqV/dxxhIOpyzP1t+AGgZtF+11WPG # Plqx5J0xn9vq0hbpnNjYJIS3KhM9D3O+bHBslKDQYTTa5u5QUVtnTztbJVLZJvYr # P+oIQjzbmVXKpoAJp3/aQGtrq/ZcG4gIzF/J6DfxSHzZGfeVv4AjnwcKufFhnsnO # jVwGAevvlRpnuRKoxL4alYodB8cy4h+Epj3HwgS0ZqrUE673sh4BLvMxDSqBkx+q # Yy29Wr/wgUcU9aXeTVbyl8KP0Y9Ke/PCexuMIYynkkm6I51e0bYOhPCHCjEU+z8G # MusHXfj2T700m0W+etdjyDQ= # SIG # End signature block
0
sample_2_67.ps1
#************************************************ # TS_HPPrinterDriverVersionCheck.ps1 # Version 1.0.1 # Date: 07/23/2013 # Author: v-alyao # Description: [KSE Rule] [ Windows V3] HKCU\Software\Hewlett-Packard registry hive increases in size on Citrix servers # Rule number: ca320e17-1fa3-4740-9f81-c97f299741b0 # Rule URL: https://kse.microsoft.com/Contribute/Idea/953fdd18-e9ca-4e44-81d4-fe5e613ed747 #************************************************ Import-LocalizedData -BindingVariable ScriptStrings Display-DefaultActivity -Rule -RuleNumber ca320e17-1fa3-4740-9f81-c97f299741b0 $RuleApplicable = $false $RootCauseDetected = $false $RootCauseName = "RC_HPPrinterDriverVersionCheck" $InformationCollected = new-object PSObject $Script:HPPrinterDriverRegKey = "" # *************************** # Data Gathering # *************************** Function AppliesToSystem { #Add your logic here to specify on which environments this rule will apply if((($OSVersion.Major -eq 5) -and ($OSVersion.Minor -eq 2)) -or #Windows Server 2003 (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 0)) -or #Vista, 2008 (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 1)) -or #Win7, 2008 R2 (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 2))) #Win8, 2012 { $RDSEnabled = isRDSEnabled if($RDSEnabled) { $Script:HPPrinterDriverRegKey = GetHPPrinterDriverRegKey if($Script:HPPrinterDriverRegKey -ne "") { "[AppliesToSystem] HP Universal Printing Driver information was found from " + $HPPrinterDriver | WriteTo-StdOut -shortformat return $true } } } return $false } Function isRDSEnabled { trap [Exception] { WriteTo-ErrorDebugReport -ErrorRecord $_ -ScriptErrorText ("[isRDSEnabled] Checking if RDS is Enabled") continue } "Checking if RDS is Enabled" | WriteTo-StdOut $RDSEnabled = $false if ((Get-CimInstance -Class Win32_OperatingSystem -Property ProductType).ProductType -ne 1) #Server { $TSSetting = (Get-CimInstance -Class Win32_TerminalServiceSetting -Namespace "root\CIMV2\TerminalServices").TerminalServerMode if (($null -ne $TSSetting) -and ($TSSetting -eq 1)) { $RDSEnabled = $true } } "RDS is Enabled: $RDSEnabled" | WriteTo-StdOut return $RDSEnabled } Function GetEnvironment([switch]$RegKey) { if($RegKey.IsPresent) { if($OSArchitecture -eq "AMD64") { $environment = "Windows x64" } elseif($OSArchitecture -eq "IA64") { $environment = "Windows IA64" } else { $environment = "Windows NT x86" } } else { if($OSArchitecture -eq "AMD64") { $environment = "x64" } elseif($OSArchitecture -eq "IA64") { $environment = "IA64" } else { $environment = "W32X86" } } return $environment } Function GetHPPrinterDriverRegKey() { $HPPrinterDriverRegKey = "" $PrintRegKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments" $environment = GetEnvironment -RegKey $DriverRegKey = Join-Path (Join-Path $PrintRegKey $environment) "Drivers" # Version-2 - Windows NT 4.0 - ignore this # Version-3 - Windows 2000 or newer $DriverWithVersionRegKey = Join-Path $DriverRegKey "Version-3" if(Test-Path $DriverWithVersionRegKey) { $DriverWithVersion = Get-Item $DriverWithVersionRegKey $SubKeys = $DriverWithVersion.GetSubKeyNames() foreach($subKey in $SubKeys) { if($subKey.StartsWith("HP Universal Printing")) { $HPPrinterDriverRegKey = Join-Path $DriverWithVersionRegKey $subKey } } } return $HPPrinterDriverRegKey } Function CheckHPVersionAndRegKeyNumber() { $IsRuleFired = $false $HPPrinterDriverInfo = Get-ItemProperty $Script:HPPrinterDriverRegKey if(($null -ne $HPPrinterDriverInfo) -and ($null -ne $HPPrinterDriverInfo.'Configuration File')) { $environment = GetEnvironment # 2 - Windows NT 4.0 - ignore this # 3 - Windows 2000 or newer $configFilePath = Join-Path (Join-Path (Join-Path "$Env:windir\system32\spool\drivers" $environment) "3") ($HPPrinterDriverInfo.'Configuration File') if(Test-Path $configFilePath) { $fileInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($configFilePath) $versions = $fileInfo.FileVersion.Split(".") if(([int]$versions[0] -lt 61) -or (([int]$versions[0] -eq 61) -and ([int]$versions[1] -le 71))) { $InformationCollected | add-member -membertype noteproperty -name "HP Universal Printing Driver Version" -value ($fileInfo.FileVersion) $IsRuleFired = $true } } } #If the number of registry keys is more than $RedNumberOfRegKey, fire the rule $RedNumberOfRegKey = 50 $HPHKCURegKey = "HKCU:\Software\Hewlett-Packard" if(Test-Path $HPHKCURegKey) { $HPHKCU = Get-ChildItem $HPHKCURegKey -Recurse if(($null -ne $HPHKCU) -and ($HPHKCU.Count -gt $RedNumberOfRegKey)) { $InformationCollected | add-member -membertype noteproperty -name "Number Of HP Registry Keys" -value ($HPHKCU.Count) $IsRuleFired = $true } } return $IsRuleFired } # ************** # Detection Logic # ************** #Check to see if rule is applicable to this computer if (AppliesToSystem) { $RuleApplicable = $true $RootCauseDetected = CheckHPVersionAndRegKeyNumber #Add information to InformationCollected #$InformationCollected | add-member -membertype noteproperty -name "Information Collected Name" -value $Value } # ********************* # Root Cause processing # ********************* if ($RuleApplicable) { if ($RootCauseDetected) { # Red/ Yellow Light Update-DiagRootCause -id $RootCauseName -Detected $true Add-GenericMessage -Id $RootCauseName -InformationCollected $InformationCollected } else { # Green Light Update-DiagRootCause -id $RootCauseName -Detected $false } } # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBZmenKdq00Ivon # oyqzPdCzAe0iR0wBcAmfcBn1BMORGaCCDYUwggYDMIID66ADAgECAhMzAAAEA73V # lV0POxitAAAAAAQDMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTEzWhcNMjUwOTExMjAxMTEzWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCfdGddwIOnbRYUyg03O3iz19XXZPmuhEmW/5uyEN+8mgxl+HJGeLGBR8YButGV # LVK38RxcVcPYyFGQXcKcxgih4w4y4zJi3GvawLYHlsNExQwz+v0jgY/aejBS2EJY # oUh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peKVhVQA/Ojco1NmfDtkrKhC # 4Mu5KzJ9b1FKNEIeFa3bPoafahO9ePtFMRM0a+bkF8Ntssc9sC7g5B0qja2ltTav # XR8idHMD2K4TjH2xyvIts7KHhA/ser/HdImu0TLsn4vN/Bp+4PNklqKkLJz67Wzy # aVBT/emSeCs/5Ux5XSaKnykTkBgOh2gQzhyITWJG0wI89a/WYBSM4w/VDhPS0FUv # MPFO8Y1Z56iN72v7zcpBFiox6UrddykK/fCoplS/pqDYw4bm53S9cF613VKf6BYi # KWbFb2xB/xi2ReNMNQt+FD4D+c2bjKpn+N/Zjk4= # SIG # End signature block
0
353.ps1
function Register-PSFLoggingProvider { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Register-PSFLoggingProvider')] Param ( [Parameter(Mandatory = $true)] [string] $Name, [switch] $Enabled, [System.Management.Automation.ScriptBlock] $RegistrationEvent, [System.Management.Automation.ScriptBlock] $BeginEvent = { }, [System.Management.Automation.ScriptBlock] $StartEvent = { }, [Parameter(Mandatory = $true)] [System.Management.Automation.ScriptBlock] $MessageEvent, [System.Management.Automation.ScriptBlock] $ErrorEvent = { }, [System.Management.Automation.ScriptBlock] $EndEvent = { }, [System.Management.Automation.ScriptBlock] $FinalEvent = { }, [System.Management.Automation.ScriptBlock] $ConfigurationParameters = { }, [System.Management.Automation.ScriptBlock] $ConfigurationScript = { }, [System.Management.Automation.ScriptBlock] $IsInstalledScript = { $true }, [System.Management.Automation.ScriptBlock] $InstallationScript = { }, [System.Management.Automation.ScriptBlock] $InstallationParameters = { }, [System.Management.Automation.ScriptBlock] $ConfigurationSettings, [switch] $EnableException ) if ([PSFramework.Logging.ProviderHost]::Providers.ContainsKey($Name.ToLower())) { return } if ($ConfigurationSettings) { . $ConfigurationSettings } if (Test-PSFParameterBinding -ParameterName Enabled) { Set-PSFConfig -FullName "LoggingProvider.$Name.Enabled" -Value $Enabled.ToBool() -DisableHandler } $provider = New-Object PSFramework.Logging.Provider $provider.Name = $Name $provider.BeginEvent = $BeginEvent $provider.StartEvent = $StartEvent $provider.MessageEvent = $MessageEvent $provider.ErrorEvent = $ErrorEvent $provider.EndEvent = $EndEvent $provider.FinalEvent = $FinalEvent $provider.ConfigurationParameters = $ConfigurationParameters $provider.ConfigurationScript = $ConfigurationScript $provider.IsInstalledScript = $IsInstalledScript $provider.InstallationScript = $InstallationScript $provider.InstallationParameters = $InstallationParameters $provider.IncludeModules = Get-PSFConfigValue -FullName "LoggingProvider.$Name.IncludeModules" -Fallback @() $provider.ExcludeModules = Get-PSFConfigValue -FullName "LoggingProvider.$Name.ExcludeModules" -Fallback @() $provider.IncludeTags = Get-PSFConfigValue -FullName "LoggingProvider.$Name.IncludeTags" -Fallback @() $provider.ExcludeTags = Get-PSFConfigValue -FullName "LoggingProvider.$Name.ExcludeTags" -Fallback @() $provider.InstallationOptional = Get-PSFConfigValue -FullName "LoggingProvider.$Name.InstallOptional" -Fallback $false [PSFramework.Logging.ProviderHost]::Providers[$Name.ToLower()] = $provider try { if ($RegistrationEvent) { . $RegistrationEvent } } catch { $dummy = $null $null = [PSFramework.Logging.ProviderHost]::Providers.TryRemove($Name.ToLower(), [ref] $dummy) Stop-PSFFunction -Message "Failed to register logging provider '$Name' - Registration event failed." -ErrorRecord $_ -EnableException $EnableException -Tag 'logging', 'provider', 'fail', 'register' return } $shouldEnable = Get-PSFConfigValue -FullName "LoggingProvider.$Name.Enabled" -Fallback $false $isInstalled = [System.Management.Automation.ScriptBlock]::Create($provider.IsInstalledScript).Invoke() if (-not $isInstalled -and (Get-PSFConfigValue -FullName "LoggingProvider.$Name.AutoInstall" -Fallback $false)) { try { Install-PSFLoggingProvider -Name $Name -EnableException } catch { if ($provider.InstallationOptional) { Write-PSFMessage -Level Warning -Message "Failed to install logging provider '$Name'" -ErrorRecord $_ -Tag 'logging', 'provider', 'fail', 'install' -EnableException $EnableException } else { Stop-PSFFunction -Message "Failed to install logging provider '$Name'" -ErrorRecord $_ -EnableException $EnableException -Tag 'logging', 'provider', 'fail', 'install' return } } } if ($shouldEnable) { if ($isInstalled) { $provider.Enabled = $true } else { Stop-PSFFunction -Message "Failed to enable logging provider $Name on registration! It was not recognized as installed. Consider running 'Install-PSFLoggingProvider' to properly install the prerequisites." -ErrorRecord $_ -EnableException $EnableException -Tag 'logging', 'provider', 'fail', 'install' return } } }
0
3334.ps1
function Get-MyCommands { [PoshBot.BotCommand( Aliases = ('mycommands') )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot ) $myCommands = $Bot.PluginManager.Commands.GetEnumerator().ForEach({ if ($_.Value.IsAuthorized($global:PoshBotContext.From, $Bot.RoleManager)) { $arrPlgCmdVer = $_.Name.Split(':') $plugin = $arrPlgCmdVer[0] $command = $arrPlgCmdVer[1] $version = $arrPlgCmdVer[2] [pscustomobject]@{ FullCommandName = "$plugin`:$command" Aliases = ($_.Value.Aliases -join ', ') Type = $_.Value.TriggerType.ToString() Version = $version } } }) | Sort-Object -Property FullCommandName $text = ($myCommands | Format-Table -AutoSize | Out-String) New-PoshBotTextResponse -Text $text -AsCode }
0
2796.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT FullName, LastWriteTimeUtc, PSComputerName FROM *PrefetchListing.tsv ORDER BY LastWriteTimeUtc Desc "@ & logparser -stats:off -i:csv -fixedsep:on -dtlines:0 -rtp:-1 $lpquery } else { $ScriptName = [System.IO.Path]::GetFileName($MyInvocation.ScriptName) "${ScriptName} requires logparser.exe in the path." }
0
1935.ps1
Describe "Compare-Object" -Tags "CI" { BeforeAll { $nl = [Environment]::NewLine $content1 = "line 1" + $nl + "line 2" $content2 = "line 1" + $nl + "line 2.1" $content3 = "line 1" + $nl + "line 2" + $nl + "line 3" $content4 = "line 1" + $nl + "line 2.1" + $nl + "Line 3" $file1 = Join-Path -Path $TestDrive -ChildPath "test1.txt" $file2 = Join-Path -Path $TestDrive -ChildPath "test2.txt" $file3 = Join-Path -Path $TestDrive -ChildPath "test3.txt" $file4 = Join-Path -Path $TestDrive -ChildPath "test4.txt" $null = New-Item $file1 -ItemType file -Value $content1 -Force $null = New-Item $file2 -ItemType file -Value $content2 -Force $null = New-Item $file3 -ItemType file -Value $content3 -Force $null = New-Item $file4 -ItemType file -Value $content4 -Force } It "Should be able to compare the same object using the referenceObject and differenceObject switches" { { Compare-Object -ReferenceObject $(Get-Content $file1) -DifferenceObject $(Get-Content $file2) } | Should -Not -Throw } It "Should not throw when referenceobject switch is not used" { { Compare-Object $(Get-Content $file1) -DifferenceObject $(Get-Content $file2) } | Should -Not -Throw } It "Should not throw when differenceobject switch is not used" { { Compare-Object -ReferenceObject $(Get-Content $file1) $(Get-Content $file2) } | Should -Not -Throw } It "Should indicate data that exists only in the reference dataset" { $actualOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) $actualOutput[1].SideIndicator | Should -BeExactly "<=" } It "Should indicate data that exists only in the difference dataset" { $actualOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) $actualOutput[1].SideIndicator | Should -BeExactly "<=" } It "Should indicate data that exists in both datasets when the includeEqual switch is used" { $actualOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -IncludeEqual $actualOutput.Length | Should -Be 4 $actualOutput[0].SideIndicator | Should -BeExactly "==" $actualOutput[1].SideIndicator | Should -BeExactly "==" } It "Should be able to use the casesensitive switch" { { Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -CaseSensitive } | Should -Not -Throw } It "Should correctly indicate that different cases are different when the casesensitive switch is used" { $caOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -CaseSensitive $ncaOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) $caOutput.Length | Should -Be 4 $ncaOutput[1].SideIndicator | Should -Not -Be $caOutput[1].SideIndicator $ncaOutput[2].SideIndicator | Should -Not -Be $caOutput[2].SideIndicator $ncaOutput[3].SideIndicator | Should -Not -Be $caOutput[3].SideIndicator } It "Should throw when reference set is null" { { Compare-Object -ReferenceObject $anonexistentvariable -DifferenceObject $(Get-Content $file4) } | Should -Throw } It "Should throw when difference set is null" { { Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $anonexistentvariable } | Should -Throw } It "Should give a 0 array when using excludedifferent switch without also using the includeequal switch" { $actualOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -ExcludeDifferent $actualOutput.Length | Should -Be 0 } It "Should only display equal lines when excludeDifferent switch is used alongside the includeequal switch" { $actualOutput = Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -IncludeEqual -ExcludeDifferent $actualOutput.Length | Should -Be 2 } It "Should be able to pass objects to pipeline using the passthru switch" { { Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -Passthru | Format-Wide } | Should -Not -Throw } It "Should be able to specify the property of two objects to compare" { $actualOutput = Compare-Object -ReferenceObject $file3 -DifferenceObject $TestDrive -Property Length $actualOutput[0].Length | Should -BeNullOrEmpty $actualOutput[1].Length | Should -BeGreaterThan 0 $actualOutput[0].Length | Should -Not -Be $actualOutput[1].Length } It "Should be able to specify the syncwindow without error" { { Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -syncWindow 5 } | Should -Not -Throw { Compare-Object -ReferenceObject $(Get-Content $file3) -DifferenceObject $(Get-Content $file4) -syncWindow 8 } | Should -Not -Throw } It "Should have the expected output when changing the syncwindow" { $var1 = 1..15 $var2 = 15..1 $actualOutput = Compare-Object -ReferenceObject $var1 -DifferenceObject $var2 -syncWindow 6 $actualOutput[0].InputObject | Should -Be 15 $actualOutput[1].InputObject | Should -Be 1 $actualOutput[2].InputObject | Should -Be 1 $actualOutput[3].InputObject | Should -Be 15 $actualOutput[0].SideIndicator | Should -BeExactly "=>" $actualOutput[1].SideIndicator | Should -BeExactly "<=" $actualOutput[2].SideIndicator | Should -BeExactly "=>" $actualOutput[3].SideIndicator | Should -BeExactly "<=" } } Describe "Compare-Object DRT basic functionality" -Tags "CI" { if(-not ([System.Management.Automation.PSTypeName]'Employee').Type) { Add-Type -TypeDefinition @" public class Employee { public Employee(){} public Employee(string firstName, string lastName, int yearsInMS) { FirstName = firstName; LastName = lastName; YearsInMS = yearsInMS; } public string FirstName; public string LastName; public int YearsInMS; } public class EmployeeComparable : Employee, System.IComparable { public EmployeeComparable( string firstName, string lastName, int yearsInMS) : base(firstName, lastName, yearsInMS) {} public int CompareTo(object obj) { EmployeeComparable ec = obj as EmployeeComparable; if (null == ec) return -1; if (FirstName != ec.FirstName) return -1; if (LastName != ec.LastName) return -1; if (YearsInMS != ec.YearsInMS) return -1; return 0; } } public class EmployeeDefinesSideIndicator : EmployeeComparable { public EmployeeDefinesSideIndicator( string firstName, string lastName, int yearsInMS) : base(firstName, lastName, yearsInMS) {} public string SideIndicator { get { throw new System.ArgumentException("get_SideIndicator"); } set { throw new System.ArgumentException("get_SideIndicator"); } } } "@ } else { Add-Type -TypeDefinition @" public class EmployeeComparable : Employee, System.IComparable { public EmployeeComparable( string firstName, string lastName, int yearsInMS) : base(firstName, lastName, yearsInMS) {} public int CompareTo(object obj) { EmployeeComparable ec = obj as EmployeeComparable; if (null == ec) return -1; if (FirstName != ec.FirstName) return -1; if (LastName != ec.LastName) return -1; if (YearsInMS != ec.YearsInMS) return -1; return 0; } } public class EmployeeDefinesSideIndicator : EmployeeComparable { public EmployeeDefinesSideIndicator( string firstName, string lastName, int yearsInMS) : base(firstName, lastName, yearsInMS) {} public string SideIndicator { get { throw new System.ArgumentException("get_SideIndicator"); } set { throw new System.ArgumentException("get_SideIndicator"); } } } "@ } It "Compare-Object with 1 referenceObject and 1 differenceObject should work"{ $empsReference = @([EmployeeComparable]::New("john","smith",5)) $empsDifference = @([EmployeeComparable]::New("mary","jane",5)) $boolvalues=@($true,$false) foreach($recordEqual in $boolvalues) { foreach($excludeDifferent in $boolvalues) { foreach($passthru in $boolvalues) { $result = Compare-Object -ReferenceObject $empsReference -IncludeEqual:$recordEqual -ExcludeDifferent:$excludeDifferent -Passthru:$passthru -DifferenceObject $empsDifference if(!$excludeDifferent) { $result.Count | Should -Be 2 if($passthru) { $result[0] | Should -Be $empsDifference $result[1] | Should -Be $empsReference } else { $result[0].InputObject | Should -Be $empsDifference $result[1].InputObject | Should -Be $empsReference $result[0].SideIndicator | Should -BeExactly "=>" $result[1].SideIndicator | Should -BeExactly "<=" } } else { $result.Count | Should -Be 0 } } } } } It "Compare-Object with 2 referenceObjects and 1 differenceObject should work"{ $empsReference = @([EmployeeComparable]::New("john","smith",5),[EmployeeComparable]::New("mary","jane",3)) $empsDifference = @([EmployeeComparable]::New("john","smith",5)) $boolvalues=@($true,$false) foreach($recordEqual in $boolvalues) { foreach($excludeDifferent in $boolvalues) { foreach($passthru in $boolvalues) { $result = Compare-Object -ReferenceObject $empsReference -IncludeEqual:$recordEqual -ExcludeDifferent:$excludeDifferent -Passthru:$passthru -DifferenceObject $empsDifference if($recordEqual) { if(!$excludeDifferent) { $result.Count | Should -Be 2 if($passthru) { $result[0] | Should -Be $empsReference[0] $result[1] | Should -Be $empsReference[1] } else { $result[0].InputObject | Should -Be $empsReference[0] $result[1].InputObject | Should -Be $empsReference[1] $result[0].SideIndicator | Should -BeExactly "==" $result[1].SideIndicator | Should -BeExactly "<=" } } else { if($passthru) { $result | Should -Be $empsReference[0] } else { $result.InputObject | Should -Be $empsReference[0] $result.SideIndicator | Should -BeExactly "==" } } } else { if(!$excludeDifferent) { if($passthru) { $result | Should -Be $empsReference[1] } else { $result.InputObject | Should -Be $empsReference[1] $result.SideIndicator | Should -BeExactly "<=" } } else { $result.Count | Should -Be 0 } } } } } } It "Compare-Object with 0 SyncWindow should work"{ $empsReference = @([EmployeeComparable]::New("john","smith",5)) $empsDifference = @([EmployeeComparable]::New("john","smith",5),[EmployeeComparable]::New("mary","jane",3)) $boolvalues=@($true,$false) foreach($recordEqual in $boolvalues) { foreach($excludeDifferent in $boolvalues) { foreach($passthru in $boolvalues) { $result = Compare-Object -ReferenceObject $empsReference -IncludeEqual:$recordEqual -ExcludeDifferent:$excludeDifferent -Passthru:$passthru -DifferenceObject $empsDifference -SyncWindow:0 if($recordEqual) { if(!$excludeDifferent) { $result.Count | Should -Be 2 if($passthru) { $result[0] | Should -Be $empsReference $result[1] | Should -Be $empsDifference[1] } else { $result[0].InputObject | Should -Be $empsReference $result[1].InputObject | Should -Be $empsDifference[1] $result[0].SideIndicator | Should -BeExactly "==" $result[1].SideIndicator | Should -BeExactly "=>" } } else { if($passthru) { $result | Should -Be $empsReference } else { $result.InputObject | Should -Be $empsReference $result.SideIndicator | Should -BeExactly "==" } } } else { if(!$excludeDifferent) { if($passthru) { $result | Should -Be $empsDifference[1] } else { $result.InputObject | Should -Be $empsDifference[1] $result.SideIndicator | Should -BeExactly "=>" } } else { $result.Count | Should -Be 0 } } } } } } It "Compare-Object with SyncWindow should work"{ $empsReference = @([EmployeeComparable]::New("mary","jane",3),[EmployeeComparable]::New("john","smith",5),[EmployeeComparable]::New("jack", "black", 15),[EmployeeComparable]::New("jim", "bob", 1)) $empsDifference = @([EmployeeComparable]::New("jack", "black", 15),[EmployeeComparable]::New("jim", "bob", 1),[EmployeeComparable]::New("mary","jane",3),[EmployeeComparable]::New("john","smith",5)) $boolvalues=@($true,$false) foreach($recordEqual in $boolvalues) { foreach($excludeDifferent in $boolvalues) { foreach($passthru in $boolvalues) { $result = Compare-Object -ReferenceObject $empsReference -IncludeEqual:$recordEqual -ExcludeDifferent:$excludeDifferent -Passthru:$passthru -DifferenceObject $empsDifference -SyncWindow:2 if($recordEqual) { $result.Count | Should -Be 4 if($passthru) { $result[0] | Should -Be $empsReference[0] $result[1] | Should -Be $empsReference[2] $result[2] | Should -Be $empsReference[1] $result[3] | Should -Be $empsReference[3] } else { $result[0].InputObject | Should -Be $empsReference[0] $result[0].SideIndicator | Should -BeExactly "==" $result[1].InputObject | Should -Be $empsReference[2] $result[1].SideIndicator | Should -BeExactly "==" $result[2].InputObject | Should -Be $empsReference[1] $result[2].SideIndicator | Should -BeExactly "==" $result[3].InputObject | Should -Be $empsReference[3] $result[3].SideIndicator | Should -BeExactly "==" } } else { $result.Count | Should -Be 0 } } } } } It "Compare-Object with Script Block Property Parameter should work"{ $a = [version]"1.2.3.4" $b = [version]"5.6.7.8" $result = Compare-Object $a $b -IncludeEqual -Property {$_.Major},{$_.Minor} $result[0] | Select-Object -ExpandProperty "*Major" | Should -Be 5 $result[0] | Select-Object -ExpandProperty "*Minor" | Should -Be 6 $result[0].SideIndicator | Should -BeExactly "=>" $result[1] | Select-Object -ExpandProperty "*Major" | Should -Be 1 $result[1] | Select-Object -ExpandProperty "*Minor" | Should -Be 2 $result[1].SideIndicator | Should -BeExactly "<=" } It "Compare-Object with no ReferenceObject nor DifferenceObject: output nothing, no error and should work"{ $result = Compare-Object @() @() $result | Should -BeNullOrEmpty } It "Compare-Object with no DifferenceObject should work"{ $result = Compare-Object @() @("diffObject") $result.InputObject | Should -BeExactly "diffObject" $result.SideIndicator | Should -BeExactly "=>" } It "Compare-Object with no ReferenceObject should work"{ $result = Compare-Object @("refObject") @() $result.InputObject | Should -BeExactly "refObject" $result.SideIndicator | Should -BeExactly "<=" } }
0
sample_20_32.ps1
#************************************************ # DC_DiskInfo.ps1 # Version 1.0 # Date: 09-05-2023 # Author: Edmund Spatariu # Updated: # Description: This script obtains Disk Info and associate a drive letter with corresponding LUN, saving output to a # file named $ComputerName_DC_DiskInfo.txt #************************************************ #Last Updated Date: 09-05-2023 #Updated By: #Description: #************************************************ if($debug -eq $true){[void]$shell.popup("Run DC_DiskInfo.ps1")} Import-LocalizedData -BindingVariable DiskInfoStrings -FileName DC_DiskInfo -UICulture en-us Write-DiagProgress -Activity $DiskInfoStrings.ID_DiskInfo -Status $DiskInfoStrings.ID_DiskInfoRunning $fileDescription = $DiskInfoStrings.ID_DiskInfoOutput $sectionDescription = $DiskInfoStrings.ID_DiskInfoOutputDesc $OutputFile = $ComputerName + "_DiskInfo.txt" "==============================================" | Out-File -FilePath $OutputFile "Associate Drive Letter with LUN" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "`n" | Out-File -FilePath $OutputFile -append Get-CimInstance Win32_DiskDrive | ForEach-Object { $disk = $_ $partitions = "ASSOCIATORS OF " + "{Win32_DiskDrive.DeviceID='$($disk.DeviceID)'} " + "WHERE AssocClass = Win32_DiskDriveToDiskPartition" Get-CimInstance -Query $partitions | ForEach-Object { $partition = $_ $drives = "ASSOCIATORS OF " + "{Win32_DiskPartition.DeviceID='$($partition.DeviceID)'} " + "WHERE AssocClass = Win32_LogicalDiskToPartition" Get-CimInstance -Query $drives | ForEach-Object { Write-Host "" New-Object -Type PSCustomObject -Property @{ DriveLetter = $_.DeviceID VolumeName = $_.VolumeName FileSystem = $_.Filesystem Partition = $partition.Name Size = $_.Size FreeSpace = $_.FreeSpace Disk = $disk.DeviceID DiskModel = $disk.Model LUN = $disk.SCSILogicalUnit Port = $disk.SCSIPort BUS = $disk.SCSIBus } } | Sort-Object -Property DriveLetter |Select-Object DriveLetter, VolumeName, FileSystem, Partition, Size, FreeSpace, Disk, DiskModel, LUN, Port, BUS } } | Out-File $OutputFile -append "`n`n`n`n`n" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "Get-CimInstance -Class Win32_DiskDrive" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "`n" | Out-File -FilePath $OutputFile -append Get-CimInstance -Class Win32_DiskDrive -Namespace 'root\CIMV2' | Format-List -Property * | Out-File -Append $OutputFile "`n`n`n`n`n" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "Get-CimInstance -Class Win32_LogicalDisk" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "`n" | Out-File -FilePath $OutputFile -append Get-CimInstance -Class Win32_LogicalDisk -Namespace 'root\CIMV2' | Format-List -Property * | Out-File -Append $OutputFile "`n`n`n`n`n" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "Get-CimInstance -Class Win32_DiskPartition" | Out-File -FilePath $OutputFile -append "==============================================" | Out-File -FilePath $OutputFile -append "`n" | Out-File -FilePath $OutputFile -append Get-CimInstance -Class Win32_DiskPartition -Namespace 'root\CIMV2' | Format-List -Property * | Out-File -Append $OutputFile CollectFiles -filesToCollect $OutputFile -fileDescription $fileDescription -sectionDescription $sectionDescription # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCEYyWUGOQJapkS # WT32K2spdXRX9g6KVh+pEYPLkGtU/6CCDYUwggYDMIID66ADAgECAhMzAAAEA73V # lV0POxitAAAAAAQDMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTEzWhcNMjUwOTExMjAxMTEzWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCfdGddwIOnbRYUyg03O3iz19XXZPmuhEmW/5uyEN+8m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nKhneSyFbzhhp3WOjnuPIUTU099sB7f # f1ZrJgwCPFpl9fkWAdkQkFwMsnJW8JIYJ8OeBGk99fR0KOoBxI9Sx3kZBb5DAKKt # t3gN/gc5j+NmkzunlHMFQyh/nOrpP4LHSSwpJQ8g+buEFFpzinVuRRYq/lsGCS8W # U9b8lAIP0JwKk1RBCX3rEPJXQ202DvSvxtPkAXBLQgD1yr8MgZsYEY8GFawjkEPD # D3fL+JEYXe5kNDnLTJOl7Syk31rK4uFV2T/erGcOba1K00Bg06L27/GUFaEFTWYp # pfFpFjaz+5DAGLp0eZmp/kik8G1/F1osuOLvIgG+aDWM1XyVxCjGmBTv3mT1MlDi # tJOoRgE4m4PpkOtxFq+gBFVdVP7pQWVdSUDJHqE= # SIG # End signature block
0
327.ps1
function Get-PSFScriptblock { [OutputType([PSFramework.Utility.ScriptBlockItem], ParameterSetName = 'List')] [OutputType([System.Management.Automation.ScriptBlock], ParameterSetName = 'Name')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidDefaultValueForMandatoryParameter", "")] [CmdletBinding(DefaultParameterSetName = 'Name')] param ( [Parameter(ParameterSetName = 'List')] [Parameter(Mandatory = $true, ParameterSetName = 'Name', ValueFromPipeline = $true)] [string[]] $Name = '*', [Parameter(Mandatory = $true, ParameterSetName = 'List')] [switch] $List ) begin { [System.Collections.ArrayList]$sent = @() $allItems = [PSFramework.Utility.UtilityHost]::ScriptBlocks.Values } process { :main foreach ($nameText in $Name) { switch ($PSCmdlet.ParameterSetName) { 'Name' { if ($sent -contains $nameText) { continue main } $null = $sent.Add($nameText) [PSFramework.Utility.UtilityHost]::ScriptBlocks[$nameText].ScriptBlock } 'List' { foreach ($item in $allItems) { if ($item.Name -notlike $nameText) { continue } if ($sent -contains $item.Name) { continue } $null = $sent.Add($item.Name) $item } } } } } }
0
sample_66_13.ps1
# # Module manifest for module 'OCI.PSModules.Containerinstances' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '3c897ac4-90c6-4ac2-9c82-899415d38f04' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Containerinstances Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '87.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Containerinstances.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIContainerinstancesContainer', 'Get-OCIContainerinstancesContainerInstance', 'Get-OCIContainerinstancesContainersList', 'Get-OCIContainerinstanceshapesList', 'Get-OCIContainerinstancesList', 'Get-OCIContainerinstancesWorkRequest', 'Get-OCIContainerinstancesWorkRequestErrorsList', 'Get-OCIContainerinstancesWorkRequestLogsList', 'Get-OCIContainerinstancesWorkRequestsList', 'Invoke-OCIContainerinstancesRetrieveLogs', 'Move-OCIContainerinstancesContainerInstanceCompartment', 'New-OCIContainerinstancesContainerInstance', 'Remove-OCIContainerinstancesContainerInstance', 'Restart-OCIContainerinstancesContainerInstance', 'Start-OCIContainerinstancesContainerInstance', 'Stop-OCIContainerinstancesContainerInstance', 'Update-OCIContainerinstancesContainer', 'Update-OCIContainerinstancesContainerInstance' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Containerinstances' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
chkhash_19.ps1
# calculate SHA512 of file. function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider]; $hashAlgorithm = new-object $cryptoServiceProvider $stream = $file.OpenRead(); $hashByteArray = $hashAlgorithm.ComputeHash($stream); $stream.Close(); ## We have to be sure that we close the file stream if any exceptions are thrown. trap { if ($stream -ne $null) { $stream.Close(); } break; } foreach ($byte in $hashByteArray) { if ($byte -lt 16) {$result += “0{0:X}” -f $byte } else { $result += “{0:X}” -f $byte }} return [string]$result; } function noequal ( $first, $second) { if (!($second) -or $second -eq "") {return $true} $first=join-path $first "\\" foreach($s in $second) { if ($first.tolower().startswith($s.tolower())) {return $false} } return $true } # chkhash.ps1 [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #3] [-u] [-h [path of .xml database]] # -u updates the XML file database and exits # otherwise, all files are checked against the XML file database. # -h specifies location of xml hash database $hashespath=".\\hashes.xml" del variable:\\args3 -ea 0 del variable:\\args2 -ea 0 del variable:\\xfiles -ea 0 del variable:\\files -ea 0 del variable:\\exclude -ea 0 $args3=@() $args2=@($args) $nu = 0 $errs = 0 $fc = 0 $fm = 0 $upd = $false $create = $false "ChkHash.ps1 - ChkHash.ps1 can create a .XML database of files and their SHA-512 hashes and check files against the database, " "in order to detect corrupt or hacked files." "" ".\\chkhash.ps1 -h for usage." "" for($i=0;$i -lt $args2.count; $i++) { if ($args2[$i] -like "-h*") # -help specified? { "Usage: .\\chkhash.ps1 [-h] [-u] [-c] [-x <file path of hashes .xml database>] [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #n] [-e <Dirs>]" "Options: -h - Help display." " -c - Create hash database. If .xml hash database does not exist, -c will be assumed." " -u - Update changed files and add new files to existing database." " -x - specifies .xml database file path to use. Default is .\\hashes.xml" " -e - exclude dirs. Put this after the files/dirs you want to check with SHA512 and needs to be fullpath (e.g. c:\\users\\bob not ..\\bob)." "" "Examples: PS>.\\chkhash.ps1 c:\\ d:\\ -c -x c:\\users\\bob\\hashes\\hashes.xml" " [hash all files on c:\\ and d:\\ and subdirs, create and store hashes in c:\\users\\bob\\hashes\\hashes.xml]" " PS>.\\chkhash.ps1 c:\\users\\alice\\pictures\\sunset.jpg -u -x c:\\users\\alice\\hashes\\pictureshashes.xml]" " [hash c:\\users\\alice\\pictures\\sunset.jpg and add or update the hash to c:\\users\\alice\\hashes\\picturehashes.xml" " PS>.\\chkhash.ps1 c:\\users\\eve\\documents d:\\media\\movies -x c:\\users\\eve\\hashes\\private.xml" " [hash all files in c:\\users\\eve\\documents and d:\\media\\movies, check against hashes stored in c:\\users\\eve\\hashes\\private.xml" " or create it and store hashes there if not present]" " PS>.\\chkhash.ps1 c:\\users\\eve -x c:\\users\\eve\\hashes\\private.xml -e c:\\users\\eve\\hashes" " [hash all files in c:\\users\\eve and subdirs, check hashes against c:\\users\\eve\\hashes\\private.xml or store if not present, exclude " " c:\\users\\eve\\hashes directory and subdirs]" " PS>.\\chkhash.p1s c:\\users\\ted\\documents\\f* d:\\data -x d:\\hashes.xml -e d:\\data\\test d:\\data\\favorites -u" " [hash all files starting with 'f' in c:\\users\\ted\\documents, and all files in d:\\data, add or update hashes to" " existing d:\\hashes.xml, exclude d:\\data\\test and d:\\data\\favorites and subdirs]" " PS>.\\chkhash -x c:\\users\\alice\\hashes\\hashes.xml" " [Load hashes.xml and check hashes of all files contained within.]" "" "Note: files in subdirectories of any specified directory are automatically processed." " if you specify only an -x option, or no option and .\\hash.xml exists, only files in the database will be checked." exit } if ($args2[$i] -like "-u*") {$upd=$true;continue} # Update and Add new files to database? if ($args2[$i] -like "-c*") {$create=$true;continue} # Create database specified? if ($args2[$i] -like "-x*") { $i++ # Get hashes xml database path if ($i -ge $args2.count) { write-host "-X specified but no file path of .xml database specified. Exiting." exit } $hashespath=$args2[$i] continue } if ($args2[$i] -like "-e*") # Exclude files, dirs { while (($i+1) -lt $args2.count) { $i++ if ($args2[$i] -like "-*") {break} $exclude+=@(join-path $args2[$i] "\\") # collect array of excluded directories. } continue } $args3+=@($args2[$i]) # Add files/dirs } if ($args3.count -ne 0) { # Get list of files and SHA512 hash them. "Enumerating files from specified locations..." $files=@(dir $args3 -recurse -ea 0 | ?{$_.mode -notmatch "d"} | ?{noequal $_.directoryname $exclude}) # Get list of files if ($files.count -eq 0) {"No files found. Exiting."; exit} if ($create -eq $true -or !(test-path $hashespath)) # Create database? { # Create SHA512 hashes of files and write to new database $files = $files | %{write-host "SHA-512 Hashing `"$($_.fullname)`" ...";add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru} $files |export-clixml $hashespath "Created $hashespath" "$($files.count) file hash(es) saved. Exiting." exit } write-host "Loading file hashes from $hashespath..." -nonewline $xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database if ($xfiles.count -eq 0) {"No files specified and no files in Database. Exiting.";Exit} } else { if (!(test-path $hashespath)) {"No database found or specified, exiting."; exit} write-host "Loading file hashes from $hashespath..." -nonewline $xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database and check it if ($xfiles.count -eq 0) {"No files specified and no files in Database. Exiting.";Exit} $files=$xfiles } "Loaded $($xfiles.count) file hash(es)." $hash=@{} for($x=0;$x -lt $xfiles.count; $x++) # Build dictionary (hash) of filenames and indexes into file array { if ($hash.contains($xfiles[$x].fullname)) {continue} $hash.Add($xfiles[$x].fullname,$x) } foreach($f in $files) { if ((get-item -ea 0 $f.fullname) -eq $null) {continue} # skip if file no longer exists. $n=($hash.($f.fullname)) if ($n -eq $null) { $nu++ # increment needs/needed updating count if ($upd -eq $false) {"Needs to be added: `"$($f.fullname)`"";continue} # if not updating, then continue "SHA-512 Hashing `"$($f.fullname)`" ..." # Create SHA512 hash of file $f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force} $xfiles+=@($f) # then add file + hash to list continue } $f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force} $fc++ # File checked increment. if ($xfiles[$n].SHA512 -eq $f.SHA512) # Check SHA512 for mixmatch. {$fm++;continue} # if matched, increment file matches and continue loop $errs++ # increment mixmatches if ($upd -eq $true) { $xfiles[$n]=$f; "Updated `"$($f.fullname)`"";continue} "Bad SHA-512 found: `"$($f.fullname)`"" } if ($upd -eq $true) # if database updated { $xfiles|export-clixml $hashespath # write xml database "Updated $hashespath" "$nu file hash(es) added to database." "$errs file hash(es) updated in database." exit } "$errs SHA-512 mixmatch(es) found." "$fm file(s) SHA512 matched." "$fc file(s) checked total." if ($nu -ne 0) {"$nu file(s) need to be added [run with -u option to Add file hashes to database]."}
0
sample_35_57.ps1
# # Module manifest for module 'OCI.PSModules.Resourcemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcemanager.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '73e0f641-602c-4457-9e79-f05b84ced282' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Resourcemanager Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '74.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Resourcemanager.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIResourcemanagerConfigurationSourceProvider', 'Get-OCIResourcemanagerConfigurationSourceProvidersList', 'Get-OCIResourcemanagerJob', 'Get-OCIResourcemanagerJobAssociatedResourcesList', 'Get-OCIResourcemanagerJobDetailedLogContent', 'Get-OCIResourcemanagerJobLogs', 'Get-OCIResourcemanagerJobLogsContent', 'Get-OCIResourcemanagerJobOutputsList', 'Get-OCIResourcemanagerJobsList', 'Get-OCIResourcemanagerJobTfConfig', 'Get-OCIResourcemanagerJobTfPlan', 'Get-OCIResourcemanagerJobTfState', 'Get-OCIResourcemanagerPrivateEndpoint', 'Get-OCIResourcemanagerPrivateEndpointsList', 'Get-OCIResourcemanagerReachableIp', 'Get-OCIResourcemanagerResourceDiscoveryServicesList', 'Get-OCIResourcemanagerStack', 'Get-OCIResourcemanagerStackAssociatedResourcesList', 'Get-OCIResourcemanagerStackResourceDriftDetailsList', 'Get-OCIResourcemanagerStacksList', 'Get-OCIResourcemanagerStackTfConfig', 'Get-OCIResourcemanagerStackTfState', 'Get-OCIResourcemanagerTemplate', 'Get-OCIResourcemanagerTemplateCategoriesList', 'Get-OCIResourcemanagerTemplateLogo', 'Get-OCIResourcemanagerTemplatesList', 'Get-OCIResourcemanagerTemplateTfConfig', 'Get-OCIResourcemanagerTerraformVersionsList', 'Get-OCIResourcemanagerWorkRequest', 'Get-OCIResourcemanagerWorkRequestErrorsList', 'Get-OCIResourcemanagerWorkRequestLogsList', 'Get-OCIResourcemanagerWorkRequestsList', 'Invoke-OCIResourcemanagerDetectStackDrift', 'Move-OCIResourcemanagerConfigurationSourceProviderCompartment', 'Move-OCIResourcemanagerPrivateEndpointCompartment', 'Move-OCIResourcemanagerStackCompartment', 'Move-OCIResourcemanagerTemplateCompartment', 'New-OCIResourcemanagerConfigurationSourceProvider', 'New-OCIResourcemanagerJob', 'New-OCIResourcemanagerPrivateEndpoint', 'New-OCIResourcemanagerStack', 'New-OCIResourcemanagerTemplate', 'Remove-OCIResourcemanagerConfigurationSourceProvider', 'Remove-OCIResourcemanagerPrivateEndpoint', 'Remove-OCIResourcemanagerStack', 'Remove-OCIResourcemanagerTemplate', 'Stop-OCIResourcemanagerJob', 'Update-OCIResourcemanagerConfigurationSourceProvider', 'Update-OCIResourcemanagerJob', 'Update-OCIResourcemanagerPrivateEndpoint', 'Update-OCIResourcemanagerStack', 'Update-OCIResourcemanagerTemplate' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Resourcemanager' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_31_88.ps1
# WARNING: this need to be set by the getExtVersion $env:TEST_EXTENSION_VERSION = "2.4.2" # get the local path $myPath = Split-Path -parent $MyInvocation.MyCommand.Path $env:TEST_LOCAL_PATH="$myPath" if (-not [Environment]::GetEnvironmentVariable('TEST_EXTENSIONS_PATH')) { $env:TEST_EXTENSIONS_PATH = $(Join-Path $PWD dotvscode) } if ($env:TEST_VSCODE_CLEANUP -Eq $true) { # cleanup Write-Output "Clearing dotvscode" # remove .vscode configuration files Remove-Item -Recurse -Force "$env:TEST_EXTENSIONS_PATH" # remove .apollox Remove-Item -Recurse -Force "$env:HOME/.apollox" } # remove out and recompiled it, this is useful for local tests if (Test-Path .\out) { Remove-Item -Recurse -Force .\out } # get test-resources # Performed on VSCode 1.86.2 as vscode-extension-tester fixed for VSCode 1.87.0 # has not been released yet npx extest get-vscode -c 1.86.2 npx extest get-chromedriver -c 1.86.2 # install npx extest install-vsix -e "$env:TEST_EXTENSIONS_PATH" -f ./apollox-vscode-linux-x64-$env:TEST_EXTENSION_VERSION.vsix
0
sample_42_75.ps1
param() if (Get-Module posh-vcpkg) { return } if ($PSVersionTable.PSVersion.Major -lt 5) { Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.") return } if (Test-Path Function:\TabExpansion) { Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup } function TabExpansion($line, $lastWord) { $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart() switch -regex ($lastBlock) { "^(?<vcpkgexe>(\./|\.\\|)vcpkg(\.exe|)) (?<remaining>.*)$" { & $matches['vcpkgexe'] autocomplete $matches['remaining'] return } # Fall back on existing tab expansion default { if (Test-Path Function:\VcpkgTabExpansionBackup) { VcpkgTabExpansionBackup $line $lastWord } } } } $exportModuleMemberParams = @{ Function = @( 'TabExpansion' ) } Export-ModuleMember @exportModuleMemberParams # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDHZjpMevSjAPcs # /aTP8aVTWBuPE0L4AxomP0cA936m/KCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBj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pHA/dS3b/4Uhr4KCsgnl # C98DOlDlV0/EcRqwJH1HiTW6CL7kUfM8QQmScaAWkz/zgv/XwEI06vHw9CM2tlxe # BTc6zk23fWPqSzlpA02rD1PVfaG5RccW9IvrAYbbx7HAYlzrzr31QKC7exXoY02z # jqICI0X5oSrdMSzZfCJaYJzciKWLfkO+4GotAsHSjHlokMGxik0pVCmN85TKJ0kE # zI8DqoSjluYnrCRzKZm4SsddM3hjBr/uGaU0sFun1GrxQI3Z76FCpFf0FkJETb1L # 8rlwviPrZeAyPWpzNFAz3VI= # SIG # End signature block
0
3324.ps1
function Get-ScheduledCommand { [PoshBot.BotCommand( Aliases = ('getschedule', 'get-schedule'), Permissions = 'manage-schedules' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [string]$Id ) $fields = @( 'Id', @{l='Command';e={$_.Message.Text}} @{l='Interval';e={"Every $($_.TimeValue) $($_.TimeInterval)"}} 'TimesExecuted' @{l='StartAfter';e={$_.StartAfter.ToString('u')}} 'Enabled' ) if ($Id) { if ($schedule = $Bot.Scheduler.GetSchedule($Id)) { $msg = ($schedule | Select-Object -Property $fields | Format-List | Out-String).Trim() New-PoshBotTextResponse -Text $msg -AsCode } else { New-PoshBotCardResponse -Type Warning -Text "Scheduled command [$Id] not found." -ThumbnailUrl $thumb.warning } } else { $schedules = $Bot.Scheduler.ListSchedules() if ($schedules.Count -gt 0) { $msg = ($schedules | Select-Object -Property $fields | Format-Table -AutoSize | Out-String).Trim() New-PoshBotTextResponse -Text $msg -AsCode } else { New-PoshBotTextResponse -Text 'There are no commands scheduled' } } }
0
1560.ps1
function New-MrScriptModule { [CmdletBinding()] param ( [Parameter(Mandatory)] [string]$Name, [ValidateScript({ If (Test-Path -Path $_ -PathType Container) { $true } else { Throw "'$_' is not a valid directory." } })] [String]$Path, [Parameter(Mandatory)] [string]$Author, [Parameter(Mandatory)] [string]$CompanyName, [Parameter(Mandatory)] [string]$Description, [Parameter(Mandatory)] [string]$PowerShellVersion ) New-Item -Path $Path -Name $Name -ItemType Directory | Out-Null Out-File -FilePath "$Path\$Name\$Name.psm1" -Encoding utf8 Add-Content -Path "$Path\$Name\$Name.psm1" -Value ' Get-ChildItem -Path $PSScriptRoot\*.ps1 -Exclude *.tests.ps1, *profile.ps1 | ForEach-Object { . $_.FullName }' New-ModuleManifest -Path "$Path\$Name\$Name.psd1" -RootModule $Name -Author $Author -Description $Description -CompanyName $CompanyName ` -PowerShellVersion $PowerShellVersion -AliasesToExport $null -FunctionsToExport $null -VariablesToExport $null -CmdletsToExport $null }
0
sample_65_74.ps1
# # Copyright 2018-2024 HP Development Company, L.P. # All Rights Reserved. # # NOTICE: All information contained herein is, and remains the property of HP Development Company, L.P. # # The intellectual and technical concepts contained herein are proprietary to HP Development Company, L.P # and may be covered by U.S. and Foreign Patents, patents in process, and are protected by # trade secret or copyright law. Dissemination of this information or reproduction of this material # is strictly forbidden unless prior written permission is obtained from HP Development Company, L.P. using namespace HP.CMSLHelper # For PS7, PSEdition is Core and for PS5.1, PSEdition is Desktop if ($PSEdition -eq "Core") { Add-Type -Assembly $PSScriptRoot\refs\WinRT.Runtime.dll Add-Type -Assembly $PSScriptRoot\refs\Microsoft.Windows.SDK.NET.dll } else { [void][Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] [void][Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] [void][Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] } # CMSL is normally installed in C:\Program Files\WindowsPowerShell\Modules # but if installed via PSGallery and via PS7, it is installed in a different location if (Test-Path "$PSScriptRoot\..\HP.Private\HP.CMSLHelper.dll") { Add-Type -Path "$PSScriptRoot\..\HP.Private\HP.CMSLHelper.dll" } else{ Add-Type -Path "$PSScriptRoot\..\..\HP.Private\1.7.2\HP.CMSLHelper.dll" } <# .SYNOPSIS Creates a logo object .DESCRIPTION This command creates a toaster logo from a file image. .PARAMETER Image Specifies the URL to the image.Http images must be 200 KB or less in size. Not all URL formats are supported in all scenarios. .PARAMETER Crop Specifies how you would like the image to be cropped. .EXAMPLE PS> $logo = New-HPPrivateToastNotificationLogo .\logo.png .OUTPUTS This command returns the object representing the logo image. #> function New-HPPrivateToastNotificationLogo { param( [Parameter(Position = 0,Mandatory = $True,ValueFromPipeline = $True)] [System.IO.FileInfo]$Image, [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('None','Default','Circle')] [string]$Crop ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("image") $child.SetAttribute('src',$Image.FullName) $child.SetAttribute('placement','appLogoOverride') if ($Crop) { $child.SetAttribute('hint-crop',$Crop.ToLower()) } $child } <# .SYNOPSIS Creates a toast image object .DESCRIPTION This command creates a toaster image from a file image. This image may be shown in the body of a toast message. .PARAMETER Image Specifies the URL to the image. Http images must be 200 KB or less in size. Not all URL formats are supported in all scenarios. .PARAMETER Position Specifies that toasts can display a 'fixed' image, which is a featured ToastGenericHeroImage displayed prominently within the toast banner and while inside Action Center. Image dimensions are 364x180 pixels at 100% scaling. Alternately, use 'inline' to display a full-width inline-image that appears when you expand the toast. .EXAMPLE PS> $logo = New-HPPrivateToastNotificationLogo .\hero.png .OUTPUTS This function returns the object representing the image. .LINK [ToastGenericHeroImage](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#toastgenericheroimage) #> function New-HPPrivateToastNotificationImage { param( [Parameter(Position = 0,Mandatory = $True,ValueFromPipeline = $True)] [string]$Image, [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('Inline','Fixed')] [string]$Position = 'Fixed' ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("image") $child.SetAttribute('src',$Image) #$child.SetAttribute('placement','appLogoOverride') is this needed? if ($Position -eq 'Fixed') { $child.SetAttribute('placement','hero') } else { $child.SetAttribute('placement','inline') } $child } <# .SYNOPSIS Specifies the toast message alert sound .DESCRIPTION This command allows defining the sound to play on toast notification. .PARAMETER Sound Specifies the sound to play .PARAMETER Loop If specified, the sound will be looped .EXAMPLE PS> $logo = New-HPPrivateToastSoundPreference -Sound "Alarm6" -Loop .OUTPUTS This function returns the object representing the sound preference. .LINK [ToastAudio](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#ToastAudio) #> function New-HPPrivateToastSoundPreference { param( [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('None','Default','IM','Mail','Reminder','SMS', 'Alarm','Alarm2','Alarm3','Alarm4','Alarm5','Alarm6','Alarm7','Alarm8','Alarm9','Alarm10', 'Call','Call2','Call3','Call4','Call5','Call6','Call7','Call8','Call9','Call10')] [string]$Sound = "Default", [Parameter(Position = 2,Mandatory = $False)] [switch]$Loop ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("audio") if ($Sound -eq "None") { $child.SetAttribute('silent',"$true".ToLower()) Write-Verbose "Setting audio notification to Muted" } else { $soundPath = "ms-winsoundevent:Notification.$Sound" if ($Sound.StartsWith('Alarm') -or $Sound.StartsWith('Call')) { $soundPath = 'winsoundevent:Notification.Looping.' + $Sound } Write-Verbose "Setting audio notification to: $soundPath" $child.SetAttribute('src',$soundPath) $child.SetAttribute('loop',([string]$Loop.IsPresent).ToLower()) Write-Verbose "Looping audio: $($Loop.IsPresent)" } $child } <# .SYNOPSIS Creates a toast button .DESCRIPTION Creates a toast button for the toast .PARAMETER Sound Specifies the sound to play .PARAMETER Image Specifies the button image for a graphical button .PARAMETER Arguments Specifies app-defined string of arguments that the app will later receive if the user clicks this button. .OUTPUTS This command returns the object representing the button .LINK [ToastButton](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#ToastButton) #> function New-HPPrivateToastButton { [Cmdletbinding()] param( [string]$Caption, [string]$Image, # leave out for normal button [string]$Arguments, [ValidateSet('Background','Protocol','System')] [string]$ActivationType = 'background' ) Write-Verbose "Creating new toast button with caption $Caption" if ($Image) { ([xml]"<action content=`"$Caption`" imageUri=`"$Image`" arguments=`"$Arguments`" activationType=`"$ActivationType`" />").DocumentElement } else { ([xml]"<action content=`"$Caption`" arguments=`"$Arguments`" activationType=`"$ActivationType`" />").DocumentElement } } <# .SYNOPSIS Create a toast action .DESCRIPTION Create a toast action for the toast .PARAMETER SnoozeOrDismiss Automatically constructs a selection box for snooze intervals, and snooze/dismiss buttons, all automatically localized, and snoozing logic is automatically handled by the system. .PARAMETER Image For a graphical button, specify the button image .PARAMETER Arguments App-defined string of arguments that the app will later receive if the user clicks this button. .OUTPUTS This function returns the object representing the button #> function New-HPPrivateToastActions { [CmdletBinding()] param( [Parameter(ParameterSetName = 'DismissSuppress',Position = 1,Mandatory = $True)] [switch]$SnoozeOrDismiss, [Parameter(ParameterSetName = 'DismissSuppress',Position = 2,Mandatory = $True)] [int]$SnoozeMinutesDefault, [Parameter(ParameterSetName = 'DismissSuppress',Position = 3,Mandatory = $True)] [int[]]$SnoozeMinutesOptions, [Parameter(ParameterSetName = 'CustomButtons',Position = 1,Mandatory = $True)] [switch]$CustomButtons, [Parameter(ParameterSetName = 'CustomButtons',Position = 2,Mandatory = $false)] [System.Xml.XmlElement[]]$Buttons, [Parameter(ParameterSetName = 'CustomButtons',Position = 3,Mandatory = $false)] [switch]$NoDismiss ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("actions") switch ($PSCmdlet.ParameterSetName) { 'DismissSuppress' { Write-Verbose "Creating system-handled snoozable notification" $i = $xml.CreateElement("input") [void]$child.AppendChild($i) $i.SetAttribute('id',"snoozeTime") $i.SetAttribute('type','selection') $i.SetAttribute('defaultInput',$SnoozeMinutesDefault) Write-Verbose "Notification snooze default: SnoozeMinutesDefault" $SnoozeMinutesOptions | ForEach-Object { $s = $xml.CreateElement("selection") $s.SetAttribute('id',"$_") $s.SetAttribute('content',"$_ minute") [void]$i.AppendChild($s) } $action = $xml.CreateElement("action") $action.SetAttribute('activationType','system') $action.SetAttribute('arguments','snooze') $action.SetAttribute('hint-inputId','snoozeTime') $action.SetAttribute('content','Snooze') [void]$child.AppendChild($action) Write-Verbose "Creating custom buttons toast" if ($Buttons) { $Buttons | ForEach-Object { $node = $xml.ImportNode($_,$true) [void]$child.AppendChild($node) } } $action = $xml.CreateElement("action") $action.SetAttribute('activationType','system') $action.SetAttribute('arguments','dismiss') $action.SetAttribute('content','Dismiss') [void]$child.AppendChild($action) } 'CustomButtons' { # customized buttons Write-Verbose "Creating custom buttons toast" if($Buttons) { $Buttons | ForEach-Object { $node = $xml.ImportNode($_,$true) [void]$child.AppendChild($node) } } if (-not $NoDismiss.IsPresent) { $action = $xml.CreateElement("action") $action.SetAttribute('activationType','system') $action.SetAttribute('arguments','dismiss') $action.SetAttribute('content','Dismiss') [void]$child.AppendChild($action) } } default { } } $child } <# .SYNOPSIS Shows a toast message .DESCRIPTION This command shows a toast message, and optionally registers a response handler. .PARAMETER Message Specifies the message to show .PARAMETER Title Specifies title of the message to show .PARAMETER Logo Specifies a logo object created with New-HPPrivateToastNotificationLogo .PARAMETER Image Specifies a logo object created with New-HPPrivateToastNotificationImage .PARAMETER Expiration Specifies a timeout in minutes for the toast to remove itself .PARAMETER Tag Specifies a tag value for the toast. Please note that if a toast with the same tag already exists, it will be replaced by this one. .PARAMETER Group Specifies a group value for the toast .PARAMETER Attribution Specifies toast owner .PARAMETER Sound Specifies a sound notification preference created with New-HPPrivateToastSoundPreference .PARAMETER Actions .PARAMETER Persist #> function New-HPPrivateToastNotification { [CmdletBinding()] param( [Parameter(ParameterSetName = 'TextOnly',Position = 0,Mandatory = $False,ValueFromPipeline = $True)] [string]$Message, [Parameter(Position = 1,Mandatory = $False)] [string]$Title, [Parameter(Position = 3,Mandatory = $False)] [System.Xml.XmlElement]$Logo, [Parameter(Position = 4,Mandatory = $False)] [int]$Expiration, [Parameter(Position = 5,Mandatory = $False)] [string]$Tag, [Parameter(Position = 6,Mandatory = $False)] [string]$Group = "hp-cmsl", [Parameter(Position = 8,Mandatory = $False)] [System.Xml.XmlElement]$Sound, # Apparently can't do URLs with non-uwp [Parameter(Position = 11,Mandatory = $False)] [System.Xml.XmlElement]$Image, [Parameter(Position = 13,Mandatory = $False)] [System.Xml.XmlElement]$Actions, [Parameter(Position = 14,Mandatory = $False)] [switch]$Persist, [Parameter(Position = 15 , Mandatory = $False)] [string]$Signature, [Parameter(Position = 16,Mandatory = $False)] [System.IO.FileInfo]$Xml ) # if $Xml is given, load the xml instead of manually creating it if ($Xml) { Write-Verbose "Loading XML from $Xml" try { [xml]$xml = Get-Content $Xml } catch { Write-Error "Failed to load schema XML from $Xml" return } } else { # In order for signature text to be smaller, we have to add placement="attribution" to the text node. # When using placement="attribution", Signature text will always be displayed at the bottom of the toast notification, # along with the app's identity or the notification's timestamp if we were to customize the notification to provide these as well. # On older versions of Windows that don't support attribution text, the text will simply be displayed as another text element # (assuming we don't already have the maximum of three text elements, # but we currently only have Invoke-HPNotification showing up to 3 text elements with the 3rd for $Signature being smallest) [xml]$xml = '<toast><visual><binding template="ToastGeneric"><text></text><text></text><text placement="attribution"></text></binding></visual></toast>' $binding = $xml.GetElementsByTagName("toast") if ($Sound) { $node = $xml.ImportNode($Sound,$true) [void]$binding.AppendChild($node) } if ($Persist.IsPresent) { $binding.SetAttribute('scenario','reminder') } if ($Actions) { $node = $xml.ImportNode($Actions,$true) [void]$binding.AppendChild($node) } $binding = $xml.GetElementsByTagName("binding") if ($Logo) { $node = $xml.ImportNode($Logo,$true) [void]$binding.AppendChild($node) } if ($Image) { $node = $xml.ImportNode($Image,$true) [void]$binding.AppendChild($node) } $binding = $xml.GetElementsByTagName("text") if ($Title) { [void]$binding[0].AppendChild($xml.CreateTextNode($Title.trim())) } [void]$binding[1].AppendChild($xml.CreateTextNode($Message.trim())) if ($Signature){ [void]$binding[2].AppendChild($xml.CreateTextNode($Signature.trim())) } } Write-Verbose "Submitting toast with XML: $($xml.OuterXml)" $toast = [Windows.Data.Xml.Dom.XmlDocument]::new() $toast.LoadXml($xml.OuterXml) $toast = [Windows.UI.Notifications.ToastNotification]::new($toast) # if you specify a non-unique tag, it will replace the previous toast with the same non-unique tag if($Tag) { $toast.Tag = $Tag } $toast.Group = $Group if ($Expiration) { $toast.ExpirationTime = [DateTimeOffset]::Now.AddMinutes($Expiration) } return $toast } function Show-ToastNotification { [CmdletBinding()] param( [Parameter(Position = 0,Mandatory = $False,ValueFromPipeline = $true)] $Toast, [Parameter(Position = 1,Mandatory = $False)] [string]$Attribution = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe' ) $notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($Attribution) $notifier.Show($toast) } function Register-HPPrivateScriptProtocol { [CmdletBinding()] param( [string]$ScriptPath, [string]$Name ) try { New-Item "HKCU:\Software\Classes\$($Name)\shell\open\command" -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name 'URL Protocol' -Value '' -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name '(default)' -Value "url:$($Name)" -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name 'EditFlags' -Value 2162688 -PropertyType Dword -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)\shell\open\command" -Name '(default)' -Value $ScriptPath -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null } catch { Write-Host $_.Exception.Message } } <# .SYNOPSIS This is a private command for internal use only .DESCRIPTION This is a private command for internal use only .EXAMPLE .NOTES - This is a private command for internal use only #> function Invoke-HPPrivateRebootNotificationAsUser { [CmdletBinding()] param( [Parameter(Position = 0,Mandatory = $false)] [string]$Title = "A System Reboot is Required", [Parameter(Position = 1,Mandatory = $false)] [string]$Message = "Please reboot now to keep your device compliant with the security policies.", [Parameter(Position = 2,Mandatory = $false)] [System.IO.FileInfo]$LogoImage, [Parameter(Position = 4,Mandatory = $false)] [int]$Expiration = 0, [Parameter(Position = 4,Mandatory = $False)] [string]$Attribution ) # Use System Root instead of hardcoded path to C:\Windows Register-HPPrivateScriptProtocol -ScriptPath "$env:SystemRoot\System32\shutdown.exe -r -t 0 -f" -Name "rebootnow" $rebootButton = New-HPPrivateToastButton -Caption "Reboot now" -Image $null -Arguments "rebootnow:" -ActivationType "Protocol" $params = @{ Message = $Message Title = $Title Expiration = $Expiration Actions = New-HPPrivateToastActions -CustomButtons -Buttons $rebootButton Sound = New-HPPrivateToastSoundPreference -Sound IM } if ($LogoImage) { $params.Logo = New-HPPrivateToastNotificationLogo -Image $LogoImage -Crop Circle } $toast = New-HPPrivateToastNotification @params -Persist if ($toast) { if ([string]::IsNullOrEmpty($Attribution)) { Show-ToastNotification -Toast $toast } else { Show-ToastNotification -Toast $toast -Attribution $Attribution } } return } <# .SYNOPSIS This is a private command for internal use only .DESCRIPTION This is a private command for internal use only .EXAMPLE .NOTES - This is a private command for internal use only #> function Invoke-HPPrivateNotificationAsUser { [CmdletBinding()] param( [Parameter(Position = 0,Mandatory = $false)] [string]$Title, [Parameter(Position = 1,Mandatory = $false)] [string]$Message, [Parameter(Position = 2,Mandatory = $false)] [System.IO.FileInfo]$LogoImage, [Parameter(Position = 4,Mandatory = $false)] [int]$Expiration = 0, [Parameter(Position = 4,Mandatory = $False)] [string]$Attribution, [Parameter(Position = 5,Mandatory = $false)] [string]$NoDismiss = "false", # environment variables can only be strings, so Dismiss parameter is a string [Parameter(Position = 6,Mandatory = $false)] [string]$Signature, [Parameter(Position = 7,Mandatory = $false)] [System.IO.FileInfo]$Xml, [Parameter(Position = 8,Mandatory = $false)] [System.IO.FileInfo]$Actions ) if ($Xml){ if($Actions){ # parse the file of Actions to get the actions to register try { $listOfActions = Get-Content $Actions | ConvertFrom-Json } catch { Write-Error "Failed to parse the file of actions: $($_.Exception.Message). Will not proceed with invoking notification." return } # register every action in list of actions foreach ($action in $listOfActions) { Register-HPPrivateScriptProtocol -ScriptPath $action.cmd -Name $action.id } Write-Verbose "Done registering actions" } $toast = New-HPPrivateToastNotification -Expiration $Expiration -Xml $Xml -Persist if ($toast) { if ([string]::IsNullOrEmpty($Attribution)) { Show-ToastNotification -Toast $toast } else { Show-ToastNotification -Toast $toast -Attribution $Attribution } } } else{ $params = @{ Message = $Message Title = $Title Expiration = $Expiration Signature = $Signature Sound = New-HPPrivateToastSoundPreference -Sound IM } # environment variables can only be strings, so Dismiss parameter is a string if ($NoDismiss -eq "false") { $params.Actions = New-HPPrivateToastActions -CustomButtons } else { $params.Actions = New-HPPrivateToastActions -CustomButtons -NoDismiss } if ($LogoImage) { $params.Logo = New-HPPrivateToastNotificationLogo -Image $LogoImage -Crop Circle } $toast = New-HPPrivateToastNotification @params -Persist if ([string]::IsNullOrEmpty($Attribution)) { Show-ToastNotification -Toast $toast } else { Show-ToastNotification -Toast $toast -Attribution $Attribution } } return } <# .SYNOPSIS Register-NotificationApplication .DESCRIPTION This function registers toast notification applications .PARAMETER Id Specifies the application id .PARAMETER DisplayName Specifies the application name to display on the toast notification .EXAMPLE Register-NotificationApplication -Id 'hp.cmsl.12345' -DisplayName 'HP CMSL' #> function Register-NotificationApplication { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string]$Id, [Parameter(Mandatory=$true)] [string]$DisplayName, [Parameter(Mandatory=$false)] [System.IO.FileInfo]$IconPath ) if (-not (Test-IsElevatedAdmin)) { throw [System.Security.AccessControl.PrivilegeNotHeldException]"elevated administrator" } Write-Verbose "Registering notification application with id: $Id and display name: $DisplayName and icon path: $IconPath" $drive = Get-PSDrive -Name HKCR -ErrorAction SilentlyContinue if (-not $drive) { $drive = New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT -Scope Script } $appRegPath = Join-Path -Path "$($drive):" -ChildPath 'AppUserModelId' $regPath = Join-Path -Path $appRegPath -ChildPath $Id if (-not (Test-Path $regPath)) { New-Item -Path $appRegPath -Name $Id -Force | Out-Null } $currentDisplayName = Get-ItemProperty -Path $regPath -Name DisplayName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DisplayName -ErrorAction SilentlyContinue if ($currentDisplayName -ne $DisplayName) { New-ItemProperty -Path $regPath -Name DisplayName -Value $DisplayName -PropertyType String -Force | Out-Null } New-ItemProperty -Path $regPath -Name IconUri -Value $IconPath -PropertyType ExpandString -Force | Out-Null New-ItemProperty -Path $regPath -Name IconBackgroundColor -Value 0 -PropertyType ExpandString -Force | Out-Null Remove-PSDrive -Name HKCR -Force Write-Verbose "Registered toast notification application: $DisplayName" } <# .SYNOPSIS Unregister-NotificationApplication .DESCRIPTION This function unregisters toast notification applications. Do not unregister the application if you want to snooze the notification. .PARAMETER Id Specifies the application ID to unregister .EXAMPLE Unregister-NotificationApplication -Id 'hp.cmsl.12345' #> function Unregister-NotificationApplication { [CmdletBinding()] param( [Parameter(Mandatory=$true)] $Id ) if (-not (Test-IsElevatedAdmin)) { throw [System.Security.AccessControl.PrivilegeNotHeldException]"elevated administrator" } $drive = Get-PSDrive -Name HKCR -ErrorAction SilentlyContinue if (-not $drive) { $drive = New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT -Scope Script } $appRegPath = Join-Path -Path "$($drive):" -ChildPath 'AppUserModelId' $regPath = Join-Path -Path $appRegPath -ChildPath $Id if (Test-Path $regPath) { Remove-Item -Path $regPath } else { Write-Verbose "Application not found at $regPath" } Remove-PSDrive -Name HKCR -Force Write-Verbose "Unregistered toast notification application: $Id" } <# .SYNOPSIS Invoke-HPRebootNotification .DESCRIPTION This command shows a toast message asking the user to reboot the system. .PARAMETER Message Specifies the message to show .PARAMETER Title Specifies the title of the message to show .PARAMETER LogoImage Specifies the image file path to be displayed .PARAMETER Expiration Specifies the timeout in minutes for the toast to remove itself. If not specified, the toast remains until dismissed. .PARAMETER TitleBarHeader Specifies the text of the toast notification in the title bar. If not specified, the text will default to "HP System Update". .PARAMETER TitleBarIcon Specifies the icon of the toast notification in the title bar. If not specified, the icon will default to the HP logo. Please note that the color of the icon might be inverted depending on the background color of the title bar. .EXAMPLE Invoke-HPRebootNotification -Title "My title" -Message "My message" #> function Invoke-HPRebootNotification { [CmdletBinding(HelpUri = "https://developers.hp.com/hp-client-management/doc/Invoke-RebootNotification")] [Alias("Invoke-RebootNotification")] # we can deprecate Invoke-RebootNotification later param( [Parameter(Position = 0,Mandatory = $False)] [string]$Title = "A System Reboot Is Required", [Parameter(Position = 1,Mandatory = $False)] [string]$Message = "Please reboot now to keep your device compliant with organizational policies.", [Parameter(Position = 2,Mandatory = $false)] [System.IO.FileInfo]$LogoImage, [Parameter(Position = 3,Mandatory = $false)] [int]$Expiration = 0, [Parameter(Position = 4,Mandatory = $false)] [string]$TitleBarHeader = "HP System Update", # we don't want to display "Windows PowerShell" in the title bar [Parameter(Position = 5,Mandatory = $false)] [System.IO.FileInfo]$TitleBarIcon = (Join-Path -Path $PSScriptRoot -ChildPath 'assets\hp_black_logo.png') # default to HP logo ) # Create a unique Id to distinguish this notification application from others using "hp.cmsl" and the current time $Id = "hp.cmsl.$([DateTime]::Now.Ticks)" # Convert the relative path for TitleBarIcon into absolute path $TitleBarIcon = (Get-Item -Path $TitleBarIcon).FullName # An app registration is needed to set the issuer name and icon in the title bar Register-NotificationApplication -Id $Id -DisplayName $TitleBarHeader -IconPath $TitleBarIcon # When using system privileges, the block executes in a different context, # so the relative path for LogoImage must be converted to an absolute path. # On another note, System.IO.FileInfo.FullName property isn't updated when you change your working directory in PowerShell, # so in the case for user privileges, # using Get-Item here to avoid getting wrong absolute path later # when using System.IO.FileInfo.FullName property in New-HPPrivateToastNotificationLogo. if ($LogoImage) { $LogoImage = (Get-Item -Path $LogoImage).FullName } $privs = whoami /priv /fo csv | ConvertFrom-Csv | Where-Object { $_. 'Privilege Name' -eq 'SeDelegateSessionUserImpersonatePrivilege' } if ($privs.State -eq "Disabled") { Write-Verbose "Running with user privileges" Invoke-HPPrivateRebootNotificationAsUser -Title $Title -Message $Message -LogoImage $LogoImage -Expiration $Expiration -Attribution $Id } else { Write-Verbose "Running with system privileges" try { $psPath = (Get-Process -Id $pid).Path # Passing the parameters as environment variable because the following block executes in a different context [System.Environment]::SetEnvironmentVariable('HPRebootTitle',$Title,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootMessage',$Message,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootAttribution',$Id,[System.EnvironmentVariableTarget]::Machine) if ($LogoImage) { [System.Environment]::SetEnvironmentVariable('HPRebootLogoImage',$LogoImage,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPRebootExpiration',$Expiration,[System.EnvironmentVariableTarget]::Machine) } [scriptblock]$scriptBlock = { $path = $pwd.Path Import-Module -Force $path\HP.Notifications.psd1 $params = @{ Title = $env:HPRebootTitle Message = $env:HPRebootMessage Attribution = $env:HPRebootAttribution } if ($env:HPRebootLogoImage) { $params.LogoImage = $env:HPRebootLogoImage } if ($env:HPRebootExpiration) { $params.Expiration = $env:HPRebootExpiration } Invoke-HPPrivateRebootNotificationAsUser @params } $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($scriptBlock)) $psCommand = "-ExecutionPolicy Bypass -Window Normal -EncodedCommand $($encodedCommand)" [ProcessExtensions]::StartProcessAsCurrentUser($psPath,"`"$psPath`" $psCommand",$PSScriptRoot) [System.Environment]::SetEnvironmentVariable('HPRebootTitle',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootMessage',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootAttribution',$null,[System.EnvironmentVariableTarget]::Machine) if ($LogoImage) { [System.Environment]::SetEnvironmentVariable('HPRebootLogoImage',$null,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPRebootExpiration',$null,[System.EnvironmentVariableTarget]::Machine) } } catch { Write-Error -Message "Could not execute as currently logged on user: $($_.Exception.Message)" -Exception $_.Exception } } # add a delay before unregistering the app because if you unregister the app right away, toast notification won't pop up Start-Sleep -Seconds 5 Unregister-NotificationApplication -Id $Id return } <# .SYNOPSIS Triggers a toast notification from XML .DESCRIPTION This command triggers a toast notification from XML. Similar to the Invoke-HPNotification command, this command triggers toast notifications, but this command is more flexible and allows for more customization. .PARAMETER Xml Specifies the schema XML content of the toast notification. Please specify either Xml or XmlPath, but not both. .PARAMETER XmlPath Specifies the file path to the schema XML content of the toast notification. Please specify either Xml or XmlPath, but not both. .PARAMETER ActionsJson Specifies the actions that should be map the button id(s) (if any specified in XML) to the command(s) to call upon clicking the corresponding button. You can specify either ActionsJson or ActionsJsonPath, but not both. Please note that button actions are registered in HKEY_CURRENT_USER in the registry. Button actions will persist until the user logs off. Example to reboot the system upon clicking the button: [ { "id":"rebootnow", "cmd":"C:\\Windows\\System32\\shutdown.exe -r -t 0 -f" } ] .PARAMETER ActionsJsonPath Specifies the file path to the actions that should be map the button id(s) (if any specified in XML) to the command(s) to call upon clicking the corresponding button. You can specify either ActionsJson or ActionsJsonPath, but not both. Please note that button actions are registered in HKEY_CURRENT_USER in the registry. Button actions will persist until the user logs off. .PARAMETER Expiration Specifies the life of the toast notification in minutes whether toast notification is on the screen or in the Action Center. If not specified, the invoked toast notification remains on screen until dismissed. .PARAMETER TitleBarHeader Specifies the text of the toast notification in the title bar. If not specified, the text will default to "HP System Notification". .PARAMETER TitleBarIcon Specifies the icon of the toast notification in the title bar. If not specified, the icon will default to the HP logo. Please note that the color of the icon might be inverted depending on the background color of the title bar. .EXAMPLE Invoke-HPNotificationFromXML -XmlPath 'C:\path\to\schema.xml' -ActionsJsonPath 'C:\path\to\actions.json' .EXAMPLE Invoke-HPNotificationFromXML -XmlPath 'C:\path\to\schema.xml' -ActionsJson '[ { "id":"rebootnow", "cmd":"C:\\Windows\\System32\\shutdown.exe -r -t 0 -f" } ]' .EXAMPLE Invoke-HPNotificationFromXML -XmlPath 'C:\path\to\schema.xml' #> function Invoke-HPNotificationFromXML { [CmdletBinding(HelpUri = "https://developers.hp.com/hp-client-management/doc/Invoke-HPNotificationFromXML")] param( [Parameter(ParameterSetName = 'XmlAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlAJP',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJP',Mandatory = $false)] [int]$Expiration = 0, [Parameter(ParameterSetName = 'XmlAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlAJP',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJP',Mandatory = $false)] [string]$TitleBarHeader = "HP System Notification", # we don't want to display "Windows PowerShell" in the title bar [Parameter(ParameterSetName = 'XmlAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlAJP',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJP',Mandatory = $false)] [System.IO.FileInfo]$TitleBarIcon = (Join-Path -Path $PSScriptRoot -ChildPath 'assets\hp_black_logo.png'), # default to HP logo [Parameter(ParameterSetName = 'XmlAJ',Mandatory = $true)] [Parameter(ParameterSetName = 'XmlAJP', Mandatory = $true)] [string]$Xml, # both $Xml and $XmlPath cannot be specified [Parameter(ParameterSetName = 'XmlPathAJ', Mandatory = $true)] [Parameter(ParameterSetName = 'XmlPathAJP', Mandatory = $true)] [System.IO.FileInfo]$XmlPath, # both $Xml and $XmlPath cannot be specified [Parameter(ParameterSetName = 'XmlAJ',Mandatory = $false)] [Parameter(ParameterSetName = 'XmlPathAJ',Mandatory = $false)] [string]$ActionsJson, # list of actions that should align with the buttons in the schema Xml file. If no buttons, this field is not needed # both $ActionsJson and $ActionsJsonPath cannot be specified, so making one mandatory to resolve ambiguity [Parameter(ParameterSetName = 'XmlAJP',Mandatory = $true)] [Parameter(ParameterSetName = 'XmlPathAJP',Mandatory = $true)] [System.IO.FileInfo]$ActionsJsonPath ) # if Xml, save the contents to a file and set file path to $XmlPath if ($Xml) { # create a unique file name for the schema XML file to avoid conflicts $XmlPath = Join-Path -Path $PSScriptRoot -ChildPath "HPNotificationSchema$([DateTime]::Now.Ticks).xml" $Xml | Out-File -FilePath $XmlPath -Force Write-Verbose "Created schema XML file at $XmlPath" } # if ActionsJson, save the contents to a file and set file path to $ActionsJsonPath if ($ActionsJson) { # create a unique file name for the actions JSON file to avoid conflicts $ActionsJsonPath = Join-Path -Path $PSScriptRoot -ChildPath "HPNotificationActions$([DateTime]::Now.Ticks).json" $ActionsJson | Out-File -FilePath $ActionsJsonPath -Force Write-Verbose "Created actions JSON file at $ActionsJsonPath" } # Create a unique Id to distinguish this notification application from others using "hp.cmsl" and the current time $Id = "hp.cmsl.$([DateTime]::Now.Ticks)" # Convert the relative path for TitleBarIcon into absolute path $TitleBarIcon = (Get-Item -Path $TitleBarIcon).FullName # An app registration is needed to set the issuer name and icon in the title bar Register-NotificationApplication -Id $Id -DisplayName $TitleBarHeader -IconPath $TitleBarIcon $privs = whoami /priv /fo csv | ConvertFrom-Csv | Where-Object { $_. 'Privilege Name' -eq 'SeDelegateSessionUserImpersonatePrivilege' } if ($privs.State -eq "Disabled") { Write-Verbose "Running with user privileges" Invoke-HPPrivateNotificationAsUser -Xml $XmlPath -Actions $ActionsJsonPath -Expiration $Expiration -Attribution $Id } else { Write-Verbose "Running with system privileges" # XmlPath and ActionsJsonPath do not work with system privileges if a relative file path is passed in # because the following block executes in a different context # If a relative path is passed in, convert the relative path into absolute path if ($XmlPath) { $XmlPath = (Get-Item -Path $XmlPath).FullName } if ($ActionsJsonPath) { $ActionsJsonPath = (Get-Item -Path $ActionsJsonPath).FullName } try { $psPath = (Get-Process -Id $pid).Path # Passing the parameters as environment variable because the following block executes in a different context [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlAttribution',$Id,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlXml',$XmlPath,[System.EnvironmentVariableTarget]::Machine) if($ActionsJsonPath){ [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlActions',$ActionsJsonPath,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlExpiration',$Expiration,[System.EnvironmentVariableTarget]::Machine) } [scriptblock]$scriptBlock = { $path = $pwd.Path Import-Module -Force $path\HP.Notifications.psd1 $params = @{ Xml = $env:HPNotificationFromXmlXml Actions = $env:HPNotificationFromXmlActions Attribution = $env:HPNotificationFromXmlAttribution } if ($env:HPNotificationFromXmlExpiration) { $params.Expiration = $env:HPNotificationFromXmlExpiration } Invoke-HPPrivateNotificationAsUser @params } $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($scriptBlock)) $psCommand = "-ExecutionPolicy Bypass -Window Normal -EncodedCommand $($encodedCommand)" [ProcessExtensions]::StartProcessAsCurrentUser($psPath,"`"$psPath`" $psCommand",$PSScriptRoot) [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlAttribution',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlXml',$null,[System.EnvironmentVariableTarget]::Machine) if($ActionsJsonPath){ [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlActions',$null,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPNotificationFromXmlExpiration',$null,[System.EnvironmentVariableTarget]::Machine) } } catch { Write-Error -Message "Could not execute as currently logged on user: $($_.Exception.Message)" -Exception $_.Exception } } # if temporary XML file was created, remove it if($Xml) { Remove-Item -Path $XmlPath -Force Write-Verbose "Removed temporary schema XML file at $XmlPath" } # if temporary Actions JSON file was created, remove it if($ActionsJson) { Remove-Item -Path $ActionsJsonPath -Force Write-Verbose "Removed temporary actions JSON file at $ActionsJsonPath" } # do not unregister the app because we want to allow the user to snooze the notification return } <# .SYNOPSIS Triggers a toast notification .DESCRIPTION This command triggers a toast notification. .PARAMETER Message Specifies the message to display. This parameter is mandatory. Please note, an empty string is not allowed. .PARAMETER Title Specifies the title to display. This parameter is mandatory. Please note, an empty string is not allowed. .PARAMETER LogoImage Specifies the image file path to be displayed .PARAMETER Expiration Specifies the life of the toast notification in minutes whether toast notification is on the screen or in the Action Center. If not specified, the invoked toast notification remains on screen until dismissed. .PARAMETER TitleBarHeader Specifies the text of the toast notification in the title bar. If not specified, the text will default to "HP System Notification". .PARAMETER TitleBarIcon Specifies the icon of the toast notification in the title bar. If not specified, the icon will default to the HP logo. Please note that the color of the icon might be inverted depending on the background color of the title bar. .PARAMETER Signature Specifies the text to display below the message at the bottom of the toast notification in a smaller font. Please note that on older versions of Windows that don't support attribution text, the signature will just be displayed as another text element in the same font as the message. .PARAMETER Dismiss If set to true or not specified, the toast notification will show a Dismiss button to dismiss the notification. If set to false, the toast notification will not show a Dismiss button and will disappear from the screen and go to the Action Center after 5-7 seconds of invocation. Please note that dismissing the notification overrides any specified Expiration time as the notification will not go to the Action Center once dismissed. .EXAMPLE Invoke-HPNotification -Title "My title" -Message "My message" -Dismiss $false .EXAMPLE Invoke-HPNotificataion -Title "My title" -Message "My message" -Signature "Foo Bar" -Expiration 5 #> function Invoke-HPNotification { [CmdletBinding(HelpUri = "https://developers.hp.com/hp-client-management/doc/Invoke-HPNotification")] param( [Parameter(Position = 0,Mandatory = $true)] [string]$Title, [Parameter(Position = 1,Mandatory = $true)] [string]$Message, [Parameter(Position = 2,Mandatory = $false)] [System.IO.FileInfo]$LogoImage, [Parameter(Position = 3,Mandatory = $false)] [int]$Expiration = 0, [Parameter(Position = 4,Mandatory = $false)] [string]$TitleBarHeader = "HP System Notification", # we don't want to display "Windows PowerShell" in the title bar [Parameter(Position = 5,Mandatory = $false)] [System.IO.FileInfo]$TitleBarIcon = (Join-Path -Path $PSScriptRoot -ChildPath 'assets\hp_black_logo.png'), # default to HP logo [Parameter(Position = 6,Mandatory = $false)] [string]$Signature, # text in smaller font under Title and Message at the bottom of the toast notification [Parameter(Position = 7,Mandatory = $false)] [bool]$Dismiss = $true # if not specified, default to showing the Dismiss button ) # Create a unique Id to distinguish this notification application from others using "hp.cmsl" and the current time $Id = "hp.cmsl.$([DateTime]::Now.Ticks)" # Convert the relative path for TitleBarIcon into absolute path $TitleBarIcon = (Get-Item -Path $TitleBarIcon).FullName # An app registration is needed to set the issuer name and icon in the title bar Register-NotificationApplication -Id $Id -DisplayName $TitleBarHeader -IconPath $TitleBarIcon # When using system privileges, the block executes in a different context, # so the relative path for LogoImage must be converted to an absolute path. # On another note, System.IO.FileInfo.FullName property isn't updated when you change your working directory in PowerShell, # so in the case for user privileges, # using Get-Item here to avoid getting wrong absolute path later # when using System.IO.FileInfo.FullName property in New-HPPrivateToastNotificationLogo. if ($LogoImage) { $LogoImage = (Get-Item -Path $LogoImage).FullName } $privs = whoami /priv /fo csv | ConvertFrom-Csv | Where-Object { $_. 'Privilege Name' -eq 'SeDelegateSessionUserImpersonatePrivilege' } if ($privs.State -eq "Disabled") { Write-Verbose "Running with user privileges" # Invoke-HPPrivateNotificationAsUser is modeled after Invoke-HPPrivateRebootNotificationAsUser so using -NoDismiss instead of -Dismiss for consistency if($Dismiss) { Invoke-HPPrivateNotificationAsUser -Title $Title -Message $Message -LogoImage $LogoImage -Expiration $Expiration -Attribution $Id -Signature $Signature -NoDismiss "false" } else { Invoke-HPPrivateNotificationAsUser -Title $Title -Message $Message -LogoImage $LogoImage -Expiration $Expiration -Attribution $Id -Signature $Signature -NoDismiss "true" } } else { Write-Verbose "Running with system privileges" try { $psPath = (Get-Process -Id $pid).Path # Passing the parameters as environment variable because the following block executes in a different context [System.Environment]::SetEnvironmentVariable('HPNotificationTitle',$Title,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationMessage',$Message,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationSignature',$Signature,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationAttribution',$Id,[System.EnvironmentVariableTarget]::Machine) if ($LogoImage) { [System.Environment]::SetEnvironmentVariable('HPNotificationLogoImage',$LogoImage,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPNotificationExpiration',$Expiration,[System.EnvironmentVariableTarget]::Machine) } # environment variables can only be strings, so we need to convert the Dismiss boolean to a string if($Dismiss) { [System.Environment]::SetEnvironmentVariable('HPNotificationNoDismiss', "false",[System.EnvironmentVariableTarget]::Machine) } else { [System.Environment]::SetEnvironmentVariable('HPNotificationNoDismiss', "true",[System.EnvironmentVariableTarget]::Machine) } [scriptblock]$scriptBlock = { $path = $pwd.Path Import-Module -Force $path\HP.Notifications.psd1 $params = @{ Title = $env:HPNotificationTitle Message = $env:HPNotificationMessage Signature = $env:HPNotificationSignature Attribution = $env:HPNotificationAttribution NoDismiss = $env:HPNotificationNoDismiss } if ($env:HPNotificationLogoImage) { $params.LogoImage = $env:HPNotificationLogoImage } if ($env:HPNotificationExpiration) { $params.Expiration = $env:HPNotificationExpiration } Invoke-HPPrivateNotificationAsUser @params } $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($scriptBlock)) $psCommand = "-ExecutionPolicy Bypass -Window Normal -EncodedCommand $($encodedCommand)" [ProcessExtensions]::StartProcessAsCurrentUser($psPath,"`"$psPath`" $psCommand",$PSScriptRoot) [System.Environment]::SetEnvironmentVariable('HPNotificationTitle',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationMessage',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationSignature',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationAttribution',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPNotificationNoDismiss',$null,[System.EnvironmentVariableTarget]::Machine) if ($LogoImage) { [System.Environment]::SetEnvironmentVariable('HPNotificationLogoImage',$null,[System.EnvironmentVariableTarget]::Machine) } if ($Expiration) { [System.Environment]::SetEnvironmentVariable('HPNotificationExpiration',$null,[System.EnvironmentVariableTarget]::Machine) } } catch { Write-Error -Message "Could not execute as currently logged on user: $($_.Exception.Message)" -Exception $_.Exception } } # add a delay before unregistering the app because if you unregister the app right away, toast notification won't pop up Start-Sleep -Seconds 5 Unregister-NotificationApplication -Id $Id return } # SIG # Begin signature block # MIIoHgYJKoZIhvcNAQcCoIIoDzCCKAsCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBjAuiLBzgochl5 # X+OcY0oMEXMhVII4S4RxTv8+cOGCQKCCDYowggawMIIEmKADAgECAhAIrUCyYNKc # TJ9ezam9k67ZMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV # BAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBHNDAeFw0yMTA0MjkwMDAwMDBaFw0z # NjA0MjgyMzU5NTlaMGkxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwg # SW5jLjFBMD8GA1UEAxM4RGlnaUNlcnQgVHJ1c3RlZCBHNCBDb2RlIFNpZ25pbmcg # UlNBNDA5NiBTSEEzODQgMjAyMSBDQTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw # ggIKAoICAQDVtC9C0CiteLdd1TlZG7GIQ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ItawqTP4YFy43bU7cVcd+bDAL7nrpoA2 # l/gIP4FBGwt6m7N0hF8F6stqJ48kEX4kIbd8BlAmuAwuRq+GczBw6BvD4RBudDp5 # R4y/MeU7d8mtEasrk3rK9l/gZNFIIvgIYyoYZDzb8IK92XFxgbjLS84dLPZo+aOF # QXDVMDxqVxTknl5hdIWbRZTJlBjAk5/GuSTHZrVUpsXpCRCYqMS9U7HWyMmsaG8L # q0idbNH8+UUjKuOtsDWUylrkIXegCjpazzOn1VepBjaPFb10uh+scXYcylK98gId # lDIFV/GhnlwATVV/HrpvK5QY0ZUf15sR+KiL6oG9odRXJUppI0jeLhBZhRpIVsnt # tHCe+eH8I/h2FVtz4ZOqjABHtZGpNPtt3DxNmvDtDEWFp28rHt+KBwrEfvND0OAG # 7YHta2rJCr5kLRcu1atx/Mm3Jy0dSljMAbVR8yiXMvsT2OH0A+n1Ha2yxkwiqxBJ # KUI= # SIG # End signature block
0
sample_36_18.ps1
# # Module manifest for module 'Az.DesktopVirtualization' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.DesktopVirtualization.psm1' # Version number of this module. ModuleVersion = '4.3.1' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' # ID used to uniquely identify this module GUID = '4cbade8e-48e0-42f8-a847-7872d0006d54' # Author of this module Author = 'Microsoft Corporation' # Company or vendor of this module CompanyName = 'Microsoft Corporation' # Copyright statement for this module Copyright = 'Microsoft Corporation. All rights reserved.' # Description of the functionality provided by this module Description = 'Microsoft Azure PowerShell: DesktopVirtualization cmdlets' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. DotNetFrameworkVersion = '4.7.2' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @() # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'DesktopVirtualization.Autorest/bin/Az.DesktopVirtualization.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'DesktopVirtualization.Autorest\Az.DesktopVirtualization.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('DesktopVirtualization.Autorest/Az.DesktopVirtualization.psm1') # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Disconnect-AzWvdUserSession', 'Expand-AzWvdMsixImage', 'Get-AzWvdApplication', 'Get-AzWvdApplicationGroup', 'Get-AzWvdDesktop', 'Get-AzWvdHostPool', 'Get-AzWvdHostPoolRegistrationToken', 'Get-AzWvdMsixPackage', 'Get-AzWvdPrivateEndpointConnection', 'Get-AzWvdPrivateLinkResource', 'Get-AzWvdRegistrationInfo', 'Get-AzWvdScalingPlan', 'Get-AzWvdScalingPlanPersonalSchedule', 'Get-AzWvdScalingPlanPooledSchedule', 'Get-AzWvdSessionHost', 'Get-AzWvdStartMenuItem', 'Get-AzWvdUserSession', 'Get-AzWvdWorkspace', 'New-AzWvdApplication', 'New-AzWvdApplicationGroup', 'New-AzWvdHostPool', 'New-AzWvdMsixPackage', 'New-AzWvdRegistrationInfo', 'New-AzWvdScalingPlan', 'New-AzWvdScalingPlanPersonalSchedule', 'New-AzWvdScalingPlanPooledSchedule', 'New-AzWvdWorkspace', 'Register-AzWvdApplicationGroup', 'Remove-AzWvdApplication', 'Remove-AzWvdApplicationGroup', 'Remove-AzWvdHostPool', 'Remove-AzWvdMsixPackage', 'Remove-AzWvdPrivateEndpointConnection', 'Remove-AzWvdRegistrationInfo', 'Remove-AzWvdScalingPlan', 'Remove-AzWvdScalingPlanPersonalSchedule', 'Remove-AzWvdScalingPlanPooledSchedule', 'Remove-AzWvdSessionHost', 'Remove-AzWvdUserSession', 'Remove-AzWvdWorkspace', 'Send-AzWvdUserSessionMessage', 'Unregister-AzWvdApplicationGroup', 'Update-AzWvdApplication', 'Update-AzWvdApplicationGroup', 'Update-AzWvdDesktop', 'Update-AzWvdHostPool', 'Update-AzWvdMsixPackage', 'Update-AzWvdScalingPlan', 'Update-AzWvdScalingPlanPersonalSchedule', 'Update-AzWvdScalingPlanPooledSchedule', 'Update-AzWvdSessionHost', 'Update-AzWvdWorkspace' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'Azure','ResourceManager','ARM','PSModule','DesktopVirtualization' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' # A URL to the main website for this project. ProjectUri = 'https://github.com/Azure/azure-powershell' # A URL to an icon representing this module. # IconUri = '' # ReleaseNotes of this module ReleaseNotes = '* Introduced secrets detection feature to safeguard sensitive data.' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } # SIG # Begin signature block # MIInzgYJKoZIhvc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_49.ps1
<# .SYNOPSIS Scenario module for collecting Microsoft Remote Assistance and Quick Assist / RemoteHelp related data .DESCRIPTION Collect Remote Assistance related troubleshooting data .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : https://aka.ms/MSRD-Collect-Feedback #> $msrdLogPrefix = "MSRA" $msrdRemoteAssist = $global:msrdBasicLogFolder + "RemoteAssist\" $msrdUserProfilesDir = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" -Name ProfilesDirectory).ProfilesDirectory Function msrdGetRemoteHelpData { msrdLogMessage $LogLevel.Normal -LogPrefix $msrdLogPrefix -Message "Collecting Remote Help installation logs" $rhlogcount = 0 foreach ($userProfile in Get-ChildItem -Path $msrdUserProfilesDir -Directory -ErrorAction SilentlyContinue) { $tempPath = Join-Path $userProfile.FullName "AppData\Local\Temp" # Find MSI*.log files containing the specified string $filesToCopy = Get-ChildItem -Path $tempPath -Filter "Remote_help*.log" -Recurse -ErrorAction SilentlyContinue | Where-Object { Get-Content $_.FullName } if ($filesToCopy) { # Copy the files to the destination with modified names foreach ($file in $filesToCopy) { $fileName = $file.Name $modifiedFileName = $global:msrdLogFilePrefix + $fileName $destinationFile = Join-Path $msrdRemoteAssist $modifiedFileName Copy-Item $file.FullName -Destination $destinationFile -Force } $rhlogcount += 1 } } if ($rhlogcount -eq 0) { msrdLogMessage $LogLevel.InfoLogFileOnly -LogPrefix $msrdLogPrefix -Message "No Remote Help installation logs found" } msrdCreateLogFolder $global:msrdEventLogFolder $logs = @{ 'Microsoft-Windows-RemoteHelp/Operational' = 'RemoteHelp-Operational' } msrdGetEventLogs -LogPrefix $msrdLogPrefix -EventHashtable $logs $Commands = @( "Get-WinEvent -LogName Microsoft-Windows-RemoteHelp/Operational | Where-Object -Property Message -like '*sendcvtonativeapp*' | Format-Table TimeCreated, Message -Wrap -Auto | Out-File -Append '" + $msrdRemoteAssist + $global:msrdLogFilePrefix + "RemoteHelp-CorrelationVectorHistory.txt'" ) msrdRunCommands -LogPrefix $msrdLogPrefix -CmdletArray $Commands -ThrowException:$False -ShowMessage:$True -ShowError:$True } Function msrdGetMSRAGroupsMembership { msrdGetLocalGroupMembership -logPrefix $msrdLogPrefix -groupName "Offer Remote Assistance Helpers" -outputFile ($msrdRemoteAssist + $global:msrdLogFilePrefix + "LocalGroupsMembership.txt") msrdGetLocalGroupMembership -logPrefix $msrdLogPrefix -groupName "Distributed COM Users" -outputFile ($msrdRemoteAssist + $global:msrdLogFilePrefix + "LocalGroupsMembership.txt") } Function msrdGetMSRAEventLogs { msrdCreateLogFolder $global:msrdEventLogFolder $logs = @{ 'Microsoft-Windows-RemoteAssistance/Admin' = 'RemoteAssistance-Admin' 'Microsoft-Windows-RemoteAssistance/Operational' = 'RemoteAssistance-Operational' } msrdGetEventLogs -LogPrefix $msrdLogPrefix -EventHashtable $logs } Function GetMSRARegKeys { msrdCreateLogFolder $global:msrdRegLogFolder $regs = @{ 'HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance' = 'System-CCS-Control-MSRA' } msrdGetRegKeys -LogPrefix $msrdLogPrefix -RegHashtable $regs } Function msrdGetMSRAPermissions { $Reg = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("Software\Microsoft\Ole", $false) $DCOMMachineLaunchRestriction = $Reg.GetValue("MachineLaunchRestriction") $DCOMMachineAccessRestriction = $Reg.GetValue("MachineAccessRestriction") $DCOMDefaultLaunchPermission = $Reg.GetValue("DefaultLaunchPermission") $DCOMDefaultAccessPermission = $Reg.GetValue("DefaultAccessPermission") # Convert the current permissions to SDDL $converter = new-object system.management.ManagementClass Win32_SecurityDescriptorHelper "Default Access Permission = " + ($converter.BinarySDToSDDL($DCOMDefaultAccessPermission)).SDDL | Out-File -Append ($msrdRemoteAssist + $global:msrdLogFilePrefix + "COMSecurity.txt") "Default Launch Permission = " + ($converter.BinarySDToSDDL($DCOMDefaultLaunchPermission)).SDDL | Out-File -Append ($msrdRemoteAssist + $global:msrdLogFilePrefix + "COMSecurity.txt") "Machine Access Restriction = " + ($converter.BinarySDToSDDL($DCOMMachineAccessRestriction)).SDDL | Out-File -Append ($msrdRemoteAssist + $global:msrdLogFilePrefix + "COMSecurity.txt") "Machine Launch Restriction = " + ($converter.BinarySDToSDDL($DCOMMachineLaunchRestriction)).SDDL | Out-File -Append ($msrdRemoteAssist + $global:msrdLogFilePrefix + "COMSecurity.txt") } Function msrdGetMSRASchedTasks { if ($ScheduledTasks = Get-ScheduledTask -TaskPath '\Microsoft\Windows\RemoteAssistance\' -ErrorAction Ignore) { $ScheduledTasks | ForEach-Object -Process { $Commands = @( "Export-ScheduledTask -TaskName $($_.TaskName) -TaskPath '\Microsoft\Windows\RemoteAssistance' 2>&1 | Out-File -Append '" + $msrdRemoteAssist + $global:msrdLogFilePrefix + "schtasks_" + $_.TaskName + ".xml'" "Get-ScheduledTaskInfo -TaskName $($_.TaskName) -TaskPath '\Microsoft\Windows\RemoteAssistance' 2>&1 | Out-File -Append '" + $msrdRemoteAssist + $global:msrdLogFilePrefix + "schtasks_" + $_.TaskName + "_Info.txt'" ) msrdRunCommands -LogPrefix $msrdLogPrefix -CmdletArray $Commands -ThrowException:$False -ShowMessage:$True -ShowError:$True } } else { msrdLogMessage $LogLevel.WarnLogFileOnly -LogPrefix $msrdLogPrefix -Message "Remote Assistance Scheduled Tasks not found" } } # Collecting Remote Assistance troubleshooting data Function msrdCollectUEX_AVDMSRALog { param( [bool[]]$varsMSRA ) if ($varsMSRA[5] -or (($true -contains $varsMSRA) -and $global:msrdTarget)) { if ($global:msrdSilentMode -eq 1) { msrdLogMessage $LogLevel.Normal "`n" -NoDate } else { " " | Out-File -Append $global:msrdOutputLogFile } msrdLogMessage $LogLevel.Info "$(msrdGetLocalizedText "msramsg")" -silentException msrdCreateLogFolder $msrdRemoteAssist } if ($global:msrdTarget) { if ($varsMSRA[0]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Assistance event logs" } msrdGetMSRAEventLogs } #get event logs if ($varsMSRA[1]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Assistance registry keys" } GetMSRARegKeys } #get reg keys if ($varsMSRA[2]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Assistance groups membership" } msrdGetMSRAGroupsMembership } #get groups membership if ($varsMSRA[3]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Assistance permissions" } msrdGetMSRAPermissions } #get permissions if ($varsMSRA[4]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Assistance scheduled tasks" } msrdGetMSRASchedTasks } #get scheduled tasks } if ($varsMSRA[5]) { if ($global:msrdAudioAssistMode -eq 1) { msrdLogMessageAssistMode "Collect Remote Help installation and event logs" } msrdGetRemoteHelpData } #get Remote Help data } Export-ModuleMember -Function msrdCollectUEX_AVDMSRALog # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBTMJ8ReLRk6Aw3 # 4nDydugov1zy4u3/ulzeQlAnq6W3EKCCDYUwggYDMIID66ADAgECAhMzAAADri01 # UchTj1UdAAAAAAOuMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwODU5WhcNMjQxMTE0MTkwODU5WjB0MQsw # CQYDVQ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U0qukpGUDp/VlH # xRWw67Ls/sc/cBkC/lCI5A3meOOX18ggxxCP+lOzegJPH1ktX6ZstZWHFV91eeMx # TfVE83XKMTy4FEx1/7nyRirauD71x8wdpHAl7ASUkD3GYGaVLF+2ynAOo9O0s2Rj # +OU5v/x1M1yOW++GyIX2gYGT2LgRd57ducKTwP2zwCkcfAOqF5ujzKiVMaL5wI8K # 4VZsGGmZmBUT2KRchV/6L02LUaxpxNxl4URcYinucg5+qsgFsWakvy7BVEyyv50Z # bdm+ABQZcFAgvYvzbRgwXcss6SZ/LsM8T67YGpggqv8foPeQ68Jwt2eTqTuTdAdR # eOGJYH45i4t08SSjUBg0wZFugrU38d/8mw/eKzWOzCKVcWpvM92KUuUP/AbG+E65 # 89btX8fYs7DcTA4wEffUfMqmLfv/DQP0LU21lT3yUvPWYNwvF4UldUvZYYjCqrRI # 1lIoZ92M/Si56N1esksKWl8PrkHDJCaYAoNNixqQF35uFdnDPKpBmicWQPzn0gmG # DT03ftXMb4cpoAwfrbGDaXsyl++VJUVIyGA6Y+Bf9ZyTholIzA4iIJF+n1d/rFZU # Yol83uqPbc1FXlaBg7SPNgb5aBwepwZF8zH4+Oc= # SIG # End signature block
0
3647.ps1
function Test-ElasticPoolRecommendation { $response = Get-AzSqlElasticPoolRecommendation -ResourceGroupName TestRg -ServerName test-srv-v1 Assert-NotNull $response Assert-AreEqual 2 $response.Count Assert-AreEqual "ElasticPool2" $response[1].Name Assert-AreEqual "Standard" $response[1].Edition Assert-AreEqual 1000 $response[1].Dtu Assert-AreEqual 100 $response[1].DatabaseDtuMin Assert-AreEqual 200 $response[1].DatabaseDtuMax Assert-AreEqual 0 $response[1].IncludeAllDatabases Assert-AreEqual 1 $response[1].DatabaseCollection.Count Assert-AreEqual master $response[1].DatabaseCollection[0] }
0
3943.ps1
function Test-AzureFirewallPolicyCRUD { $rgname = Get-ResourceGroupName $azureFirewallPolicyName = Get-ResourceName $azureFirewallPolicyAsJobName = Get-ResourceName $resourceTypeParent = "Microsoft.Network/FirewallPolicies" $location = "westcentralus" $ruleGroupName = Get-ResourceName $appRcName = "appRc" $appRcPriority = 400 $appRcActionType = "Allow" $pipelineRcPriority = 154 $appRc2Name = "appRc2" $appRc2Priority = 300 $appRc2ActionType = "Deny" $appRule1Name = "appRule" $appRule1Desc = "desc1" $appRule1Fqdn1 = "*google.com" $appRule1Fqdn2 = "*microsoft.com" $appRule1Protocol1 = "http:80" $appRule1Port1 = 80 $appRule1ProtocolType1 = "http" $appRule1Protocol2 = "https:443" $appRule1Port2 = 443 $appRule1ProtocolType2 = "https" $appRule1SourceAddress1 = "192.168.0.0/16" $appRule2Name = "appRule2" $appRule2Fqdn1 = "*bing.com" $appRule2Protocol1 = "http:8080" $appRule2Protocol2 = "https:443" $appRule2Port1 = 8080 $appRule2ProtocolType1 = "http" $appRule2SourceAddress1 = "192.168.0.0/16" $networkRcName = "networkRc" $networkRcPriority = 200 $networkRcActionType = "Deny" $networkRule1Name = "networkRule" $networkRule1Desc = "desc1" $networkRule1SourceAddress1 = "10.0.0.0" $networkRule1SourceAddress2 = "111.1.0.0/24" $networkRule1DestinationAddress1 = "*" $networkRule1Protocol1 = "UDP" $networkRule1Protocol2 = "TCP" $networkRule1Protocol3 = "ICMP" $networkRule1DestinationPort1 = "90" $natRcName = "natRc" $natRcPriority = 200 $natRcActionType = "Dnat" $natRule1Name = "natRule" $natRule1Desc = "desc1" $natRule1SourceAddress1 = "10.0.0.0" $natRule1SourceAddress2 = "111.1.0.0/24" $natRule1DestinationAddress1 = "1.2.3.4" $natRule1Protocol1 = "UDP" $natRule1Protocol2 = "TCP" $natRule1DestinationPort1 = "90" $natRule1TranslatedAddress = "10.1.2.3" $natRule1TranslatedPort = "91" try { $resourceGroup = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "testval" } $azureFirewallPolicy = New-AzFirewallPolicy -Name $azureFirewallPolicyName -ResourceGroupName $rgname -Location $location $getAzureFirewallPolicy = Get-AzFirewallPolicy -Name $azureFirewallPolicyName -ResourceGroupName $rgname Assert-AreEqual $rgName $getAzureFirewallPolicy.ResourceGroupName Assert-AreEqual $azureFirewallPolicyName $getAzureFirewallPolicy.Name Assert-NotNull $getAzureFirewallPolicy.Location Assert-AreEqual (Normalize-Location $location) $getAzureFirewallPolicy.Location Assert-AreEqual "Alert" $getAzureFirewallPolicy.ThreatIntelMode $appRule = New-AzFirewallPolicyApplicationRule -Name $appRule1Name -Description $appRule1Desc -Protocol $appRule1Protocol1, $appRule1Protocol2 -TargetFqdn $appRule1Fqdn1, $appRule1Fqdn2 -SourceAddress $appRule1SourceAddress1 $appRule2 = New-AzFirewallPolicyApplicationRule -Name $appRule2Name -Description $appRule1Desc -Protocol $appRule2Protocol1, $appRule2Protocol2 -TargetFqdn $appRule2Fqdn1 -SourceAddress $appRule2SourceAddress1 $networkRule = New-AzFirewallPolicyNetworkRule -Name $networkRule1Name -Description $networkRule1Desc -Protocol $networkRule1Protocol1, $networkRule1Protocol2 -SourceAddress $networkRule1SourceAddress1, $networkRule1SourceAddress2 -DestinationAddress $networkRule1DestinationAddress1 -DestinationPort $networkRule1DestinationPort1 $appRc = New-AzFirewallPolicyFilterRuleCollection -Name $appRcName -Priority $appRcPriority -Rule $appRule, $appRule2 -ActionType $appRcActionType $appRc2 = New-AzFirewallPolicyFilterRuleCollection -Name $appRc2Name -Priority $appRc2Priority -Rule $networkRule -ActionType $appRc2ActionType $natRc = New-AzFirewallPolicyNatRuleCollection -Name $networkRcName -Priority $natRcPriority -Rule $networkRule -TranslatedAddress $natRule1TranslatedAddress -TranslatedPort $natRule1TranslatedPort -ActionType $natRcActionType New-AzFirewallPolicyRuleCollectionGroup -Name $ruleGroupName -Priority 100 -RuleCollection $appRc, $appRc2, $natRc -FirewallPolicyObject $azureFirewallPolicy $azureFirewallPolicy.ThreatIntelMode = "Deny" Set-AzFirewallPolicy -InputObject $azureFirewallPolicy $getAzureFirewallPolicy = Get-AzFirewallPolicy -Name $azureFirewallPolicyName -ResourceGroupName $rgName Assert-AreEqual $rgName $getAzureFirewallPolicy.ResourceGroupName Assert-AreEqual $azureFirewallPolicyName $getAzureFirewallPolicy.Name Assert-NotNull $getAzureFirewallPolicy.Location Assert-AreEqual $location $getAzureFirewallPolicy.Location Assert-AreEqual "Deny" $getAzureFirewallPolicy.ThreatIntelMode Assert-AreEqual 1 @($getAzureFirewallPolicy.RuleCollectionGroups).Count $getRg = Get-AzFirewallPolicyRuleCollectionGroup -Name $ruleGroupName -AzureFirewallPolicy $getAzureFirewallPolicy Assert-AreEqual 3 @($getRg.properties.ruleCollection).Count $filterRuleCollection1 = $getRg.Properties.GetRuleCollectionByName($appRcName) $natRuleCollection = $getRg.Properties.GetRuleCollectionByName($networkRcName) Assert-AreEqual $appRcName $filterRuleCollection1.Name Assert-AreEqual $appRcPriority $filterRuleCollection1.Priority Assert-AreEqual $appRcActionType $filterRuleCollection1.Action.Type Assert-AreEqual 2 $filterRuleCollection1.Rules.Count $appRule = $filterRuleCollection1.GetRuleByName($appRule1Name) Assert-AreEqual $appRule1Name $appRule.Name Assert-AreEqual 1 $appRule.SourceAddresses.Count Assert-AreEqual $appRule1SourceAddress1 $appRule.SourceAddresses[0] Assert-AreEqual 2 $appRule.Protocols.Count Assert-AreEqual $appRule1ProtocolType1 $appRule.Protocols[0].ProtocolType Assert-AreEqual $appRule1ProtocolType2 $appRule.Protocols[1].ProtocolType Assert-AreEqual $appRule1Port1 $appRule.Protocols[0].Port Assert-AreEqual $appRule1Port2 $appRule.Protocols[1].Port Assert-AreEqual 2 $appRule.TargetFqdns.Count Assert-AreEqual $appRule1Fqdn1 $appRule.TargetFqdns[0] Assert-AreEqual $appRule1Fqdn2 $appRule.TargetFqdns[1] $natRule = $natRuleCollection.GetRuleByName($networkRcName) Assert-AreEqual $networkRcName $natRuleCollection.Name Assert-AreEqual $natRcPriority $natRuleCollection.Priority Assert-AreEqual $networkRule1Name $natRule.Name Assert-AreEqual 2 $natRule.SourceAddresses.Count Assert-AreEqual $natRule1SourceAddress1 $natRule.SourceAddresses[0] Assert-AreEqual $natRule1SourceAddress2 $natRule.SourceAddresses[1] Assert-AreEqual 1 $natRule.DestinationAddresses.Count Assert-AreEqual 2 $natRule.Protocols.Count Assert-AreEqual $networkRule1Protocol1 $natRule.Protocols[0] Assert-AreEqual $networkRule1Protocol2 $natRule.Protocols[1] Assert-AreEqual 1 $natRule.DestinationPorts.Count Assert-AreEqual $natRule1DestinationPort1 $natRule.DestinationPorts[0] Assert-AreEqual $natRule1TranslatedAddress $natRuleCollection.TranslatedAddress Assert-AreEqual $natRule1TranslatedPort $natRuleCollection.TranslatedPort $testPipelineRg = Get-AzFirewallPolicyRuleCollectionGroup -Name $ruleGroupName -AzureFirewallPolicyName $getAzureFirewallPolicy.Name -ResourceGroupName $rgname $testPipelineRg|Set-AzFirewallPolicyRuleCollectionGroup -Priority $pipelineRcPriority $testPipelineRg = Get-AzFirewallPolicyRuleCollectionGroup -Name $ruleGroupName -AzureFirewallPolicyName $getAzureFirewallPolicy.Name -ResourceGroupName $rgname Assert-AreEqual $pipelineRcPriority $testPipelineRg.properties.Priority $azureFirewallPolicyAsJob = New-AzFirewallPolicy -Name $azureFirewallPolicyAsJobName -ResourceGroupName $rgname -Location $location -AsJob $result = $azureFirewallPolicyAsJob | Wait-Job Assert-AreEqual "Completed" $result.State; } finally { Clean-ResourceGroup $rgname } }
0
sample_45_66.ps1
#Copyright (C) 2020,2023 VMware, Inc. All rights reserved. . ".\utils.ps1" $versionstart="VERSIONSTART" $versionend="VERSIONEND" function getRegPropValue { param($key, $regKey, $name) $errorMessage = $null try { $value="" if (Test-Path $regKey) { $exp = "(Get-ItemProperty -Path `"$regKey`").$name" $value = Invoke-Expression $exp -ErrorVariable errorMessage } Write-Host "$versionstart $key $value $versionend" } catch [System.Exception] { logError -function "getRegPropValue" -command $regKey -message $errorMessage Write-Host "$versionstart $key $versionend" } } # Oracel DB getRegPropValue "oracle_db_versionregpath" "HKLM:\SOFTWARE\ORACLE\KEY_OraDb11g_home1" "ORACLE_HOME" # MS-SQL DB getRegPropValue "ms-sql_db_version9regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup\CurrentVersion" "CurrentVersion" getRegPropValue "ms-sql_db_version10regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\ClientSetup\CurrentVersion" "CurrentVersion" getRegPropValue "ms-sql_db_version11regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\ClientSetup\CurrentVersion" "CurrentVersion" getRegPropValue "ms-sql_db_version12regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\Tools\ClientSetup\CurrentVersion" "CurrentVersion" getRegPropValue "ms-sql_db_version13regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\Tools\ClientSetup\CurrentVersion" "CurrentVersion" getRegPropValue "ms-sql_db_version15regpath" "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\150\Tools\ClientSetup\CurrentVersion" "CurrentVersion" # VMware View getRegPropValue "vmware_view_server_versionregpath" "HKLM:\SOFTWARE\VMware, Inc.\VMWare VDM" "productVersion" # IIS getRegPropValue "iis_versionregpath" "HKLM:\SOFTWARE\Microsoft\InetStp" "VersionString" # SharePoint getRegPropValue "sharepoint_serverrole12regpath" "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS" "ServerRole" getRegPropValue "sharepoint_serverrole14regpath" "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS" "ServerRole" getRegPropValue "sharepoint_serverrole15regpath" "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS" "ServerRole" getRegPropValue "sharepoint_serverrole16regpath" "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\WSS" "ServerRole" # Exchange getRegPropValue "exchange_version2003regpath" "HKLM:\SOFTWARE\Microsoft\Exchange\Setup" "ExchangeServerAdmin Version" getRegPropValue "exchange_version2007regpath" "HKLM:\SOFTWARE\Microsoft\Exchange\v8.0\Setup" "MsiProductMajor" getRegPropValue "exchange_version2010regpath" "HKLM:\SOFTWARE\Microsoft\ExchangeServer\v14\Setup" "MsiProductMajor" getRegPropValue "exchange_version2013or2016regpath" "HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup" "MsiProductMajor" getRegPropValue "exchange_version2013or2016minorregpath" "HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup" "MsiProductMinor" # Active Directory try { $version = ((Get-ADObject (Get-ADRootDSE).SchemaNamingContext -Property objectVersion).objectVersion).toString("X") Write-Host $versionstart "active_directory_version" "0x$version" $versionend } catch [System.Exception] { Write-Host "$versionstart "active_directory_version" $versionend" } # DB2 $command = "& db2level 2>`$null" $pattern = 'DB2 v([\d\.]+)' $errorMessage = $null try { $cmdOutput = Invoke-Expression $command -ErrorVariable errorMessage $versionLine = $cmdOutput | Select-String -Pattern "DB2 v" Write-Host "$versionstart db2_version $versionLine $versionend" } catch [System.Exception] { Write-Host "$versionstart db2_version $versionend" } # Get versions via command utils $versionCommands = @{"Apache`.exe" = " -v"; "httpd`.exe" = " -v"; "mysqld`.exe" = " -V"; "`"VMware vCenter Site Recovery Manager`\bin`\vmware-dr`.exe`"" = " --version"; "sqlsrvr`.exe" = " -v"} $pattern = '".*?"' $processes = Get-WmiObject win32_service | select ProcessId, PathName $processes | Where-object { $_.PathName -ne $null -and $_.PathName -ne "" } | Select-Object PathName, ProcessId | ForEach-Object { if ($_.PathName -match $pattern) { $path = $Matches[0].Trim('"') $processId = $_.ProcessId $command = $null $versionCommands.Keys | ForEach-Object { $regex = $_ if ($path -match $regex) { $errorMessage = $null try { Write-Host $versionstart $processId $command = "&`"" + $path + '"' + $versionCommands[$regex] $command = $command + " 2>`$null" Invoke-Expression $command -ErrorVariable errorMessage Write-Host $versionend } catch [System.Exception] {} } } } } # Get nginix versions via command utils $processIds = getListeningProcessIds $processes = Get-Process | Where-Object { $_.ProcessName -eq "nginx" } $processes | Where-object { $_.Path -ne $null -and $_.Path -ne "" } | Select-Object Path, Id | ForEach-Object { if ($processIds.Contains($_.Id.ToString())) { $path = $_.Path $processId = $_.Id try { $command = $path + " -v" + " 2>&1" $out = Invoke-Expression $command $exceptionStr = $out.Exception.ToString() $outputString = ($exceptionStr -split ":", 2)[-1].Trim() Write-Host $versionstart $processId $outputString $versionend } catch [System.Exception] {} } }
0
ShowUI Clock 5.ps1
New-UIWidget { Grid { $shadow = DropShadowEffect -ShadowDepth 0 -BlurRadius 5 -Direction 0 Ellipse -Name Hour -Fill Transparent -Stroke Black -StrokeThickness 100 -Width 350 -Height 350 -StrokeDashArray 7.85,7.85 -RenderTransformOrigin "0.5,0.5" -RenderTransform { RotateTransform -Angle -90 } Ellipse -Name Minute -Fill Transparent -Stroke Gray -StrokeThickness 75 -Width 325 -Height 325 -StrokeDashArray 10.468,10.468 -RenderTransformOrigin "0.5,0.5" -RenderTransform { RotateTransform -Angle -90 } Ellipse -Name Second -Fill Transparent -Stroke White -StrokeThickness 50 -Width 300 -Height 300 -StrokeDashArray 15.71,15.71 -RenderTransformOrigin "0.5,0.5" -RenderTransform { RotateTransform -Angle -90 } } } -Refresh "00:00:00.2" { $now = Get-Date $Hour.StrokeDashArray[0] = $Hour.StrokeDashArray[1]/60 * $now.Hour * 5 $Minute.StrokeDashArray[0] = $Minute.StrokeDashArray[1]/60 * $now.Minute $Second.StrokeDashArray[0] = $Second.StrokeDashArray[1]/60 * $now.Second }
0
sample_9_48.ps1
#************************************************ # TS_HyperVKB2263829Check.ps1 #************************************************ Import-LocalizedData -BindingVariable RegKeyCheck Write-DiagProgress -Activity $RegKeyCheck.ID_HyperVKB2263829Check -Status $RegKeyCheck.ID_HyperVKB2263829CheckDesc $RootCauseDetected = $false $RootCauseName = "RC_HyperVKB2263829Check" #Rule ID 263 #----------- #http://sharepoint/sites/rules/_layouts/listform.aspx?PageType=4&ListId={9318793E-073A-415E-8FF5-C433133C2A9E}&ID=263&ContentTypeID=0x01008FE8F6282AC12B4DB4505EA8C2BDB8F8 # #Description #----------- # Checks if Windows Server 2008 R2 SP1, Hyper-V, and Hotfix 2263829 are installed if they are generate alert # #Related KB #---------- #2263829 # #Script Author #------------- # anecho #******************** #Data gathering #******************** $System32Folder = Join-Path $env:windir "System32" $Hvax64File = Join-Path $System32Folder "Hvax64.exe" Function isOSVersion { # <# # .SYNOPSIS # Checks if the Machine is Windows Server 2008 R2 SP1 # .DESCRIPTION # Checks to insure the machine is a server then checks that it is version 7601 (SP1) # .NOTES # .LINK # .EXAMPLE # .OUTPUTS # Boolean value: [true] if the current system is Windows Server 2008 R2 SP1 # otherwise [false] # .PARAMETER file # #> if ((Get-CimInstance -Class Win32_OperatingSystem).ProductType -eq 3 ) { if ($OSVersion.Build -eq 7601) { return $true } else { return $false } } else { return $false } } Function isHyperVFeature { # <# # .SYNOPSIS # Checks to see if HyperVFeature is installed # .DESCRIPTION # Uses Get-CimInstance to pull a list of the server features then filters the list by ID=20 # to see if HyperV Feature is present # .NOTES # .LINK # .EXAMPLE # .OUTPUTS # Boolean value indicating [true] if HyperV Feature is present and [false] if it is not # .PARAMETER file # #> if ((Get-CimInstance -Class Win32_OperatingSystem).ProductType -eq 3 ) { $vmmskey = "HKLM:\SYSTEM\CurrentControlSet\Services\vmms" if (Test-Path $vmmskey) { return $true } else { return $false } } else { return $false } } Function isHotfixInstalled { # <# # .SYNOPSIS # Checks to see if hotfix is installed # .DESCRIPTION # Uses CheckMinimalFileVersion to check the version number of the hotfix files # .NOTES # .LINK # .EXAMPLE # .OUTPUTS # Boolean value: [true] if the hotfix is present, [false] if it is not # .PARAMETER file # #> if ((CheckMinimalFileVersion "$Hvax64File" 6 1 7601 17579 -LDRGDR) -and (CheckMinimalFileVersion "$System32Folder\drivers\Hvboot.sys" 6 1 7601 17579 -LDRGDR) -and (CheckMinimalFileVersion "$System32Folder\Hvix64.exe" 6 1 7601 17579 -LDRGDR) -and (CheckMinimalFileVersion "$System32Folder\Hvax64.exe" 6 1 7601 21683 -LDRGDR) -and (CheckMinimalFileVersion "$System32Folder\drivers\Hvboot.sys" 6 1 7601 21683 -LDRGDR) -and (CheckMinimalFileVersion "$System32Folder\Hvix64.exe" 6 1 7601 21683 -LDRGDR)) { return $true } else { return $false } } Function getFileVersion($file) { $fileVersion = ([System.Diagnostics.FileVersionInfo]::GetVersionInfo($file)) return $fileVersion } #Information Collected node $InformationCollected = new-object PSObject #******************** #Detection Logic #******************** # Detect if OS version is equal to Windows Server 2008 R2 SP0 or SP1 # Check for the binaries specified @ KB2263829 if ((isOSVersion) -and (isHyperVFeature) -and (-not(isHotfixInstalled))) { $HasIssue = $true } else { $HasIssue = $false } #******************** #Alert Evaluation #******************** if($HasIssue) { #Hvax64 file version $Hvax64Version = getFileVersion($Hvax64File) add-member -inputobject $InformationCollected -membertype noteproperty -name "Hvax64.exe current version" -value (Get-FileVersionString($Hvax64File)) switch ($Hvax64Version.FilePrivatePart.ToString().Remove(2)) { "17" {$RequiredVersion = "6.1.7601.17579"} "21" {$RequiredVersion = "6.1.7601.21683"} } add-member -inputobject $InformationCollected -membertype noteproperty -name "Hvax64.exe required version" -value $RequiredVersion Update-DiagRootCause -id $RootCauseName -Detected $true Write-GenericMessage -RootCauseId $RootCauseName -PublicContentURL "http://support.microsoft.com/kb/2263829" -Verbosity "Error" -InformationCollected $InformationCollected -Visibility 4 -SupportTopicsID 8141 -MessageVersion 2 -Component "Hyper-V" } else { if ((isOSVersion) -and (isHyperVFeature)) { Update-DiagRootCause -id $RootCauseName -Detected $false } } # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAUUk/duSgHV/+A # 2FWJJoDaZc4E+ZGURe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udI # k/9KAk/ZJzCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n # dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9y # YXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMz # AAACAAvXqn8bKhdWAAEAAAIAMCIEIL1IrqDou+p7PvcuEWcaTRFbuM53lAEMQcad # RIs4/Ph4MA0GCSqGSIb3DQEBCwUABIICAEY2uGwfH4rKCJJrXZF+xzpLmjE+GGSs # QGDahVzXZsFBBrC+pIh6NoCFAf29MkaXSshcpM2oVkuiaTunSzBU6lo1fwKwzcw5 # CWiEpaDCCF1LMqKRlqCKboDvCfwQVCQ1pFKmsfSkCqCfPNn8/tE56DqJjtg+CSqg # pRqol25u9eiSXgQ/dRrIL6hrnBh/FK/AkXvkT5WZsdW2iXyI1zt6D2Xy9mt5/QJd # WztUe31AXTVJlTSEnZ9AQNZWyKliWzoUKAJf/Pz6NSNar8bHW7KJtX0bTC0ef4DP # tdBtsIJj6abGsIbvZs2xjBdknsuRBfucaEEJsk/LM30ZCpyubfZ52t1KUo42LxwJ # VdC4Ja66aGycKYo+NezUP0DG9IJEciR1mCDLr6gsGQKpvFHF7sQrvdNQbzUCTEVO # vaQIRPlW5u39NGqPssLLibvP8WbZqLzA03jK6E0R2QNvrgIlbp2QPqsjiVPcztp+ # yVuKfHujenj97cQ62A7WsqNCPhXGLm8oR/N3z8eu6fn9PwSuSp+tK2fXE772eX9z # Xcv1ESO5JVbgYMXLmDCdf0rMCy+yHPbJeNMxVN3420KNIZA/UNdULnVElU5BRiAs # 0RO12h0SaLZFlhE/fhN9z4CeAz1fCKulE5yMt3wNY+qFk3vJ6cAkn7HufVk9sVKv # oDqZ44nS9W83 # SIG # End signature block
0
2078.ps1
Add-Type -WarningAction Ignore @' public class Base { private int data; protected Base() { data = 10; } protected Base(int i) { data = i; } protected int Field; protected int Property { get; set; } public int Property1 { get; protected set; } public int Property2 { protected get; set; } protected int Method() { return 32 + data; } protected int OverloadedMethod1(int i) { return 32 + i + data; } protected int OverloadedMethod1(string i) { return 1 + data; } public int OverloadedMethod2(int i) { return 32 + i + data; } protected int OverloadedMethod2(string i) { return 1 + data; } protected int OverloadedMethod3(int i) { return 32 + i + data; } public int OverloadedMethod3(string i) { return 1 + data; } } '@ $derived1,$derived2,$derived3 = Invoke-Expression @' class Derived : Base { Derived() : Base() {} Derived([int] $i) : Base($i) {} [int] TestPropertyAccess() { $this.Property = 1111 return $this.Property } [int] TestPropertyAccess1() { $this.Property1 = 2111 return $this.Property1 } [int] TestPropertyAccess2() { $this.Property2 = 3111 return $this.Property2 } [int] TestDynamicPropertyAccess() { $p = 'Property' $this.$p = 1112 return $this.$p } [int] TestFieldAccess() { $this.Field = 11 return $this.Field } [int] TestDynamicFieldAccess() { $f = 'Field' $this.$f = 12 return $this.$f } [int] TestMethodAccess() { return $this.Method() } [int] TestDynamicMethodAccess() { $m = 'Method' return $this.$m() } [int] TestOverloadedMethodAccess1a() { return $this.OverloadedMethod1(42) } [int] TestOverloadedMethodAccess1b() { return $this.OverloadedMethod1("abc") } [int] TestOverloadedMethodAccess2a() { return $this.OverloadedMethod2(42) } [int] TestOverloadedMethodAccess2b() { return $this.OverloadedMethod2("abc") } [int] TestOverloadedMethodAccess3a() { return $this.OverloadedMethod3(42) } [int] TestOverloadedMethodAccess3b() { return $this.OverloadedMethod3("abc") } } class Derived2 : Base {} [Derived]::new() [Derived]::new(20) [Derived2]::new() '@ Describe "Protected Member Access - w/ default ctor" -Tags "CI" { It "Method Access" { $derived1.TestMethodAccess() | Should -Be 42 } It "Dynamic Method Access" { $derived1.TestDynamicMethodAccess() | Should -Be 42 } It "Field Access" { $derived1.TestFieldAccess() | Should -Be 11 } It "Dynamic Field Access" { $derived1.TestDynamicFieldAccess() | Should -Be 12 } It "Property Access - protected get/protected set" { $derived1.TestPropertyAccess() | Should -Be 1111 } It "Property Access - public get/protected set " { $derived1.TestPropertyAccess1() | Should -Be 2111 } It "Property Access - protected get/public set" { $derived1.TestPropertyAccess2() | Should -Be 3111 } It "Dynamic Property Access" { $derived1.TestDynamicPropertyAccess() | Should -Be 1112 } It "Method Access - overloaded 1a" { $derived1.TestOverloadedMethodAccess1a() | Should -Be 84 } It "Method Access - overloaded 1b" { $derived1.TestOverloadedMethodAccess1b() | Should -Be 11 } It "Method Access - overloaded 2a" { $derived1.TestOverloadedMethodAccess2a() | Should -Be 84 } It "Method Access - overloaded 2b" { $derived1.TestOverloadedMethodAccess2b() | Should -Be 11 } It "Method Access - overloaded 3a" { $derived1.TestOverloadedMethodAccess3a() | Should -Be 84 } It "Method Access - overloaded 3b" { $derived1.TestOverloadedMethodAccess3b() | Should -Be 11 } It "Implicit ctor calls protected ctor" { $derived3.OverloadedMethod2(42) | Should -Be 84 } } Describe "Protected Member Access - w/ non-default ctor" -Tags "CI" { It "Method Access" { $derived2.TestMethodAccess() | Should -Be 52 } It "Dynamic Method Access" { $derived2.TestDynamicMethodAccess() | Should -Be 52 } It "Field Access" { $derived2.TestFieldAccess() | Should -Be 11 } It "Dynamic Field Access" { $derived2.TestDynamicFieldAccess() | Should -Be 12 } It "Property Access - protected get/protected set" { $derived1.TestPropertyAccess() | Should -Be 1111 } It "Property Access - public get/protected set " { $derived1.TestPropertyAccess1() | Should -Be 2111 } It "Property Access - protected get/public set" { $derived1.TestPropertyAccess2() | Should -Be 3111 } It "Dynamic Property Access" { $derived2.TestDynamicPropertyAccess() | Should -Be 1112 } It "Method Access - overloaded 1a" { $derived2.TestOverloadedMethodAccess1a() | Should -Be 94 } It "Method Access - overloaded 1b" { $derived2.TestOverloadedMethodAccess1b() | Should -Be 21 } It "Method Access - overloaded 2a" { $derived2.TestOverloadedMethodAccess2a() | Should -Be 94 } It "Method Access - overloaded 2b" { $derived2.TestOverloadedMethodAccess2b() | Should -Be 21 } It "Method Access - overloaded 3a" { $derived2.TestOverloadedMethodAccess3a() | Should -Be 94 } It "Method Access - overloaded 3b" { $derived2.TestOverloadedMethodAccess3b() | Should -Be 21 } } Describe "Protected Member Access - members not visible outside class" -Tags "CI" { Set-StrictMode -v 3 It "Invalid protected field Get Access" { { $derived1.Field } | Should -Throw -ErrorId "PropertyNotFoundStrict" } It "Invalid protected property Get Access" { { $derived1.Property } | Should -Throw -ErrorId "PropertyNotFoundStrict" } It "Invalid protected field Set Access" { { $derived1.Field = 1 } | Should -Throw -ErrorId "PropertyAssignmentException"} It "Invalid protected property Set Access" { { $derived1.Property = 1 } | Should -Throw -ErrorId "PropertyAssignmentException" } It "Invalid protected constructor Access" { { [Base]::new() } | Should -Throw -ErrorId "MethodCountCouldNotFindBest" } It "Invalid protected method Access" { { $derived1.Method() } | Should -Throw -ErrorId "MethodNotFound" } }
0
3663.ps1
function Test-CreateDatabase { Test-CreateDatabaseInternal "Southeast Asia" } function Test-CreateDatabaseInternal ($location = "westcentralus") { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location try { $databaseName = Get-DatabaseName $job1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -AsJob $job1 | Wait-Job $db = $job1.Output Assert-AreEqual $databaseName $db.DatabaseName Assert-NotNull $db.MaxSizeBytes Assert-NotNull $db.Edition Assert-NotNull $db.CurrentServiceObjectiveName Assert-NotNull $db.CollationName $databaseName = Get-DatabaseName $db = $server | New-AzSqlDatabase -DatabaseName $databaseName Assert-AreEqual $db.DatabaseName $databaseName Assert-NotNull $db.MaxSizeBytes Assert-NotNull $db.Edition Assert-NotNull $db.CurrentServiceObjectiveName Assert-NotNull $db.CollationName $databaseName = Get-DatabaseName $collationName = "SQL_Latin1_General_CP1_CI_AS" $maxSizeBytes = 250GB $job2 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100 -AsJob $job2 | Wait-Job $dwdb = $job2.Output Assert-AreEqual $dwdb.DatabaseName $databaseName Assert-AreEqual $dwdb.MaxSizeBytes $maxSizeBytes Assert-AreEqual $dwdb.Edition DataWarehouse Assert-AreEqual $dwdb.CurrentServiceObjectiveName DW100 Assert-AreEqual $dwdb.CollationName $collationName $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName "Japanese_Bushu_Kakusu_100_CS_AS" -MaxSizeBytes 1GB -Edition Basic -RequestedServiceObjectiveName Basic -Tags @{"tag_key"="tag_value"} Assert-AreEqual $db.DatabaseName $databaseName Assert-AreEqual $db.MaxSizeBytes 1GB Assert-AreEqual $db.Edition Basic Assert-AreEqual $db.CurrentServiceObjectiveName Basic Assert-AreEqual $db.CollationName "Japanese_Bushu_Kakusu_100_CS_AS" Assert-NotNull $db.Tags Assert-AreEqual True $db.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_value" $db.Tags["tag_key"] $databaseName = Get-DatabaseName $db = $server | New-AzSqlDatabase -DatabaseName $databaseName ` -CollationName "Japanese_Bushu_Kakusu_100_CS_AS" -MaxSizeBytes 1GB -Edition Basic -RequestedServiceObjectiveName Basic -Tags @{"tag_key"="tag_value"} Assert-AreEqual $db.DatabaseName $databaseName Assert-AreEqual $db.MaxSizeBytes 1GB Assert-AreEqual $db.Edition Basic Assert-AreEqual $db.CurrentServiceObjectiveName Basic Assert-AreEqual $db.CollationName "Japanese_Bushu_Kakusu_100_CS_AS" Assert-NotNull $db.Tags Assert-AreEqual True $db.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_value" $db.Tags["tag_key"] } finally { Remove-ResourceGroupForTest $rg } } function Test-CreateVcoreDatabase { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location try { $databaseName = Get-DatabaseName $job1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RequestedServiceObjectiveName GP_Gen4_2 -Edition GeneralPurpose -AsJob $job1 | Wait-Job $db = $job1.Output Assert-AreEqual $databaseName $db.DatabaseName Assert-NotNull $db.MaxSizeBytes Assert-AreEqual GP_Gen4_2 $db.CurrentServiceObjectiveName Assert-AreEqual 2 $db.Capacity Assert-AreEqual GeneralPurpose $db.Edition $databaseName = Get-DatabaseName $job1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -VCore 2 -ComputeGeneration Gen4 -Edition GeneralPurpose -AsJob $job1 | Wait-Job $db = $job1.Output Assert-AreEqual $databaseName $db.DatabaseName Assert-NotNull $db.MaxSizeBytes Assert-AreEqual GP_Gen4_2 $db.CurrentServiceObjectiveName Assert-AreEqual 2 $db.Capacity Assert-AreEqual GeneralPurpose $db.Edition } finally { Remove-ResourceGroupForTest $rg } } function Test-CreateVcoreDatabaseWithLicenseType { $location = Get-Location "Microsoft.Sql" "operations" "West Central US" $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location try { $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RequestedServiceObjectiveName GP_Gen4_1 -Edition GeneralPurpose -LicenseType BasePrice Assert-AreEqual BasePrice $db.LicenseType $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RequestedServiceObjectiveName GP_Gen4_1 -Edition GeneralPurpose -LicenseType LicenseIncluded Assert-AreEqual LicenseIncluded $db.LicenseType $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -VCore 2 -ComputeGeneration Gen4 -Edition GeneralPurpose -LicenseType BasePrice Assert-AreEqual BasePrice $db.LicenseType $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -VCore 2 -ComputeGeneration Gen4 -Edition GeneralPurpose -LicenseType LicenseIncluded Assert-AreEqual LicenseIncluded $db.LicenseType } finally { Remove-ResourceGroupForTest $rg } } function Test-CreateServerlessDatabase { $location = Get-Location "Microsoft.Sql" "operations" "Japan East" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location try { $databaseName = Get-DatabaseName $job1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RequestedServiceObjectiveName GP_S_Gen5_2 -AutoPauseDelayInMinutes 360 -MinVCore 0.5 -AsJob $job1 | Wait-Job $db = $job1.Output Assert-AreEqual $databaseName $db.DatabaseName Assert-NotNull $db.MaxSizeBytes Assert-AreEqual GP_S_Gen5_2 $db.CurrentServiceObjectiveName Assert-AreEqual 2 $db.Capacity Assert-AreEqual 360 $db.AutoPauseDelayInMinutes Assert-AreEqual 0.5 $db.MinimumCapacity Assert-AreEqual GeneralPurpose $db.Edition } finally { Remove-ResourceGroupForTest $rg } } function Test-CreateDatabaseWithSampleName { $location = "westcentralus" $rg = Create-ResourceGroupForTest try { $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -SampleName "AdventureWorksLT" -RequestedServiceObjectiveName Basic ` -Tags @{"tag_key"="tag_value"} Assert-AreEqual $db.DatabaseName $databaseName Assert-AreEqual $db.CurrentServiceObjectiveName Basic Assert-NotNull $db.MaxSizeBytes Assert-NotNull $db.Edition Assert-NotNull $db.CurrentServiceObjectiveName Assert-NotNull $db.CollationName Assert-NotNull $db.Tags Assert-AreEqual True $db.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_value" $db.Tags["tag_key"] } finally { Remove-ResourceGroupForTest $rg } } function Test-CreateDatabaseWithZoneRedundancy { $location = Get-Location "Microsoft.Sql" "operations" "West Europe" $rg = Create-ResourceGroupForTest $location try { $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $job = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -Edition Premium -AsJob $job | Wait-Job $db = $job.Output Assert-AreEqual $db.DatabaseName $databaseName Assert-NotNull $db.Edition Assert-NotNull $db.ZoneRedundant Assert-AreEqual "false" $db.ZoneRedundant $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -Edition Premium -ZoneRedundant Assert-AreEqual $db.DatabaseName $databaseName Assert-NotNull $db.Edition Assert-NotNull $db.ZoneRedundant Assert-AreEqual "true" $db.ZoneRedundant $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -Edition Premium -ZoneRedundant:$false Assert-AreEqual $db.DatabaseName $databaseName Assert-NotNull $db.Edition Assert-NotNull $db.ZoneRedundant Assert-AreEqual "false" $db.ZoneRedundant } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateDatabase { Test-UpdateDatabaseInternal "Southeast Asia" } function Test-UpdateDatabaseInternal ($location = "westcentralus") { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -Edition Standard -MaxSizeBytes 250GB -RequestedServiceObjectiveName S0 Assert-AreEqual $db.DatabaseName $databaseName try { $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -MaxSizeBytes 1GB -Edition Basic -RequestedServiceObjectiveName Basic -Tags @{"tag_key"="tag_new_value"} -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.MaxSizeBytes 1GB Assert-AreEqual $db1.Edition Basic Assert-AreEqual $db1.CurrentServiceObjectiveName Basic Assert-AreEqual $db1.CollationName $db.CollationName Assert-NotNull $db1.Tags Assert-AreEqual True $db1.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_new_value" $db1.Tags["tag_key"] $db2 = $db1 | Set-AzSqlDatabase -MaxSizeBytes 100GB -Edition Standard -RequestedServiceObjectiveName S1 -Tags @{"tag_key"="tag_new_value2"} Assert-AreEqual $db2.DatabaseName $db.DatabaseName Assert-AreEqual $db2.MaxSizeBytes 100GB Assert-AreEqual $db2.Edition Standard Assert-AreEqual $db2.CurrentServiceObjectiveName S1 Assert-AreEqual $db2.CollationName $db.CollationName Assert-NotNull $db2.Tags Assert-AreEqual True $db2.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_new_value2" $db2.Tags["tag_key"] $databaseName = Get-DatabaseName $collationName = "SQL_Latin1_General_CP1_CI_AS" $maxSizeBytes = 250GB $dwdb = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100 $job = Set-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $dwdb.DatabaseName ` -MaxSizeBytes $maxSizeBytes -RequestedServiceObjectiveName DW200 -Edition DataWarehouse -AsJob $job | Wait-Job $dwdb2 = $job.Output Assert-AreEqual $dwdb2.DatabaseName $dwdb.DatabaseName Assert-AreEqual $dwdb2.MaxSizeBytes $maxSizeBytes Assert-AreEqual $dwdb2.Edition DataWarehouse Assert-AreEqual $dwdb2.CurrentServiceObjectiveName DW200 Assert-AreEqual $dwdb2.CollationName $collationName } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateVcoreDatabase() { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -VCore 2 -Edition GeneralPurpose -ComputeGeneration Gen4 -MaxSizeBytes 250GB Assert-AreEqual $db.DatabaseName $databaseName try { $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-NotNull $db1.MaxSizeBytes Assert-NotNull $db1.Edition Assert-NotNull $db1.CurrentServiceObjectiveName $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -MaxSizeBytes 5GB -VCore 1 -Edition GeneralPurpose -ComputeGeneration Gen4 -Tags @{"tag_key"="tag_new_value"} -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.MaxSizeBytes 5GB Assert-AreEqual $db1.Edition GeneralPurpose Assert-AreEqual $db1.CurrentServiceObjectiveName GP_Gen4_1 Assert-AreEqual $db1.CollationName $db.CollationName Assert-NotNull $db1.Tags Assert-AreEqual True $db1.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_new_value" $db1.Tags["tag_key"] $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Edition BusinessCritical -ComputeGeneration Gen4 -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition BusinessCritical Assert-AreEqual $db1.CurrentServiceObjectiveName BC_Gen4_1 $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -VCore 2 -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition BusinessCritical Assert-AreEqual $db1.CurrentServiceObjectiveName BC_Gen4_2 $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Edition GeneralPurpose -RequestedServiceObjectiveName GP_Gen4_2 -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition GeneralPurpose Assert-AreEqual $db1.CurrentServiceObjectiveName GP_Gen4_2 } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateVcoreDatabaseLicenseType() { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -RequestedServiceObjectiveName GP_Gen4_1 -Edition GeneralPurpose Assert-AreEqual $db.DatabaseName $databaseName Assert-AreEqual $db.LicenseType LicenseIncluded try { $db1 = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName -LicenseType LicenseIncluded Assert-AreEqual LicenseIncluded $db1.LicenseType $db1 = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName -LicenseType BasePrice Assert-AreEqual BasePrice $db1.LicenseType $db1 = $db1 | Set-AzSqlDatabase -LicenseType LicenseIncluded Assert-AreEqual LicenseIncluded $db1.LicenseType $db1 = $db1 | Set-AzSqlDatabase -LicenseType BasePrice Assert-AreEqual BasePrice $db1.LicenseType } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateDatabaseWithZoneRedundant () { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -Edition Premium Assert-AreEqual $db1.DatabaseName $databaseName Assert-NotNull $db1.ZoneRedundant Assert-AreEqual "false" $db1.ZoneRedundant $databaseName = Get-DatabaseName $db2 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -Edition Premium -ZoneRedundant Assert-AreEqual $db2.DatabaseName $databaseName Assert-NotNull $db2.ZoneRedundant Assert-AreEqual "true" $db2.ZoneRedundant try { $sdb1 = Set-AzSqlDatabase -ResourceGroupName $db1.ResourceGroupName -ServerName $db1.ServerName -DatabaseName $db1.DatabaseName ` -ZoneRedundant Assert-AreEqual $sdb1.DatabaseName $db1.DatabaseName Assert-NotNull $sdb1.ZoneRedundant Assert-AreEqual "true" $sdb1.ZoneRedundant $sdb2 = Set-AzSqlDatabase -ResourceGroupName $db2.ResourceGroupName -ServerName $db2.ServerName -DatabaseName $db2.DatabaseName ` -ZoneRedundant:$false Assert-AreEqual $sdb2.DatabaseName $db2.DatabaseName Assert-NotNull $sdb2.ZoneRedundant Assert-AreEqual "false" $sdb2.ZoneRedundant } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateServerlessDatabase() { $location = Get-Location "Microsoft.Sql" "operations" "Japan East" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -VCore 2 -Edition GeneralPurpose -ComputeGeneration Gen5 -MaxSizeBytes 250GB -ComputeModel Serverless Assert-AreEqual $db.DatabaseName $databaseName try { $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-NotNull $db1.MaxSizeBytes Assert-NotNull $db1.Edition Assert-NotNull $db1.CurrentServiceObjectiveName Assert-NotNull $db1.MinimumCapacity Assert-NotNull $db1.AutoPauseDelayInMinutes $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Edition Premium -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition Premium Assert-Null $db1.MinimumCapacity Assert-Null $db1.AutoPauseDelayInMinutes $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -VCore 2 -Edition GeneralPurpose -ComputeModel Serverless -ComputeGeneration Gen5 -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition GeneralPurpose Assert-AreEqual $db1.CurrentServiceObjectiveName GP_S_Gen5_2 Assert-NotNull $db1.MinimumCapacity Assert-NotNull $db1.AutoPauseDelayInMinutes $job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Vcore 2 -Edition GeneralPurpose -ComputeModel Serverless -ComputeGeneration Gen5 -MinimumCapacity 2 -AutoPauseDelayInMinutes 1440 -AsJob $job | Wait-Job $db1 = $job.Output Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual $db1.Edition GeneralPurpose Assert-AreEqual $db1.CurrentServiceObjectiveName GP_S_Gen5_2 Assert-AreEqual $db1.MinimumCapacity 2 Assert-AreEqual $db1.AutoPauseDelayInMinutes 1440 } finally { Remove-ResourceGroupForTest $rg } } function Test-UpdateDatabaseWithZoneRedundantNotSpecified () { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -Edition Premium -ZoneRedundant Assert-AreEqual $db.DatabaseName $databaseName Assert-NotNull $db.ZoneRedundant Assert-AreEqual "true" $db.ZoneRedundant try { $db1 = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Tags @{"tag_key"="tag_new_value2"} Assert-AreEqual $db1.DatabaseName $db.DatabaseName Assert-AreEqual True $db1.Tags.ContainsKey("tag_key") Assert-AreEqual "tag_new_value2" $db1.Tags["tag_key"] Assert-NotNull $db1.ZoneRedundant Assert-AreEqual "true" $db1.ZoneRedundant } finally { Remove-ResourceGroupForTest $rg } } function Test-RenameDatabase { $rg = Create-ResourceGroupForTest try { $location = "westcentralus" $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -MaxSizeBytes 1GB Assert-AreEqual $db1.DatabaseName $databaseName $name2 = "name2" $db2 = Set-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -NewName $name2 Assert-AreEqual $db2.DatabaseName $name2 Assert-ThrowsContains -script { $db1 | Get-AzSqlDatabase } -message "not found" $db2 | Get-AzSqlDatabase $name3 = "name3" $db3 = $db2 | Set-AzSqlDatabase -NewName $name3 Assert-AreEqual $db3.DatabaseName $name3 Assert-ThrowsContains -script { $db1 | Get-AzSqlDatabase } -message "not found" Assert-ThrowsContains -script { $db2 | Get-AzSqlDatabase } -message "not found" $db3 | Get-AzSqlDatabase } finally { Remove-ResourceGroupForTest $rg } } function Test-GetDatabase { Test-GetDatabaseInternal "Southeast Asia" } function Test-GetDatabaseInternal ($location = "westcentralus") { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -MaxSizeBytes 1GB Assert-AreEqual $db1.DatabaseName $databaseName $databaseName = Get-DatabaseName $db2 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName "Japanese_Bushu_Kakusu_100_CS_AS" -MaxSizeBytes 1GB -Edition Basic -RequestedServiceObjectiveName Basic Assert-AreEqual $db2.DatabaseName $databaseName try { $databaseName = Get-DatabaseName $dwdb = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName SQL_Latin1_General_CP1_CI_AS -MaxSizeBytes 250GB -Edition DataWarehouse -RequestedServiceObjectiveName DW100 $dwdb2 = Get-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupname -ServerName $server.ServerName -DatabaseName $dwdb.DatabaseName Assert-AreEqual $dwdb2.DatabaseName $dwdb.DatabaseName Assert-AreEqual $dwdb2.MaxSizeBytes $dwdb.MaxSizeBytes Assert-AreEqual $dwdb2.Edition $dwdb.Edition Assert-AreEqual $dwdb2.CurrentServiceObjectiveName $dwdb.CurrentServiceObjectiveName Assert-AreEqual $dwdb2.CollationName $dwdb.CollationName $all = $server | Get-AzSqlDatabase Assert-AreEqual $all.Count 4 $gdb1 = Get-AzSqlDatabase -ResourceGroupName $server.ResourceGroupname -ServerName $server.ServerName -DatabaseName $db1.DatabaseName Assert-NotNull $gdb1 Assert-AreEqual $db1.DatabaseName $gdb1.DatabaseName Assert-AreEqual $db1.Edition $gdb1.Edition Assert-AreEqual $db1.CollationName $gdb1.CollationName Assert-AreEqual $db1.CurrentServiceObjectiveName $gdb1.CurrentServiceObjectiveName Assert-AreEqual $db1.MaxSizeBytes $gdb1.MaxSizeBytes $gdb2 = $db2 | Get-AzSqlDatabase Assert-NotNull $gdb2 Assert-AreEqual $db2.DatabaseName $gdb2.DatabaseName Assert-AreEqual $db2.Edition $gdb2.Edition Assert-AreEqual $db2.CollationName $gdb2.CollationName Assert-AreEqual $db2.CurrentServiceObjectiveName $gdb2.CurrentServiceObjectiveName Assert-AreEqual $db2.MaxSizeBytes $gdb2.MaxSizeBytes } finally { Remove-ResourceGroupForTest $rg } } function Test-GetDatabaseWithZoneRedundancy { $location = Get-Location "Microsoft.Sql" "operations" "West Europe" $rg = Create-ResourceGroupForTest $location try { $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -Edition Premium -ZoneRedundant $gdb1 = Get-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupname -ServerName $server.ServerName -DatabaseName $db1.DatabaseName Assert-AreEqual $gdb1.DatabaseName $db1.DatabaseName Assert-AreEqual "true" $gdb1.ZoneRedundant $databaseName = Get-DatabaseName $db2 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName ` -DatabaseName $databaseName -Edition Premium $gdb2 = Get-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupname -ServerName $server.ServerName -DatabaseName $db2.DatabaseName Assert-AreEqual $gdb2.DatabaseName $db2.DatabaseName Assert-AreEqual "false" $gdb2.ZoneRedundant } finally { Remove-ResourceGroupForTest $rg } } function Test-RemoveDatabase { Test-RemoveDatabaseInternal "Southeast Asia" } function Test-RemoveDatabaseInternal ($location = "westcentralus") { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName -MaxSizeBytes 1GB Assert-AreEqual $db1.DatabaseName $databaseName $databaseName = Get-DatabaseName $db2 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName "Japanese_Bushu_Kakusu_100_CS_AS" -MaxSizeBytes 1GB -Edition Basic -RequestedServiceObjectiveName Basic Assert-AreEqual $db2.DatabaseName $databaseName try { $databaseName = Get-DatabaseName $dwdb = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -CollationName "SQL_Latin1_General_CP1_CI_AS" -MaxSizeBytes 250GB -Edition DataWarehouse -RequestedServiceObjectiveName DW100 Assert-AreEqual $dwdb.DatabaseName $databaseName Remove-AzSqlDatabase -ResourceGroupName $server.ResourceGroupname -ServerName $server.ServerName -DatabaseName $dwdb.DatabaseName -Force $all = $server | Get-AzSqlDatabase Assert-AreEqual $all.Count 3 Remove-AzSqlDatabase -ResourceGroupName $server.ResourceGroupname -ServerName $server.ServerName -DatabaseName $db1.DatabaseName -Force $db2 | Remove-AzSqlDatabase -Force $all = $server | Get-AzSqlDatabase Assert-AreEqual $all.Count 1 } finally { Remove-ResourceGroupForTest $rg } } function Test-CancelDatabaseOperation { Test-CancelDatabaseOperationInternal } function Test-CancelDatabaseOperationInternal { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName ` -Edition Standard -MaxSizeBytes 250GB -RequestedServiceObjectiveName S0 Assert-AreEqual $db.DatabaseName $databaseName 'Create database failed.' try { $db1 = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName ` -Edition Standard -RequestedServiceObjectiveName S1 Assert-AreEqual $db1.DatabaseName $db.DatabaseName 'Alter db name not equal' Assert-AreEqual $db1.Edition Standard 'Alter db edition not equal' Assert-AreEqual $db1.CurrentServiceObjectiveName S1 'Alter db slo not equal' $dbactivity = Get-AzSqlDatabaseActivity -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName Assert-AreEqual $dbactivity.DatabaseName $db.DatabaseName Assert-AreEqual $dbactivity.Operation "UpdateLogicalDatabase" $dbactivityId = $dbactivity.OperationId try { $dbactivityCancel = Stop-AzSqlDatabaseActivity -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName -OperationId $dbactivityId } Catch { $ErrorMessage = $_.Exception.Message Assert-AreEqual True $ErrorMessage.Contains("Cannot cancel management operation '" + $dbactivityId + "' in the current state") } } finally { Remove-ResourceGroupForTest $rg } }
0
finddupe_16.ps1
function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider]; $hashAlgorithm = new-object $cryptoServiceProvider $stream = $file.OpenRead(); $hashByteArray = $hashAlgorithm.ComputeHash($stream); $stream.Close(); ## We have to be sure that we close the file stream if any exceptions are thrown. trap { if ($stream -ne $null) { $stream.Close(); } break; } foreach ($byte in $hashByteArray) { if ($byte -lt 16) {$result += “0{0:X}” -f $byte } else { $result += “{0:X}” -f $byte }} return [string]$result; } $starttime=[datetime]::now write-host "Usage: finddupe.ps1 <directory/file #1> <directory/file #2> ... <directory/file #N> [-delete] [-noprompt]" $matches = 0 # initialize number of matches for summary. $filesdeleted = 0 # number of files deleted. $bytesrec = 0 # Number of bytes recovered. $files=@() $del = $false # delete duplicates $noprompt = $false # delete without prompting toggle $currentdir = $true # work on current directory by default $args | ?{$_ -eq "-delete"} |%{$del=$true} $args | ?{$_ -eq "-noprompt"} | %{$noprompt=$true} $files=@(dir -ea 0 -recurse ($args | ?{$_ -ne "-delete" -and $_ -ne "-noprompt"})|?{$_.psiscontainer -ne $true} ) if ($files.count -eq 0) {"No files found.`a";exit} for ($i=0;$i -ne $files.count; $i++) # Cycle thru all files { if ($files[$i] -eq $null) {continue} $filecheck = $files[$i] $files[$i] = $null for ($c=0;$c -ne $files.count; $c++) { if ($files[$c] -eq $null) {continue} # write-host "Comparing $filecheck and $($files[$c]) `r" -nonewline if ($filecheck.length -eq $files[$c].length) { #write-host "Comparing MD5 of $($filecheck.fullname) and $($files[$c].fullname) `r" -nonewline if ($filecheck.md5 -eq $null) { $md5 = (get-md5 $filecheck.fullname) $filecheck = $filecheck | %{add-member -inputobject $_ -name MD5 -membertype noteproperty -value $md5 -passthru} } if ($files[$c].md5 -eq $null) { $md5 = (get-md5 $files[$c].fullname) $files[$c] = $files[$c] | %{add-member -inputobject $_ -name MD5 -membertype noteproperty -value $md5 -passthru} } if ($filecheck.md5 -eq $files[$c].md5) { write-host "Size and MD5 match: " -fore red -nonewline write-host "`"$($filecheck.fullname)`"" -nonewline write-host " and " -nonewline write-host "`"$($files[$c].fullname)`"" $matches++ if ($del -eq $true) { if ($noprompt -eq $true) { del $files[$c].fullname write-host "Deleted duplicate: " -f red -nonewline write-host "$($files[$c].fullname)." } else { del $files[$c].fullname -confirm } if ((get-item -ea 0 $files[$c].fullname) -eq $null) { $filesdeleted += 1 $bytesrec += $files[$c].length } } $files[$c] = $null } } } } write-host "" write-host "Number of Files checked: $($files.count)." # Display useful info; files checked and matches found. write-host "Number of duplicates found: $matches." Write-host "Number of duplicates deleted: $filesdeleted." # Display number of duplicate files deleted and bytes recovered. write-host "$bytesrec bytes recovered." write-host "" write-host "Time to run: $(([datetime]::now)-$starttime|select hours, minutes, seconds, milliseconds)" write-host ""
0
sample_38_3.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Gets the properties of the specified webhook. .Description Gets the properties of the specified webhook. .Example Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "RegistryExample" -Name "webhook001" .Example Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "RegistryExample" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IContainerRegistryIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IWebhook .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IContainerRegistryIdentity>: Identity Parameter [AgentPoolName <String>]: The name of the agent pool. [CacheRuleName <String>]: The name of the cache rule. [ConnectedRegistryName <String>]: The name of the connected registry. [CredentialSetName <String>]: The name of the credential set. [ExportPipelineName <String>]: The name of the export pipeline. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [ImportPipelineName <String>]: The name of the import pipeline. [PipelineRunName <String>]: The name of the pipeline run. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [RegistryName <String>]: The name of the container registry. [ReplicationName <String>]: The name of the replication. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [RunId <String>]: The run ID. [ScopeMapName <String>]: The name of the scope map. [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [TaskName <String>]: The name of the container registry task. [TaskRunName <String>]: The name of the task run. [TokenName <String>]: The name of the token. [WebhookName <String>]: The name of the webhook. .Link https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistrywebhook #> function Get-AzContainerRegistryWebhook { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IWebhook])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('WebhookName', 'ResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [System.String] # The name of the webhook. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('ContainerRegistryName')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [System.String] # The name of the container registry. ${RegistryName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IContainerRegistryIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='GetByRegistry', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry] # The Registry Object. ${Registry}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { if ($PSBoundParameters.ContainsKey('Registry')){ $Registry = $PSBoundParameters["Registry"] $null = $PSBoundParameters.Remove('Registry') $RegistryName = $Registry.Name $ResourceGroupName = $Registry.ResourceGroupName } . Az.ContainerRegistry.internal\Get-AzContainerRegistryWebhook -RegistryName $RegistryName -ResourceGroupName $ResourceGroupName @PSBoundParameters } } # SIG # Begin signature block # MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAiCXwwILE74VEx # 4cPvQvcNnUtMOeS/gc6ZQM/j344vpKCCDYUwggYDMIID66ADAgECAhMzAAADri01 # UchTj1UdAAAAAAOuMA0GCSqGSIb3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BgNVBAcTB1JlZG1vbmQxHjAc # BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0 # IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAHnLo8vkwtPG+kAAQAAAecwIgQgUj1W # 10UOl24tqW0PGjrhbdiG0wEdX5mXIsSe+QniYO0wDQYJKoZIhvcNAQELBQAEggIA # L9GMOOeFgfQqK2hW/Pr1KSg8tE8qO32BDUBOBVP7FpIDmeys/40VC+TEmaWMN+fR # XUWIE13ABjelCgtELELaeHloSYrvicE/zwOuUvxaQIeKz1PJOssZ4a/NiZGla2UU # 9IPG916lnmHek9mZuoo2rxDmIw5e3dd7uhIHRVW05rH5gguq+O7odJZIdPThR5gD # fLL8mlifm6Q88fJVJysEqQgbnA2jgTltl/krEvypfNfD1/2+IyY8jfBeqJwM6DFR # 9YkA4MJqAFwDR/awBUhmmqDQDjxhHtbRItqPw9fnpTEfwH9YxRI9qlKVgfRwjs6H # ivWPLzJ7M2CbshCQ45hseMkjQlVA0Ghdh/+hg/NNcuOkAr8rqhw2rsYGs3D9ltgn # ZmqTx9WwI4xbQo45X5jsTo/rb1ZOXh8TeIF+xwbijfx23soBFPDfWyxx4i5LMkYs # uRFD1StD8OoAocezpDXkkrXNXKNF+MYxUq8u5vaaz5VL33lnkodQJcFxCj/BGruf # SP8KpyX4NetaEIKlTVpfRk+kxmGe1K8EnKVnie5icbw6HARpabCoIKGnZsiU4khN # 4eTREIcfBA9Vjh4SxtA+eFay1bH/6Ls65LBi3/2XmeHAZ3tYof39+nfNanlXPOlA # H0v3FwZvhhRCdd6W+1y9FkziaA5p94hLRAkRd7PCZnU= # SIG # End signature block
0
Coloring text in RichTex.ps1
#code showing in RichTextBox $code = @' using System; using System.Linq; using System.Reflection; using System.Diagnostics; [assembly: AssemblyVersion("3.5.0.0")] namespace ProcessesSortedWithStartTime { internal sealed class Program { static DateTime Started(Process p) { try { return p.StartTime; } catch { return DateTime.MinValue; } } static void Main() { Process[] procs = Process.GetProcesses(); try { var sorted = from p in procs orderby Started(p), p.Id select p; foreach (Process p in sorted) Console.WriteLine("{0, 5} {1}", p.Id, p.ProcessName); } finally { foreach (Process p in procs) p.Dispose(); } } } } '@ #reserved words $res = @( "using", "namespace", "internal", "sealed", "class", "static", "try", "return", "catch", "void", "finally", "var", "from", "in", "orderby", "select", "foreach" ) #invoke coloring $frmMain_Load= { $res | % { Invoke-TextColoring $_ -col "Cyan" } #operation @("=") | % { Invoke-TextColoring $_ -col "Red" } #brackets "{", "}" | % { Invoke-TextColoring $_ -col "Orange" } } #coloring function Invoke-TextColoring { param( [string]$Match, [int32]$Position = 0, [Windows.Forms.RichTextBoxFinds]$Options = "WholeWord", [Drawing.Color]$Color = "Blue" ) $chk = $txtEdit.Find($match, $position, $options) while ($chk -ge 0) { $txtEdit.SelectionStart = $chk $txtEdit.SelectionLength = $match.Length $txtEdit.SelectionColor = $color $cur = $chk + $match.Length if ($cur -lt $txtEdit.TextLength) { $chk = $txtEdit.Find($match, $cur, $options) } else { break } #go out from cycle if there are not matches any more } $txtEdit.DeselectAll() } function frmMain_Show { Add-Type -AssemblyName System.Windows.Forms [Windows.Forms.Application]::EnableVisualStyles() $frmMain = New-Object Windows.Forms.Form $txtEdit = New-Object Windows.Forms.RichTextBox # #txtEdit # $txtEdit.BackColor = [Drawing.Color]::FromArgb(1, 36, 86) $txtEdit.Dock = "Fill" $txtEdit.Font = New-Object Drawing.Font("Courier New", 10, [Drawing.FontStyle]::Bold) $txtEdit.ForeColor = [Drawing.Color]::Linen $txtEdit.Text = $code # #frmMain # $frmMain.ClientSize = New-Object Drawing.Size(590, 570) $frmMain.Controls.Add($txtEdit) $frmMain.FormBorderStyle = "FixedSingle" $frmMain.StartPosition = "CenterScreen" $frmMain.Text = "Form1" $frmMain.Add_Load($frmMain_Load) [void]$frmMain.ShowDialog() } frmMain_Show
0
sample_51_10.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath common.psm1) -Force try { # Indicates if current project is a VB project $IsVbProject = ($project.CodeModel.Language -eq [EnvDTE.CodeModelLanguageConstants]::vsCMLanguageVB) if ($IsVbProject) { # Remove added Imports for VB project $VbImports | ForEach-Object { if ($project.Object.Imports -contains $_) { $project.Object.Imports.Remove($_) } } } # Remove references Foreach ($spRef in $ReferencesToRemoveWhenUninstall) { $project.Object.References | Where-Object { $_.Identity -eq $spRef } | ForEach-Object { $_.Remove() } } } catch { Write-Host "Error uninstalling package: " + $_.Exception -ForegroundColor Red exit } # SIG # Begin signature block # MIImGgYJKoZIhvcNAQcCoIImCzCCJgcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAN/6dBHJ45hY+Y # N8R45TKbxt2wbCsKlOEE8Hxkc3JCuqCCC2cwggTvMIID16ADAgECAhMzAAAFV8+Q # 3cfRwIiMAAAAAAVXMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTAwHhcNMjMxMDE5MTk1MTEyWhcNMjQxMDE2MTk1MTEyWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCs0/kFGrFBPJjNzuVjixsArYe7PjsMayjyn3AS8PHH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nK/pABs+31Hg5ExZFUBm # dp7F3JG5kMKdiKIwDQYJKoZIhvcNAQELBQAEggIAigsngjbFjK6c3OsFYJ+cuo85 # GhNcddh0nwRKBlYhR2EJ14JDtCVWlaua+JgXnSyS9Wq0cdy4oijXVDOuZ7dC80YB # nQFZdDcP8C0qpNDPy4B5dE+VmEhGWYnqVM0aQfIa5ERu6fW2LAJJvJaQSubVdtoR # gpCNAlsMTt7ayL00AglFUIiLBefRxf65sHon39BKTKBPv71papZGqd/16mJvQo5O # jM8XMxR9SxfxmICP+FxaZJad/f7NSIhxGlO6dk+/e604ZUX+aZDq07Y25aW8Sjrd # XvkgRr493TXBWnryh8k3TmjjvD4iBfusX8+RbM5M+TMd6VImVIe4NFUbkVfFW+cP # hkdpz5z7hETF5m2iPRS45gHoVK3uO9I13mJhdl77I+8e/O+WBAtgxZC6JS53NAhk # rjU5B0P/9ggsmNVp7Y+QB7WnG+LdFHozxDdWTVi7maNyFzYqyeVfeijxb6FK3rA9 # FETXaMumaY7UR9zZOjjUpr+P1Frcaig6sEliQaqMhQKzpeoD6uSmKF9+g/CeDuME # +CgqUn2HD6GO8VTJ9tNszsi7XnVBM/it0y3oVAtcHuFp2ZG8hBau3M6EjK7I6Jpx # sfTVThD6TPb51Ruy98EvqnVqJqlUeAelWbOtulIr0id3HeA3dzfAmSp3uusNiJhn # 0RVeiftZl6MF16onrhU= # SIG # End signature block
0
sample_11_88.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_MpPreference.cdxml', 'MSFT_MpThreat.cdxml', 'MSFT_MpThreatCatalog.cdxml', 'MSFT_MpThreatDetection.cdxml', 'MSFT_MpScan.cdxml', 'MSFT_MpSignature.cdxml', 'MSFT_MpWDOScan.cdxml', 'MSFT_MpRollback.cdxml' ) FunctionsToExport = @( 'Get-MpPreference', 'Set-MpPreference', 'Add-MpPreference', 'Remove-MpPreference', 'Get-MpComputerStatus', 'Get-MpThreat', 'Get-MpThreatCatalog', 'Get-MpThreatDetection', 'Start-MpScan', 'Update-MpSignature', 'Remove-MpThreat', 'Start-MpWDOScan', 'Start-MpRollback' ) HelpInfoUri="http://go.microsoft.com/fwlink/?linkid=390762" PowerShellVersion = '3.0' } # SIG # Begin signature block # MIImEAYJKoZIhvcNAQcCoIImATCCJf0CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAKi/54AHWcDKN7 # MMgzW+Je4GnjudtlwpnXzX+Iejz1QKCCC2IwggTvMIID16ADAgECAhMzAAAK69Nl # RIMWPjjtAAAAAArrMA0GCSqGSIb3DQEBCwUAMHkxCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xIzAhBgNVBAMTGk1pY3Jvc29mdCBXaW5kb3dzIFBD # QSAyMDEwMB4XDTIzMTAxOTE5MTgwMloXDTI0MTAxNjE5MTgwMlowcDELMAkGA1UE # BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc # BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEaMBgGA1UEAxMRTWljcm9zb2Z0 # IFdpbmRvd3MwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfg+TEc3bT # Vvq+rfw2TA/Aluhr9MvjyW4v2sVY1+wdq98kJogwk5wRwMEPNKacaRJn02l8VCT5 # eblNMpXt3iD7AcYN+cSnvC4rBDCNKAJAf1ND9AYU9k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0BAQsFAASCAgCS7DCn9ZBzi9yF3F3OOWcyNiEea/whW/woVTa2 # HvCPmX6A51f6aZMoInvmgGG3mmUhFzIco7Egu6BDHgZ2WYO7vcg+AID/FRO7OU1A # 2XllIwtptaRQyaVWVHAj2FhsLdrCSZbrkR3I87xB2eWs7esZHgAFiWIoNdIClBJJ # UuUqnPFyOv0xlWM+47e7CvOf1C4xvJcYkfE9643uw+unOHgrdKOWIchi4zAwp7Xe # +LlIGIE+QQ+GVvfmuRs5Vh1AcElhPfsOX7ISSUpJnrXxyV6r25gsiU/vvxJslfFC # Kc26pGCLDnKoB7qdawyg2VKLU+tU74qDh0OahLNl8mGg96w4H9h1NGQFl+qbOuhx # Dcon6PC/DiJlInlTxXNQpQT8PtAchvqYqn908z4MVdnYD5RFMr4TFswlH70GQ4du # ZAYti2AvdCRfu8DkkQPN98paiTNKn0nKvqHD6h1Ru8zojLINT3DUi89vo6l48piY # SfLiyooN8eNw3xRhT+bFczb3zfsoaxXwa3j3h7kO9ZmVwRkUL1Y96SSj/WQn8P8V # few902Y8igWDrQNuJCzIbomUkIGZfv3Dhr3TZWmZfqi7ElBo3qVeDDuAdxI1bxjl # bFim+5uITQk5Dn9iTRQYplWPd9bjWAfM0KukN1/hNhuzCCjS36Biurcbi97DBQz9 # ehOXyQ== # SIG # End signature block
0
789.ps1
function Set-ScriptExtent { [CmdletBinding(PositionalBinding=$false, DefaultParameterSetName='__AllParameterSets')] param( [Parameter(Position=0, Mandatory)] [psobject] $Text, [Parameter(Mandatory, ParameterSetName='AsString')] [switch] $AsString, [Parameter(Mandatory, ParameterSetName='AsArray')] [switch] $AsArray, [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [System.Management.Automation.Language.IScriptExtent] $Extent = (Find-Ast -AtCursor).Extent ) begin { $fileContext = $psEditor.GetEditorContext().CurrentFile $extentList = New-Object System.Collections.Generic.List[Microsoft.PowerShell.EditorServices.FullScriptExtent] } process { if ($Extent -isnot [Microsoft.PowerShell.EditorServices.FullScriptExtent]) { $Extent = New-Object Microsoft.PowerShell.EditorServices.FullScriptExtent @( $fileContext, $Extent.StartOffset, $Extent.EndOffset) } $extentList.Add($Extent) } end { switch ($PSCmdlet.ParameterSetName) { AsString { $Text = "'{0}'" -f $Text.Replace("'", "''") } AsArray { $newLine = [Environment]::NewLine $Text = "'" + ($Text.Replace("'", "''") -split '\r?\n' -join "',$newLine'") + "'" if ($Text.Split("`n", [StringSplitOptions]::RemoveEmptyEntries).Count -gt 1) { $needsIndentFix = $true } } } foreach ($aExtent in $extentList) { $aText = $Text if ($needsIndentFix) { $indentOffset = ' ' * ($aExtent.StartColumnNumber - 1) $aText = $aText -split '\r?\n' ` -join ([Environment]::NewLine + $indentOffset) } $differenceOffset = $aText.Length - $aExtent.Text.Length $scriptText = $fileContext.GetText() $fileContext.InsertText($aText, $aExtent.BufferRange) $newText = $scriptText.Remove($aExtent.StartOffset, $aExtent.Text.Length).Insert($aExtent.StartOffset, $aText) $timeoutLoop = 0 while ($fileContext.GetText() -ne $newText) { Start-Sleep -Milliseconds 30 $timeoutLoop++ if ($timeoutLoop -gt 20) { $PSCmdlet.WriteDebug(('Timed out waiting for change at range {0}, {1}' -f $aExtent.StartOffset, $aExtent.EndOffset)) break } } if ($differenceOffset) { $extentList.ForEach({ if ($args[0].StartOffset -ge $aExtent.EndOffset) { $args[0].AddOffset($differenceOffset) } }) } } } }
0
2204.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed.")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SiteServer, [parameter(Mandatory=$true, HelpMessage="Value for the Service Manager target server.")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SMDefaultComputer, [parameter(Mandatory=$false, HelpMessage="Set a prefix used for filtering Maintenance Windows device collections.")] [ValidateNotNullOrEmpty()] [string]$MaintenanceWindowNamePrefix = "MWS -", [parameter(Mandatory=$false, HelpMessage="Show a progressbar displaying the current operation.")] [switch]$ShowProgress ) Begin { try { Write-Verbose -Message "Determining Site Code for Site server: '$($SiteServer)'" $SiteCodeObjects = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction Stop foreach ($SiteCodeObject in $SiteCodeObjects) { if ($SiteCodeObject.ProviderForLocalSite -eq $true) { $SiteCode = $SiteCodeObject.SiteCode Write-Verbose -Message "Site Code: $($SiteCode)" } } } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { Write-Warning -Message "Unable to determine Site Code" ; break } try { $SiteDrive = $SiteCode + ":" Import-Module -Name ConfigurationManager -ErrorAction Stop -Verbose:$false } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { try { Import-Module -Name (Join-Path -Path (($env:SMS_ADMIN_UI_PATH).Substring(0,$env:SMS_ADMIN_UI_PATH.Length-5)) -ChildPath "\ConfigurationManager.psd1") -Force -ErrorAction Stop -Verbose:$false if ((Get-PSDrive -Name $SiteCode -ErrorAction SilentlyContinue | Measure-Object).Count -ne 1) { New-PSDrive -Name $SiteCode -PSProvider "AdminUI.PS.Provider\CMSite" -Root $SiteServer -ErrorAction Stop -Verbose:$false | Out-Null } } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } } try { Import-Module -Name SMLets -ErrorAction Stop -Verbose:$false } catch [System.UnauthorizedAccessException] { Write-Warning -Message "Access denied" ; break } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } $CurrentLocation = $PSScriptRoot } Process { function Write-EventLogEntry { param( [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$LogName, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$Source, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [int]$EventID, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [ValidateSet("Information","Warning","Error")] [string]$EntryType, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$Message ) if ([System.Diagnostics.EventLog]::Exists($LogName) -eq $false) { try { New-EventLog -LogName $LogName -Source $Source -ErrorAction Stop -Verbose:$false | Out-Null } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } } try { Write-EventLog -LogName $LogName -Source $Source -EntryType $EntryType -EventId $EventID -Message $Message -ErrorAction Stop } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } } function New-DirectMembershipRule { param( [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$RuleName, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$ResourceID ) $DirectMembershipRuleInstance = ([WmiClass]"\\$($SiteServer)\root\SMS\site_$($SiteCode):SMS_CollectionRuleDirect").CreateInstance() $DirectMembershipRuleInstance.ResourceClassName = "SMS_R_System" $DirectMembershipRuleInstance.ResourceID = $ResourceID $DirectMembershipRuleInstance.RuleName = $RuleName return $DirectMembershipRuleInstance } if ($PSBoundParameters["ShowProgress"]) { $ProgressCount = 0 } Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1000 -EntryType Information -Message "Initialize processing of server maintenance window memberships." try { $MaintenanceWindowCollectionList = New-Object -TypeName System.Collections.ArrayList $MaintenanceWindowCollections = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_Collection -ComputerName $SiteServer -Filter "Name like '$($MaintenanceWindowNamePrefix)%'" -ErrorAction Stop | Select-Object -Property Name, CollectionID if ($MaintenanceWindowCollections -ne $null) { $MaintenanceWindowCollectionList.AddRange(@($MaintenanceWindowCollections)) } else { Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1001 -EntryType Warning -Message "Query for Maintenance Windows collections returned no results, aborting current operation." } } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } if ($MaintenanceWindowCollectionList -ne $null) { try { $SCSMClass = Get-SCSMClass -Name Cireson.AssetManagement.HardwareAsset -ErrorAction Stop -Verbose:$false } catch [System.Exception] { Write-Warning -Message "$($_.Exception.Message). Line: $($_.InvocationInfo.ScriptLineNumber)" ; break } $MaintenanceWindowsCount = ($MaintenanceWindowCollectionList | Measure-Object).Count foreach ($MaintenanceWindowCollection in $MaintenanceWindowCollectionList) { $StartTime = (Get-Date) Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1002 -EntryType Information -Message "Processing current Maintenance Window collection: $($MaintenanceWindowCollection.Name)" if ($PSBoundParameters["ShowProgress"]) { $ProgressCount++ Write-Progress -Activity "Processing Maintenance Window collections" -Id 1 -Status "$($ProgressCount) / $($MaintenanceWindowsCount)" -PercentComplete (($ProgressCount / $MaintenanceWindowsCount) * 100) } $ServiceWindowID = Get-SCSMEnumeration -ErrorAction Stop -Verbose:$false | Where-Object { $_.DisplayName -eq $MaintenanceWindowCollection.Name } | Select-Object -ExpandProperty ID if ($ServiceWindowID -ne $null) { $SCSMServers = Get-SCSMObject -Class $SCSMClass -Filter "ServiceWindow -eq $($ServiceWindowID)" | Select-Object -ExpandProperty DisplayName $ConfigMgrServers = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_FullCollectionMembership -ComputerName $SiteServer -Filter "CollectionID like '$($MaintenanceWindowCollection.CollectionID)'" | Select-Object -ExpandProperty Name if ($SCSMServers -ne $null) { $ComparedResults = Compare-Object -ReferenceObject $SCSMServers -DifferenceObject $ConfigMgrServers if (($ComparedResults | Measure-Object).Count -ge 1) { $AddToMaintenanceWindow = $ComparedResults | Where-Object { $_.SideIndicator -like "<=" } | Select-Object -ExpandProperty InputObject $RemoveFromMaintenanceWindow = $ComparedResults | Where-Object { $_.SideIndicator -like "=>" } | Select-Object -ExpandProperty InputObject try { $CurrentMaintenanceWindowCollection = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_Collection -ComputerName $SiteServer -Filter "Name like '$($MaintenanceWindowCollection.Name)'" $CurrentMaintenanceWindowCollection.Get() } catch [System.Exception] { Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1003 -EntryType Warning -Message "Server '$($SCSMServer.DisplayName)' was not found in Configuration Manager, will not attemp to add resource to Maintenance Window collection." } if ($AddToMaintenanceWindow -ne $null) { $DirectMembershipRulesList = New-Object -TypeName System.Collections.ArrayList $DirectMembershipRulesList.AddRange(@($CurrentMaintenanceWindowCollection.CollectionRules)) foreach ($SCSMServer in $AddToMaintenanceWindow) { try { $DeviceResourceID = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_R_System -ComputerName $SiteServer -Filter "Name like '$($SCSMServer)'" -ErrorAction Stop | Select-Object -ExpandProperty ResourceID $DirectMembershipRulesList.Add((New-DirectMembershipRule -RuleName $SCSMServer -ResourceID $DeviceResourceID)) | Out-Null } catch [System.Exception] { Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1004 -EntryType Warning -Message "Server '$($SCSMServer.DisplayName)' was not found in Configuration Manager, will not attemp to add resource to Maintenance Window collection." } } $CurrentMaintenanceWindowCollection.CollectionRules = $DirectMembershipRulesList $CurrentMaintenanceWindowCollection.Put() | Out-Null Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1005 -EntryType Information -Message "Successfully populated Maintenance Window '$($MaintenanceWindowCollection.Name)' with $(($AddToMaintenanceWindow | Measure-Object).Count) servers sourced from Service Manager." } if ($RemoveFromMaintenanceWindow -ne $null) { $DirectMembershipRulesList = New-Object -TypeName System.Collections.ArrayList $DirectMembershipRulesList.AddRange(@($CurrentMaintenanceWindowCollection.CollectionRules)) foreach ($SCSMServer in $RemoveFromMaintenanceWindow) { if ($SCSMServer -in $DirectMembershipRulesList.RuleName) { $DirectMembershipRulesList.RemoveAt($DirectMembershipRulesList.RuleName.IndexOf($SCSMServer)) } } $CurrentMaintenanceWindowCollection.CollectionRules = $DirectMembershipRulesList $CurrentMaintenanceWindowCollection.Put() | Out-Null Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1006 -EntryType Information -Message "Successfully removed $(($RemoveFromMaintenanceWindow | Measure-Object).Count) servers from Maintenance Window '$($MaintenanceWindowCollection.Name)'." } $CurrentMaintenanceWindowCollection.RequestRefresh() | Out-Null } else { Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1007 -EntryType Information -Message "Current Maintenance Window collection '$($MaintenanceWindowCollection.Name)' does not have any changes." } } } $ExecutionTime = (Get-Date) - $StartTime Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1008 -EntryType Information -Message "Finished processing current Maintenance Window collection: $($MaintenanceWindowCollection.Name). Operation took $($ExecutionTime.Minutes) min $($ExecutionTime.Seconds) sec." } } } End { Write-EventLogEntry -LogName "ConfigMgr Maintenance Windows" -Source "Maintenance Window Populator" -EventID 1009 -EntryType Information -Message "Successfully processed server maintenance window collection memberships." Set-Location -Path $CurrentLocation }
0
sample_41_81.ps1
. "$PSScriptRoot/../project/api.ps1" . "$PSScriptRoot/../php/api.ps1" . "$PSScriptRoot/../database/helpers.ps1" . "$PSScriptRoot/helpers.ps1" function Php-Console { param ( $Command, $php=(Get-Php) ) Set-Location (Get-Project-Root) return & $php "-d" 'auto_prepend_file=""' "-d" "allow_url_include=0" "console" "${Command}" } function RebuildCache { param ( $php=(Get-Php) ) Php-Console -php $php -Command "system:cache:refresh" } function CleanCache { param ( $php=(Get-Php) ) $projectRoot = Get-Project-Root Remove-Item "$projectRoot/Public/Cache/*" -Recurse -Force Remove-Item "$projectRoot/Cache/*" -Recurse -Force } function Delete-Files-After-Upgrade { $projectRoot = Get-Project-Root Set-Location $projectRoot $entitiesDeletedDiffFile = Join-Path -Path $projectRoot -ChildPath "entitiesDeleted.diff" if ($IsLinux) { $environmentFile = Join-Path -Path $projectRoot -ChildPath "fileDeletion.sh" if ((Test-Path -Path $entitiesDeletedDiffFile) -and (Test-Path -Path $environmentFile)) { & echo "Y" | sh $environmentFile if (Test-Path -Path $entitiesDeletedDiffFile) { Remove-Item -Path $entitiesDeletedDiffFile -Force } } } else { $environmentFile = Join-Path -Path $projectRoot -ChildPath "fileDeletion.bat" if ((Test-Path -Path $entitiesDeletedDiffFile) -and (Test-Path -Path $environmentFile)) { & $environmentFile "q" if (-Not ($LastExitCode -eq 0)) { throw "Please check logs" } if (Test-Path -Path $entitiesDeletedDiffFile) { Remove-Item -Path $entitiesDeletedDiffFile -Force } } } }
0
2459.ps1
function Show-Menu { param ( [string]$Title = 'My Menu' ) Clear-Host Write-Host "================ $Title ================" Write-Host "1: Press '1' for this option." Write-Host "2: Press '2' for this option." Write-Host "3: Press '3' for this option." Write-Host "Q: Press 'Q' to quit." } do { Show-Menu $selection = Read-Host "Please make a selection" Clear-Host switch ($selection) { '1' { 'You chose option } '2' { 'You chose option } '3' { 'You chose option } 'q' { return } } pause } until ($selection -eq 'q')
0
chkhash_14.ps1
# calculate SHA512 of file. function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider]; $hashAlgorithm = new-object $cryptoServiceProvider $stream = $file.OpenRead(); $hashByteArray = $hashAlgorithm.ComputeHash($stream); $stream.Close(); ## We have to be sure that we close the file stream if any exceptions are thrown. trap { if ($stream -ne $null) { $stream.Close(); } break; } foreach ($byte in $hashByteArray) { if ($byte -lt 16) {$result += “0{0:X}” -f $byte } else { $result += “{0:X}” -f $byte }} return [string]$result; } function noequal ( $first, $second) { if (!($second) -or $second -eq "") {return $true} $first=join-path $first "\\" foreach($s in $second) { if ($first.tolower().startswith($s.tolower())) {return $false} } return $true } # chkhash.ps1 [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #3] [-u] [-h [path of .xml database]] # -u updates the XML file database and exits # otherwise, all files are checked against the XML file database. # -h specifies location of xml hash database $hashespath=".\\hashes.xml" del variable:\\args3 -ea 0 del variable:\\args2 -ea 0 del variable:\\xfiles -ea 0 del variable:\\files -ea 0 del variable:\\exclude -ea 0 $args3=@() $args2=@($args) $nu = 0 $errs = 0 $fc = 0 $fm = 0 $upd = $false $create = $false for($i=0;$i -lt $args2.count; $i++) { if ($args2[$i] -like "-h*") # -help specified? { "Usage: .\\chkhash.ps1 [-h] [-u] [-c] [-x <file path of hashes .xml database>] [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #n] [-e <Dirs>]" "Options: -h - Help display." " -c - Create hash database. If .xml hash database does not exist, -c will be assumed." " -u - Update changed files and add new files to existing database." " -x - specifies .xml database file path to use. Default is .\\hashes.xml" " -e - exclude dirs. Put this after the files/dirs you want to check with SHA512 and needs to be fullpath (e.g. c:\\users\\bob not ..\\bob)." "" "Examples: PS>.\\chkhash.ps1 c:\\ d:\\ -c -x c:\\users\\bob\\hashes\\hashes.xml" " PS>.\\chkhash.ps1 c:\\users\\alice\\pictures\\sunset.jpg -u -x c:\\users\\alice\\hashes\\pictureshashes.xml" " PS>.\\chkhash.ps1 c:\\users\\eve\\documents d:\\media\\movies -x c:\\users\\eve\\hashes\\private.xml" " PS>.\\chkhash.ps1 c:\\users\\eve -x c:\\users\\eve\\hashes\\private.xml -e c:\\users\\eve\\hashes" "" "Note: files in subdirectories of any specified directory are automatically processed." " if you specify only an -x option, or no option and .\\hash.xml exists, only files in the database will be checked." exit } if ($args2[$i] -like "-u*") {$upd=$true;continue} # Update and Add new files to database? if ($args2[$i] -like "-c*") {$create=$true;continue} # Create database specified? if ($args2[$i] -like "-x*") { $i++ # Get hashes xml database path if ($i -ge $args2.count) { write-host "-X specified but no file path of .xml database specified. Exiting." exit } $hashespath=$args2[$i] continue } if ($args2[$i] -like "-e*") # Exclude files, dirs { while (($i+1) -lt $args2.count) { $i++ if ($args2[$i] -like "-*") {break} $exclude+=@(join-path $args2[$i] "\\") # collect array of excluded directories. } continue } $args3+=@($args2[$i]) # Add files/dirs } "ChkHash.ps1 - .\\chkhash.ps1 -h for usage." "" if ($args3.count -ne 0) { # Get list of files and SHA512 hash them. "Enumerating files from specified locations..." $files=@(dir $args3 -recurse -ea 0 | ?{$_.mode -notmatch "d"} | ?{noequal $_.directoryname $exclude}) # Get list of files if ($files.count -eq 0) {"No files found. Exiting."; exit} if ($create -eq $true -or !(test-path $hashespath)) # Create database? { # Create SHA512 hashes of files and write to new database $files = $files | %{write-host "SHA-512 Hashing `"$($_.fullname)`" ...";add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru} $files |export-clixml $hashespath "Created $hashespath" "$($files.count) file hash(es) saved. Exiting." exit } $xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database } else { if (!(test-path $hashespath)) {"No database found or specified, exiting."; exit} $xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database and check it if ($xfiles.count -eq 0) {"No files specified and no files in Database. Exiting.";Exit} $files=$xfiles } "Loaded $($xfiles.count) file hash(es) from $hashespath" $hash=@{} for($x=0;$x -lt $xfiles.count; $x++) # Build dictionary (hash) of filenames and indexes into file array { if ($hash.contains($xfiles[$x].fullname)) {continue} $hash.Add($xfiles[$x].fullname,$x) } foreach($f in $files) { if ((get-item -ea 0 $f.fullname) -eq $null) {continue} # skip if file no longer exists. $n=($hash.($f.fullname)) if ($n -eq $null) { $nu++ # increment needs/needed updating count if ($upd -eq $false) {"Needs to be added: `"$($f.fullname)`"";continue} # if not updating, then continue "SHA-512 Hashing `"$($f.fullname)`" ..." # Create SHA512 hash of file $f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force} $xfiles+=@($f) # then add file + hash to list continue } $f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force} $fc++ # File checked increment. if ($xfiles[$n].SHA512 -eq $f.SHA512) # Check SHA512 for mixmatch. {$fm++;continue} # if matched, increment file matches and continue loop $errs++ # increment mixmatches if ($upd -eq $true) { $xfiles[$n]=$f; "Updated `"$($f.fullname)`"";continue} "Bad SHA-512 found: `"$($f.fullname)`"" } if ($upd -eq $true) # if database updated { $xfiles|export-clixml $hashespath # write xml database "Updated $hashespath" "$nu file hash(es) added to database." "$errs file hash(es) updated in database." exit } "$errs SHA-512 mixmatch(es) found." "$fm file(s) SHA512 matched." "$fc file(s) checked total." if ($nu -ne 0) {"$nu file(s) need to be added [run with -u option to Add file hashes to database]."}
0
3914.ps1
function Test-ListMarketplaces { $marketplaces = Get-AzConsumptionMarketplace -Top 10 Assert-NotNull $marketplaces Assert-AreEqual 10 $marketplaces.Count Foreach($mkp in $marketplaces) { Assert-NotNull $mkp.BillingPeriodId Assert-NotNull $mkp.ConsumedQuantity Assert-NotNull $mkp.Currency Assert-NotNull $mkp.Id Assert-NotNull $mkp.InstanceId Assert-NotNull $mkp.InstanceName Assert-NotNull $mkp.IsEstimated Assert-NotNull $mkp.Name Assert-NotNull $mkp.OrderNumber Assert-NotNull $mkp.PretaxCost Assert-NotNull $mkp.ResourceRate Assert-NotNull $mkp.SubscriptionGuid Assert-NotNull $mkp.Type Assert-NotNull $mkp.UsageEnd Assert-NotNull $mkp.UsageStart } } function Test-ListMarketplacesWithDateFilter { $marketplaces = Get-AzConsumptionMarketplace -StartDate 2018-01-03 -EndDate 2018-01-20 -Top 10 Assert-NotNull $marketplaces Assert-AreEqual 10 $marketplaces.Count Foreach($mkp in $marketplaces) { Assert-NotNull $mkp.BillingPeriodId Assert-NotNull $mkp.ConsumedQuantity Assert-NotNull $mkp.Currency Assert-NotNull $mkp.Id Assert-NotNull $mkp.InstanceId Assert-NotNull $mkp.InstanceName Assert-NotNull $mkp.IsEstimated Assert-NotNull $mkp.Name Assert-NotNull $mkp.OrderNumber Assert-NotNull $mkp.PretaxCost Assert-NotNull $mkp.ResourceRate Assert-NotNull $mkp.SubscriptionGuid Assert-NotNull $mkp.Type Assert-NotNull $mkp.UsageEnd Assert-NotNull $mkp.UsageStart } } function Test-ListBillingPeriodMarketplaces { $marketplaces = Get-AzConsumptionMarketplace -BillingPeriodName 201801-1 -Top 10 Assert-NotNull $marketplaces Assert-AreEqual 10 $marketplaces.Count Foreach($mkp in $marketplaces) { Assert-NotNull $mkp.BillingPeriodId Assert-NotNull $mkp.ConsumedQuantity Assert-NotNull $mkp.Currency Assert-NotNull $mkp.Id Assert-NotNull $mkp.InstanceId Assert-NotNull $mkp.InstanceName Assert-NotNull $mkp.IsEstimated Assert-NotNull $mkp.Name Assert-NotNull $mkp.OrderNumber Assert-NotNull $mkp.PretaxCost Assert-NotNull $mkp.ResourceRate Assert-NotNull $mkp.SubscriptionGuid Assert-NotNull $mkp.Type Assert-NotNull $mkp.UsageEnd Assert-NotNull $mkp.UsageStart } } function Test-ListMarketplacesWithFilterOnInstanceName { $marketplaces = Get-AzConsumptionMarketplace -InstanceName TestVM -Top 10 Assert-NotNull $marketplaces Assert-AreEqual 10 $marketplaces.Count Foreach($mkp in $marketplaces) { Assert-NotNull $mkp.BillingPeriodId Assert-NotNull $mkp.ConsumedQuantity Assert-NotNull $mkp.Currency Assert-NotNull $mkp.Id Assert-NotNull $mkp.InstanceId Assert-NotNull $mkp.InstanceName Assert-NotNull $mkp.IsEstimated Assert-NotNull $mkp.Name Assert-NotNull $mkp.OrderNumber Assert-NotNull $mkp.PretaxCost Assert-NotNull $mkp.ResourceRate Assert-NotNull $mkp.SubscriptionGuid Assert-NotNull $mkp.Type Assert-NotNull $mkp.UsageEnd Assert-NotNull $mkp.UsageStart } }
0
sample_10_5.ps1
ConvertFrom-StringData @' id_fileacl=Determining file ACL's '@ # SIG # Begin signature block # MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA6VsPfmmzM00am # qvD0ITk80rX9ws5syszNTdA990uVuqCCDYUwggYDMIID66ADAgECAhMzAAAEA73V # lV0POxitAAAAAAQDMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTEzWhcNMjUwOTExMjAxMTEzWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCfdGddwIOnbRYUyg03O3iz19XXZPmuhEmW/5uyEN+8mgxl+HJGeLGBR8YButGV # LVK38RxcVcPYyFGQXcKcxgih4w4y4zJi3GvawLYHlsNExQwz+v0jgY/aejBS2EJY # oUhLVE+UzRihV8ooxoftsmKLb2xb7BoFS6UAo3Zz4afnOdqI7FGoi7g4vx/0MIdi # kwTn5N56TdIv3mwfkZCFmrsKpN0zR8HD8WYsvH3xKkG7u/xdqmhP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Gc+cDbY9UsRPwSfP36kOvxOT38/8N4AaF2P8NG/Q3O5h/YhPTl97OqSvM # dIdM8AkGsOJhRBZxKWsSHyWanWQcTSWDrJrAD+eI7drK/Oy7Kn1HII+6JY2hFWPj # eYf/EaMSuJHq+8vjtmbRQa4tnOVJDQXtjuHYy1Svkw1sEO7UhcD5HSs0p+FWukGP # ltVkZTc0nnFtyE/61ZuxM8IM0EEw1vlZi4weKrMusVXATevrf5LBwPG5EmrjF8Is # Nkzx/80= # SIG # End signature block
0
sample_53_81.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Removes an EventHub Authorization Rule .Description Removes an EventHub Authorization Rule #> function Remove-AzEventHubAuthorizationRule{ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'RemoveExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'RemoveExpandedEntity', HelpMessage = "The name of the Authorization Rule")] [Parameter(ParameterSetName = 'RemoveExpandedNamespace', HelpMessage = "The name of the Authorization Rule")] [Alias('AuthorizationRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The name of the Authorization Rule. ${Name}, [Parameter(ParameterSetName = 'RemoveExpandedEntity', Mandatory, HelpMessage = "The name of the EventHub entity.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The name of the EventHub entity. ${EventHubName}, [Parameter(ParameterSetName = 'RemoveExpandedNamespace', Mandatory, HelpMessage = "The name of EventHub namespace")] [Parameter(ParameterSetName = 'RemoveExpandedEntity', Mandatory, HelpMessage = "The name of EventHub namespace")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The name of EventHub namespace ${NamespaceName}, [Parameter(ParameterSetName = 'RemoveExpandedNamespace', Mandatory, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Parameter(ParameterSetName = 'RemoveExpandedEntity', Mandatory, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName = 'RemoveExpandedNamespace', HelpMessage = "The ID of the target subscription.")] [Parameter(ParameterSetName = 'RemoveExpandedEntity', HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName = 'RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline, HelpMessage = "Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(HelpMessage = "Run the command as a job")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(HelpMessage = "Run the command asynchronously")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process{ try{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') if ($PSCmdlet.ParameterSetName -eq 'RemoveExpandedNamespace'){ if ($PSCmdlet.ShouldProcess("EventHub Namespace Authorization Rule $($Name)", "Deleting")) { Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_Delete @PSBoundParameters } } elseif ($PSCmdlet.ParameterSetName -eq 'RemoveExpandedEntity'){ if ($PSCmdlet.ShouldProcess("EventHub Entity Authorization Rule $($Name)", "Deleting")) { Az.EventHub.private\Remove-AzEventHubAuthorizationRule_Delete @PSBoundParameters } } elseif ($PSCmdlet.ParameterSetName -eq 'RemoveViaIdentityExpanded'){ if($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } else{ $ResourceHashTable = ParseResourceId -ResourceId $InputObject } if ($ResourceHashTable['EventHubName'] -ne $null){ if ($PSCmdlet.ShouldProcess("EventHub Entity Authorization Rule $($ResourceHashTable['AuthorizationRuleName'])", "Deleting")) { Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentity @PSBoundParameters } } elseif ($ResourceHashTable['NamespaceName'] -ne $null){ if ($PSCmdlet.ShouldProcess("EventHub Namespace Authorization Rule $($ResourceHashTable['AuthorizationRuleName'])", "Deleting")) { Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentity @PSBoundParameters } } else{ throw 'Invalid -InputObject' } } } catch{ throw } } } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC+pQMHzpw79YZK # NMumPj0cnQmsySNgFu5Fv0mNac0NraCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUz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LjYlrC+N # MStDnvvq9t3ZftyEp+vEWM8hR0IYEccXXyWLLMcWPaopUiU+8Evp4edqE6FbnDHR # UJvqvFgsaf0V46NMhrxgqkxaz6M4yQ5asnrxmL0NVSGMFP/eKubqte/BQj6bZE5j # g33n0E5++WchPIxSlH0E9A5Oj7ig7t3BMDMAmp41GIjGWfEkok5e+sdCs/srpQsO # lg87iLZ+py6qrJqC8NlI0zKjAE5pezKRF25n1SSRlZS4RdgFbC94Tg0AIw0d6bVu # Gi9o8FHoKDaI5tN5nytE6FvZnkucfHNTJWlh+JLy0iBZGCYqv9D+/KYNAg5ckhBc # 9KYzc7BLehJIz7Rot1NmueYfdf8/HdGKNYCb9AU3LQbpfkEwbARmwO1mx2UgHmig # 6VbXyLMGNV+HsdIaDN+asR/i11zcl3jonTENxyLiagIrSafDG2ve6/gNoykJAihb # UeT6kiLFVBn2XQRfFt8MYeboiAFXHmZeqohQtdCC94L9/3S2CHADawuBtICuu0j0 # DkSvWrGYkijElJkan0ZE9syGEm/6Q/ZYk1LhVpL1VIYjKT6TStVV6g/0Wj91HD6P # S5a0/qANATkDZzQIegQ= # SIG # End signature block
0
sample_51_89.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Updates the alert rule. .Description Updates the alert rule. .Link https://learn.microsoft.com/powershell/module/az.securityinsights/Update-azsentinelalertrule #> function Update-AzSentinelAlertRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.AlertRule])] [CmdletBinding(DefaultParameterSetName = 'UpdateScheduled', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'UpdateFusionMLTI')] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Gets subscription credentials which uniquely identify Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName = 'UpdateFusionMLTI', Mandatory)] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation', Mandatory)] [Parameter(ParameterSetName = 'UpdateNRT', Mandatory)] [Parameter(ParameterSetName = 'UpdateScheduled', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Path')] [System.String] # The Resource Group Name. ${ResourceGroupName}, [Parameter(ParameterSetName = 'UpdateFusionMLTI', Mandatory)] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation', Mandatory)] [Parameter(ParameterSetName = 'UpdateNRT', Mandatory)] [Parameter(ParameterSetName = 'UpdateScheduled', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Path')] [System.String] # The name of the workspace. ${WorkspaceName}, [Parameter(ParameterSetName = 'UpdateFusionMLTI', Mandatory)] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation', Mandatory)] [Parameter(ParameterSetName = 'UpdateNRT', Mandatory)] [Parameter(ParameterSetName = 'UpdateScheduled', Mandatory)] #[Alias('RuleId')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Path')] [System.String] # The name of Operational Insights Resource Provider. ${RuleId}, [Parameter(ParameterSetName = 'UpdateViaIdentityFusionMLTI', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.ISecurityInsightsIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName = 'UpdateFusionMLTI', Mandatory)] [Parameter(ParameterSetName = 'UpdateViaIdentityFusionMLTI', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${FusionMLorTI}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation', Mandatory)] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${MicrosoftSecurityIncidentCreation}, [Parameter(ParameterSetName = 'UpdateNRT', Mandatory)] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${NRT}, [Parameter(ParameterSetName = 'UpdateScheduled', Mandatory)] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${Scheduled}, [Parameter(ParameterSetName = 'UpdateFusionMLTI')] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityFusionMLTI')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${AlertRuleTemplateName}, [Parameter(ParameterSetName = 'UpdateFusionMLTI')] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityFusionMLTI')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${Enabled}, [Parameter(ParameterSetName = 'UpdateFusionMLTI')] [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityFusionMLTI')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${Disabled}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${Description}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String[]] ${DisplayNamesFilter}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String[]] ${DisplayNamesExcludeFilter}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.MicrosoftSecurityProductName])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.MicrosoftSecurityProductName] ${ProductFilter}, [Parameter(ParameterSetName = 'UpdateMicrosoftSecurityIncidentCreation')] [Parameter(ParameterSetName = 'UpdateViaIdentityMicrosoftSecurityIncidentCreation')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertSeverity[]] #High, Medium, Low, Informational ${SeveritiesFilter}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${Query}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${DisplayName}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.DefaultInfo(Script = 'New-TimeSpan -Hours 5')] [System.TimeSpan] ${SuppressionDuration}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${SuppressionEnabled}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertSeverity])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertSeverity] ${Severity}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AttackTactic])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AttackTactic] [System.String[]] ${Tactic}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${CreateIncident}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${GroupingConfigurationEnabled}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Switch] ${ReOpenClosedIncident}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.DefaultInfo(Script = 'New-TimeSpan -Hours 5')] [System.TimeSpan] ${LookbackDuration}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.DefaultInfo(Script = '"AllEntities"')] [ValidateSet('AllEntities', 'AnyAlert', 'Selected')] [System.String] ${MatchingMethod}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.AlertDetail[]] ${GroupByAlertDetail}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [string[]] ${GroupByCustomDetail}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EntityMappingType[]] ${GroupByEntity}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] #'Account', 'Host', 'IP', 'Malware', 'File', 'Process', 'CloudApplication', 'DNS', 'AzureResource', 'FileHash', 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', 'Mailbox', 'MailCluster', 'MailMessage', 'SubmissionMail' [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Models.Api20210901Preview.EntityMapping[]] ${EntityMapping}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${AlertDescriptionFormat}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${AlertDisplayNameFormat}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${AlertSeverityColumnName}, [Parameter(ParameterSetName = 'UpdateNRT')] [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityNRT')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.String] ${AlertTacticsColumnName}, [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.TimeSpan] ${QueryFrequency}, [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [System.TimeSpan] ${QueryPeriod}, [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.TriggerOperator])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.TriggerOperator] ${TriggerOperator}, [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [int] ${TriggerThreshold}, [Parameter(ParameterSetName = 'UpdateScheduled')] [Parameter(ParameterSetName = 'UpdateViaIdentityUpdateScheduled')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EventGroupingAggregationKind])] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Support.EventGroupingAggregationKind] ${EventGroupingSettingAggregationKind}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { try { $null = $PSBoundParameters.Remove('FusionMLorTI') $null = $PSBoundParameters.Remove('MicrosoftSecurityIncidentCreation') $null = $PSBoundParameters.Remove('NRT') $null = $PSBoundParameters.Remove('Scheduled') #Handle Get $GetPSBoundParameters = @{} if($PSBoundParameters['InputObject']){ $GetPSBoundParameters.Add('InputObject', $PSBoundParameters['InputObject']) } else { $GetPSBoundParameters.Add('ResourceGroupName', $PSBoundParameters['ResourceGroupName']) $GetPSBoundParameters.Add('WorkspaceName', $PSBoundParameters['WorkspaceName']) $GetPSBoundParameters.Add('RuleId', $PSBoundParameters['RuleId']) } $AlertRule = Az.SecurityInsights\Get-AzSentinelAlertRule @GetPSBoundParameters #Fusion if ($AlertRule.Kind -eq 'Fusion'){ If($PSBoundParameters['AlertTemplateName']){ $AlertRule.AlertRuleTemplateName = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } } #MSIC if($AlertRule.Kind -eq 'MicrosoftSecurityIncidentCreation'){ If($PSBoundParameters['AlertRuleTemplateName']){ $AlertRule.AlertRuleTemplateName = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } If($PSBoundParameters['Description']){ $AlertRule.Description = $PSBoundParameters['Description'] $null = $PSBoundParameters.Remove('Description') } If($PSBoundParameters['DisplayNamesFilter']){ $AlertRule.DisplayNamesFilter = $PSBoundParameters['DisplayNamesFilter'] $null = $PSBoundParameters.Remove('DisplayNamesFilter') } If($PSBoundParameters['DisplayNamesExcludeFilter']){ $AlertRule.DisplayNamesExcludeFilter = $PSBoundParameters['DisplayNamesExcludeFilter'] $null = $PSBoundParameters.Remove('DisplayNamesExcludeFilter') } If($PSBoundParameters['ProductFilter']){ $AlertRule.ProductFilter = $PSBoundParameters['ProductFilter'] $null = $PSBoundParameters.Remove('ProductFilter') } If($PSBoundParameters['SeveritiesFilter']){ $Parameter.SeveritiesFilter = $PSBoundParameters['SeveritiesFilter'] $null = $PSBoundParameters.Remove('SeveritiesFilter') } } #ML if ($AlertRule.Kind -eq 'MLBehaviorAnalytics'){ If($PSBoundParameters['AlertRuleTemplateName']){ $AlertRule.AlertRuleTemplateName = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } } #NRT if($AlertRule.Kind -eq 'NRT'){ If($PSBoundParameters['AlertRuleTemplateName']){ $AlertRule.Enabled = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } If($PSBoundParameters['Description']){ $AlertRule.Description = $PSBoundParameters['Description'] $null = $PSBoundParameters.Remove('Description') } If($PSBoundParameters['Query']){ $AlertRule.Query = $PSBoundParameters['Query'] $null = $PSBoundParameters.Remove('Query') } If($PSBoundParameters['DisplayName']){ $AlertRule.DisplayName = $PSBoundParameters['DisplayName'] $null = $PSBoundParameters.Remove('DisplayName') } If($PSBoundParameters['SuppressionDuration']){ $AlertRule.SuppressionDuration = $PSBoundParameters['SuppressionDuration'] $null = $PSBoundParameters.Remove('SuppressionDuration') } If($PSBoundParameters['SuppressionEnabled']){ $AlertRule.SuppressionEnabled = $true $null = $PSBoundParameters.Remove('SuppressionEnabled') } else{ $AlertRule.SuppressionEnabled = $false } If($PSBoundParameters['Severity']){ $AlertRule.Severity = $PSBoundParameters['Severity'] $null = $PSBoundParameters.Remove('Severity') } If($PSBoundParameters['Tactic']){ $AlertRule.Tactic = $PSBoundParameters['Tactic'] $null = $PSBoundParameters.Remove('Tactic') } If($PSBoundParameters['IncidentConfigurationCreateIncident']){ $AlertRule.IncidentConfigurationCreateIncident = $true $null = $PSBoundParameters.Remove('IncidentConfigurationCreateIncident') } else{ $AlertRule.IncidentConfigurationCreateIncident = $false } If($PSBoundParameters['Enabled']){ $AlertRule.GroupingConfigurationEnabled = $true $null = $PSBoundParameters.Remove('Enabled') } else{ $AlertRule.GroupingConfigurationEnabled = $false } If($PSBoundParameters['ReOpenClosedIncident']){ $AlertRule.GroupingConfigurationReOpenClosedIncident = $true $null = $PSBoundParameters.Remove('ReOpenClosedIncident') } else{ $AlertRule.GroupingConfigurationReOpenClosedIncident = $false } If($PSBoundParameters['LookbackDuration']){ $AlertRule.GroupingConfigurationLookbackDuration = $PSBoundParameters['LookbackDuration'] $null = $PSBoundParameters.Remove('LookbackDuration') } If($PSBoundParameters['MatchingMethod']){ $AlertRule.GroupingConfigurationMatchingMethod = $PSBoundParameters['MatchingMethod'] $null = $PSBoundParameters.Remove('MatchingMethod') } If($PSBoundParameters['GroupByAlertDetail']){ $AlertRule.GroupingConfigurationGroupByAlertDetail = $PSBoundParameters['GroupByAlertDetail'] $null = $PSBoundParameters.Remove('GroupByAlertDetail') } If($PSBoundParameters['GroupByCustomDetail']){ $AlertRule.GroupingConfigurationGroupByCustomDetail = $PSBoundParameters['GroupByCustomDetail'] $null = $PSBoundParameters.Remove('GroupByCustomDetail') } If($PSBoundParameters['GroupByEntity']){ $AlertRule.GroupingConfigurationGroupByEntity = $PSBoundParameters['GroupByEntity'] $null = $PSBoundParameters.Remove('GroupByEntity') } If($PSBoundParameters['EntityMapping']){ $AlertRule.EntityMapping = $PSBoundParameters['EntityMapping'] $null = $PSBoundParameters.Remove('EntityMapping') } If($PSBoundParameters['AlertDescriptionFormat']){ $AlertRule.AlertDetailOverrideAlertDescriptionFormat = $PSBoundParameters['AlertDescriptionFormat'] $null = $PSBoundParameters.Remove('AlertDescriptionFormat') } If($PSBoundParameters['AlertDisplayNameFormat']){ $AlertRule.AlertDetailOverrideAlertDisplayNameFormat = $PSBoundParameters['AlertDisplayNameFormat'] $null = $PSBoundParameters.Remove('AlertDisplayNameFormat') } If($PSBoundParameters['AlertSeverityColumnName']){ $AlertRule.AlertDetailOverrideAlertSeverityColumnName = $PSBoundParameters['AlertSeverityColumnName'] $null = $PSBoundParameters.Remove('AlertSeverityColumnName') } If($PSBoundParameters['AlertTacticsColumnName']){ $AlertRule.AlertDetailOverrideAlertTacticsColumnName = $PSBoundParameters['AlertTacticsColumnName'] $null = $PSBoundParameters.Remove('AlertTacticsColumnName') } } #Scheduled if ($AlertRule.Kind -eq 'Scheduled'){ If($PSBoundParameters['AlertRuleTemplateName']){ $AlertRule.Enabled = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } If($PSBoundParameters['Description']){ $AlertRule.Description = $PSBoundParameters['Description'] $null = $PSBoundParameters.Remove('Description') } If($PSBoundParameters['Query']){ $AlertRule.Query = $PSBoundParameters['Query'] $null = $PSBoundParameters.Remove('Query') } If($PSBoundParameters['DisplayName']){ $AlertRule.DisplayName = $PSBoundParameters['DisplayName'] $null = $PSBoundParameters.Remove('DisplayName') } If($PSBoundParameters['SuppressionDuration']){ $AlertRule.SuppressionDuration = $PSBoundParameters['SuppressionDuration'] $null = $PSBoundParameters.Remove('SuppressionDuration') } If($PSBoundParameters['SuppressionEnabled']){ $AlertRule.SuppressionEnabled = $true $null = $PSBoundParameters.Remove('SuppressionEnabled') } else{ $AlertRule.SuppressionEnabled = $false } If($PSBoundParameters['Severity']){ $AlertRule.Severity = $PSBoundParameters['Severity'] $null = $PSBoundParameters.Remove('Severity') } If($PSBoundParameters['Tactic']){ $AlertRule.Tactic = $PSBoundParameters['Tactic'] $null = $PSBoundParameters.Remove('Tactic') } If($PSBoundParameters['CreateIncident']){ $AlertRule.IncidentConfigurationCreateIncident = $true $null = $PSBoundParameters.Remove('CreateIncident') } else{ $AlertRule.IncidentConfigurationCreateIncident = $false } If($PSBoundParameters['GroupingConfigurationEnabled']){ $AlertRule.GroupingConfigurationEnabled = $true $null = $PSBoundParameters.Remove('GroupingConfigurationEnabled') } else{ $AlertRule.GroupingConfigurationEnabled = $false } If($PSBoundParameters['ReOpenClosedIncident']){ $AlertRule.GroupingConfigurationReOpenClosedIncident = $PSBoundParameters['ReOpenClosedIncident'] $null = $PSBoundParameters.Remove('ReOpenClosedIncident') } else{ $AlertRule.GroupingConfigurationReOpenClosedIncident = $false } If($PSBoundParameters['LookbackDuration']){ $AlertRule.GroupingConfigurationLookbackDuration = $PSBoundParameters['LookbackDuration'] $null = $PSBoundParameters.Remove('LookbackDuration') } If($PSBoundParameters['MatchingMethod']){ $AlertRule.GroupingConfigurationMatchingMethod = $PSBoundParameters['MatchingMethod'] $null = $PSBoundParameters.Remove('MatchingMethod') } If($PSBoundParameters['GroupByAlertDetail']){ $AlertRule.GroupingConfigurationGroupByAlertDetail = $PSBoundParameters['GroupByAlertDetail'] $null = $PSBoundParameters.Remove('GroupByAlertDetail') } If($PSBoundParameters['GroupByCustomDetail']){ $AlertRule.GroupingConfigurationGroupByCustomDetail = $PSBoundParameters['GroupByCustomDetail'] $null = $PSBoundParameters.Remove('GroupByCustomDetail') } If($PSBoundParameters['GroupByEntity']){ $AlertRule.GroupingConfigurationGroupByEntity = $PSBoundParameters['GroupByEntity'] $null = $PSBoundParameters.Remove('GroupByEntity') } If($PSBoundParameters['EntityMapping']){ $AlertRule.EntityMapping = $PSBoundParameters['EntityMapping'] $null = $PSBoundParameters.Remove('EntityMapping') } If($PSBoundParameters['AlertDescriptionFormat']){ $AlertRule.AlertDetailOverrideAlertDescriptionFormat = $PSBoundParameters['AlertDescriptionFormat'] $null = $PSBoundParameters.Remove('AlertDescriptionFormat') } If($PSBoundParameters['AlertDisplayNameFormat']){ $AlertRule.AlertDetailOverrideAlertDisplayNameFormat = $PSBoundParameters['AlertDisplayNameFormat'] $null = $PSBoundParameters.Remove('AlertDisplayNameFormat') } If($PSBoundParameters['AlertSeverityColumnName']){ $AlertRule.AlertDetailOverrideAlertSeverityColumnName = $PSBoundParameters['AlertSeverityColumnName'] $null = $PSBoundParameters.Remove('AlertSeverityColumnName') } If($PSBoundParameters['AlertTacticsColumnName']){ $AlertRule.AlertDetailOverrideAlertTacticsColumnName = $PSBoundParameters['AlertTacticsColumnName'] $null = $PSBoundParameters.Remove('AlertTacticsColumnName') } If($PSBoundParameters['QueryFrequency']){ $AlertRule.QueryFrequency = $PSBoundParameters['QueryFrequency'] $null = $PSBoundParameters.Remove('QueryFrequency') } If($PSBoundParameters['QueryPeriod']){ $AlertRule.QueryPeriod = $PSBoundParameters['QueryPeriod'] $null = $PSBoundParameters.Remove('QueryPeriod') } If($PSBoundParameters['TriggerOperator']){ $AlertRule.TriggerOperator = $PSBoundParameters['TriggerOperator'] $null = $PSBoundParameters.Remove('TriggerOperator') } If($null -ne $PSBoundParameters['TriggerThreshold']){ $AlertRule.TriggerThreshold = $PSBoundParameters['TriggerThreshold'] $null = $PSBoundParameters.Remove('TriggerThreshold') } If($PSBoundParameters['EventGroupingSettingAggregationKind']){ $AlertRule.EventGroupingSettingAggregationKind = $PSBoundParameters['EventGroupingSettingAggregationKind'] $null = $PSBoundParameters.Remove('EventGroupingSettingAggregationKind') } } #TI if ($AlertRule.Kind -eq 'ThreatIntelligence'){ If($PSBoundParameters['AlertRuleTemplateName']){ $AlertRule.AlertRuleTemplateName = $PSBoundParameters['AlertRuleTemplateName'] $null = $PSBoundParameters.Remove('AlertRuleTemplateName') } If($PSBoundParameters['Enabled']){ $AlertRule.Enabled = $true $null = $PSBoundParameters.Remove('Enabled') } if($PSBoundParameters['Disabled']) { $AlertRule.Enabled = $false $null = $PSBoundParameters.Remove('Disabled') } } $null = $PSBoundParameters.Add('AlertRule', $AlertRule) Az.SecurityInsights.internal\Update-AzSentinelAlertRule @PSBoundParameters } catch { throw } } } # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCABPsycJ7BsYY2E # kLPOfFIMTvaLzczMlBCUSLq8EWnuQ6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4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xHjAcBgNVBAoTFU1pY3Jvc29m # dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB # IDIwMTACEzMAAAHviT9WoVjMqNoAAQAAAe8wIgQgaD4TcRz6I1uvFPd/K+7zJ3KI # YTfBjg+/VoKqmjIKTMUwDQYJKoZIhvcNAQELBQAEggIAYVSS98WwqjqlSHLOiUjU # fCsT47lVuU74L6s58YE39mq7aS5J8wqvVLCHhrA3oXxB0OgvvwOP7QN5EcRIp8q8 # 3yEg7+MFNeJEMZyvTnVgfgtuOzaRm/9FtnHkWJfkNzw0Zp4GWbzWGunlWuYUavot # q2khhQG+I9is9XeybTy3Gje5dCVesCtKmK5gwIB/3dE5yUVw6ZyCrkOx0Yx6Zocz # 3UEEw8Xo6u7GXbt+Os7q3r715xeHVVpmrhkt0xa6bpX4wGRBazXjSU28wIqVAY5D # W3BeSREuM7xfIuw7cwlqE6CqP4KZXGX87lnAXlzz9IrfnZjSh6+Qxa2XkeQSRtjl # OtheEP/dmOys0OrFcZ3cRjaMzAc1GIlbEAR63G7Hzf/ab4kGiv3CFKj3XDbKDEDx # OU8kQwT8EHvJUn57V68UbrTlos3qWdzY2ont1iC6a73A5853UpQ7Poe8txp4c1LU # CT1DJqCkci0LLzTZlbMzG3Vi4Lu3J88e9/UpbeTxZEpBaMbg/hEq//+1NCcc+HaN # 0hXdxTuimOyvITIzQF5y+eQqugB0wKw87Wjfh3LwMeY6tG/jKd7NKPIkLR19SChq # NuLAsi+SGTLs4VMSz8h+uiLGCM/J85pKX4aHHTR/5MVbWN7bNEmHr6ovJvbLyxP1 # XvKeMJm6wsTn9+zUWavTfrU= # SIG # End signature block
0
sample_27_57.ps1
# # Module manifest for module 'OCI.PSModules.Opensearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opensearch.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'b54b41d9-dd21-465f-ac14-72727ada540b' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Opensearch Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '81.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Opensearch.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Backup-OCIOpensearchCluster', 'Get-OCIOpensearchCluster', 'Get-OCIOpensearchClusterBackup', 'Get-OCIOpensearchClusterBackupsList', 'Get-OCIOpensearchClustersList', 'Get-OCIOpensearchVersionsList', 'Get-OCIOpensearchWorkRequest', 'Get-OCIOpensearchWorkRequestErrorsList', 'Get-OCIOpensearchWorkRequestLogsList', 'Get-OCIOpensearchWorkRequestsList', 'Invoke-OCIOpensearchOpensearchClusterRestore', 'Invoke-OCIOpensearchResizeOpensearchClusterHorizontal', 'Invoke-OCIOpensearchResizeOpensearchClusterVertical', 'New-OCIOpensearchCluster', 'Remove-OCIOpensearchCluster', 'Remove-OCIOpensearchClusterBackup', 'Update-OCIOpensearchCluster', 'Update-OCIOpensearchClusterBackup' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Opensearch' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_62_80.ps1
function Run-AlTests ( [string] $TestSuite = $script:DefaultTestSuite, [string] $TestCodeunitsRange = "", [string] $TestProcedureRange = "", [string] $ExtensionId = "", [ValidateSet("Disabled", "Codeunit")] [string] $TestIsolation = "Codeunit", [ValidateSet('Windows','NavUserPassword','AAD')] [string] $AuthorizationType = $script:DefaultAuthorizationType, [string] $TestPage = $global:DefaultTestPage, [switch] $DisableSSLVerification, [Parameter(Mandatory=$true)] [string] $ServiceUrl, [Parameter(Mandatory=$false)] [pscredential] $Credential, [array] $DisabledTests = @(), [bool] $Detailed = $true, [ValidateSet('no','error','warning')] [string] $AzureDevOps = 'no', [bool] $SaveResultFile = $true, [string] $ResultsFilePath = "$PSScriptRoot\TestResults.xml", [ValidateSet('Disabled', 'PerRun', 'PerCodeunit', 'PerTest')] [string] $CodeCoverageTrackingType = 'Disabled', [ValidateSet('Disabled','PerCodeunit','PerTest')] [string] $ProduceCodeCoverageMap = 'Disabled', [string] $CodeCoverageOutputPath = "$PSScriptRoot\CodeCoverage", [string] $CodeCoverageExporterId = $script:DefaultCodeCoverageExporter, [switch] $CodeCoverageTrackAllSessions, [string] $CodeCoverageFilePrefix = ("TestCoverageMap_" + (get-date -Format 'yyyymmdd')), [bool] $StabilityRun ) { $testRunArguments = @{ TestSuite = $TestSuite TestCodeunitsRange = $TestCodeunitsRange TestProcedureRange = $TestProcedureRange ExtensionId = $ExtensionId TestRunnerId = (Get-TestRunnerId -TestIsolation $TestIsolation) CodeCoverageTrackingType = $CodeCoverageTrackingType ProduceCodeCoverageMap = $ProduceCodeCoverageMap CodeCoverageOutputPath = $CodeCoverageOutputPath CodeCoverageFilePrefix = $CodeCoverageFilePrefix CodeCoverageExporterId = $CodeCoverageExporterId AuthorizationType = $AuthorizationType TestPage = $TestPage DisableSSLVerification = $DisableSSLVerification ServiceUrl = $ServiceUrl Credential = $Credential DisabledTests = $DisabledTests Detailed = $Detailed StabilityRun = $StabilityRun } [array]$testRunResult = Run-AlTestsInternal @testRunArguments if($SaveResultFile) { Save-ResultsAsXUnitFile -TestRunResultObject $testRunResult -ResultsFilePath $ResultsFilePath } if($AzureDevOps -ne 'no') { Report-ErrorsInAzureDevOps -AzureDevOps $AzureDevOps -TestRunResultObject $TestRunResultObject } } function Save-ResultsAsXUnitFile ( $TestRunResultObject, [string] $ResultsFilePath ) { [xml]$XUnitDoc = New-Object System.Xml.XmlDocument $XUnitDoc.AppendChild($XUnitDoc.CreateXmlDeclaration("1.0","UTF-8",$null)) | Out-Null $XUnitAssemblies = $XUnitDoc.CreateElement("assemblies") $XUnitDoc.AppendChild($XUnitAssemblies) | Out-Null foreach($testResult in $TestRunResultObject) { $name = $testResult.name $startTime = [datetime]($testResult.startTime) $finishTime = [datetime]($testResult.finishTime) $duration = $finishTime.Subtract($startTime) $durationSeconds = [Math]::Round($duration.TotalSeconds,3) $XUnitAssembly = $XUnitDoc.CreateElement("assembly") $XUnitAssemblies.AppendChild($XUnitAssembly) | Out-Null $XUnitAssembly.SetAttribute("name",$name) $XUnitAssembly.SetAttribute("x-code-unit",$testResult.codeUnit) $XUnitAssembly.SetAttribute("test-framework", "PS Test Runner") $XUnitAssembly.SetAttribute("run-date", $startTime.ToString("yyyy-MM-dd")) $XUnitAssembly.SetAttribute("run-time", $startTime.ToString("HH:mm:ss")) $XUnitAssembly.SetAttribute("total",0) $XUnitAssembly.SetAttribute("passed",0) $XUnitAssembly.SetAttribute("failed",0) $XUnitAssembly.SetAttribute("time", $durationSeconds.ToString([System.Globalization.CultureInfo]::InvariantCulture)) $XUnitCollection = $XUnitDoc.CreateElement("collection") $XUnitAssembly.AppendChild($XUnitCollection) | Out-Null $XUnitCollection.SetAttribute("name",$name) $XUnitCollection.SetAttribute("total",0) $XUnitCollection.SetAttribute("passed",0) $XUnitCollection.SetAttribute("failed",0) $XUnitCollection.SetAttribute("skipped",0) $XUnitCollection.SetAttribute("time", $durationSeconds.ToString([System.Globalization.CultureInfo]::InvariantCulture)) foreach($testMethod in $testResult.testResults) { $testMethodName = $testMethod.method $XUnitAssembly.SetAttribute("total",([int]$XUnitAssembly.GetAttribute("total") + 1)) $XUnitCollection.SetAttribute("total",([int]$XUnitCollection.GetAttribute("total") + 1)) $XUnitTest = $XUnitDoc.CreateElement("test") $XUnitCollection.AppendChild($XUnitTest) | Out-Null $XUnitTest.SetAttribute("name", $XUnitAssembly.GetAttribute("name") + ':' + $testMethodName) $XUnitTest.SetAttribute("method", $testMethodName) $startTime = [datetime]($testMethod.startTime) $finishTime = [datetime]($testMethod.finishTime) $duration = $finishTime.Subtract($startTime) $durationSeconds = [Math]::Round($duration.TotalSeconds,3) $XUnitTest.SetAttribute("time", $durationSeconds.ToString([System.Globalization.CultureInfo]::InvariantCulture)) switch($testMethod.result) { $script:SuccessTestResultType { $XUnitAssembly.SetAttribute("passed",([int]$XUnitAssembly.GetAttribute("passed") + 1)) $XUnitCollection.SetAttribute("passed",([int]$XUnitCollection.GetAttribute("passed") + 1)) $XUnitTest.SetAttribute("result", "Pass") break; } $script:FailureTestResultType { $XUnitAssembly.SetAttribute("failed",([int]$XUnitAssembly.GetAttribute("failed") + 1)) $XUnitCollection.SetAttribute("failed",([int]$XUnitCollection.GetAttribute("failed") + 1)) $XUnitTest.SetAttribute("result", "Fail") $XUnitFailure = $XUnitDoc.CreateElement("failure") $XUnitMessage = $XUnitDoc.CreateElement("message") $XUnitMessage.InnerText = $testMethod.message; $XUnitFailure.AppendChild($XUnitMessage) | Out-Null $XUnitStacktrace = $XUnitDoc.CreateElement("stack-trace") $XUnitStacktrace.InnerText = $($testMethod.stackTrace).Replace(";","`n") $XUnitFailure.AppendChild($XUnitStacktrace) | Out-Null $XUnitTest.AppendChild($XUnitFailure) | Out-Null break; } $script:SkippedTestResultType { $XUnitCollection.SetAttribute("skipped",([int]$XUnitCollection.GetAttribute("skipped") + 1)) break; } } } } $XUnitDoc.Save($ResultsFilePath) } function Invoke-ALTestResultVerification ( [string] $TestResultsFolder = $(throw "Missing argument TestResultsFolder") ) { $failedTestList = Get-FailedTestsFromXMLFiles -TestResultsFolder $TestResultsFolder if($failedTestList.Count -gt 0) { $testsExecuted = $true; Write-Log "Failed tests:" $testsFailed = "" foreach($failedTest in $failedTestList) { $testsFailed += "Name: " + $failedTest.name + [environment]::NewLine $testsFailed += "Method: " + $failedTest.method + [environment]::NewLine $testsFailed += "Time: " + $failedTest.time + [environment]::NewLine $testsFailed += "Message: " + [environment]::NewLine + $failedTest.message + [environment]::NewLine $testsFailed += "StackTrace: "+ [environment]::NewLine + $failedTest.stackTrace + [environment]::NewLine + [environment]::NewLine } Write-Log $testsFailed throw "Test execution failed due to the failing tests, see the list of the failed tests above." } if(-not $testsExecuted) { [array]$testResultFiles = Get-ChildItem -Path $TestResultsFolder -Filter "*.xml" | Foreach { "$($_.FullName)" } foreach($resultFile in $testResultFiles) { [xml]$xmlDoc = Get-Content "$resultFile" [array]$otherTests = $xmlDoc.assemblies.assembly.collection.ChildNodes | Where-Object {$_.result -ne 'Fail'} if($otherTests.Length -gt 0) { return; } } throw "No test codeunits were executed" } } function Get-FailedTestsFromXMLFiles ( [string] $TestResultsFolder = $(throw "Missing argument TestResultsFolder") ) { $failedTestList = New-Object System.Collections.ArrayList $testsExecuted = $false [array]$testResultFiles = Get-ChildItem -Path $TestResultsFolder -Filter "*.xml" | Foreach { "$($_.FullName)" } if($testResultFiles.Length -eq 0) { throw "No test results were found" } foreach($resultFile in $testResultFiles) { [xml]$xmlDoc = Get-Content "$resultFile" [array]$failedTests = $xmlDoc.assemblies.assembly.collection.ChildNodes | Where-Object {$_.result -eq 'Fail'} if($failedTests) { $testsExecuted = $true foreach($failedTest in $failedTests) { $failedTestObject = @{ codeunitID = [int]($failedTest.ParentNode.ParentNode.'x-code-unit'); codeunitName = $failedTest.name; method = $failedTest.method; time = $failedTest.time; message = $failedTest.failure.message; stackTrace = $failedTest.failure.'stack-trace'; } $failedTestList.Add($failedTestObject) > $null } } } return $failedTestList } function Write-DisabledTestsJson ( $FailedTests, [string] $OutputFolder = $(throw "Missing argument OutputFolder"), [string] $FileName = 'DisabledTests.json' ) { $testsToDisable = New-Object -TypeName "System.Collections.ArrayList" foreach($failedTest in $failedTests) { $test = @{ codeunitID = $failedTest.codeunitID; codeunitName = $failedTest.name; method = $failedTest.method; } $testsToDisable.Add($test) } $oututFile = Join-Path $OutputFolder $FileName if(-not (Test-Path $outputFolder)) { New-Item -Path $outputFolder -ItemType Directory } Add-Content -Value (ConvertTo-Json $testsToDisable) -Path $oututFile } function Report-ErrorsInAzureDevOps ( [ValidateSet('no','error','warning')] [string] $AzureDevOps = 'no', $TestRunResultObject ) { if ($AzureDevOps -eq 'no') { return } $failedCodeunits = $TestRunResultObject | Where-Object { $_.result -eq $script:FailureTestResultType } $failedTests = $failedCodeunits.testResults | Where-Object { $_.result -eq $script:FailureTestResultType } foreach($failedTest in $failedTests) { $methodName = $failedTest.method; $errorMessage = $failedTests.message Write-Host "##vso[task.logissue type=$AzureDevOps;sourcepath=$methodName;]$errorMessage" } } function Get-DisabledAlTests ( [string] $DisabledTestsPath ) { $DisabledTests = @() if(Test-Path $DisabledTestsPath) { $DisabledTests = Get-Content $DisabledTestsPath | ConvertFrom-Json } return $DisabledTests } function Get-TestRunnerId ( [ValidateSet("Disabled", "Codeunit")] [string] $TestIsolation = "Codeunit" ) { switch($TestIsolation) { "Codeunit" { return Get-CodeunitTestIsolationTestRunnerId } "Disabled" { return Get-DisabledTestIsolationTestRunnerId } } } function Get-DisabledTestIsolationTestRunnerId() { return $global:TestRunnerIsolationDisabled } function Get-CodeunitTestIsolationTestRunnerId() { return $global:TestRunnerIsolationCodeunit } $script:CodeunitLineType = '0' $script:FunctionLineType = '1' $script:FailureTestResultType = '1'; $script:SuccessTestResultType = '2'; $script:SkippedTestResultType = '3'; $script:DefaultAuthorizationType = 'NavUserPassword' $script:DefaultTestSuite = 'DEFAULT' $global:TestRunnerAppId = "23de40a6-dfe8-4f80-80db-d70f83ce8caf" $script:DefaultCodeCoverageExporter = 130470; Import-Module "$PSScriptRoot\ALTestRunnerInternal.psm1"
0
sample_7_46.ps1
#************************************************ # DC_DSMisc.ps1 # Version 1.0.1 # Date: 07-10-2009 # VBScript by Craig Landis (clandis@microsoft.com) # PS1 by Andret Teixeira #************************************************ Import-LocalizedData -BindingVariable DSMiscStrings -FileName DC_DSMisc -UICulture en-us Write-DiagProgress -Activity $DSMiscStrings.ID_DSMisc -Status $DSMiscStrings.ID_DSMiscObtaining $sectionDescription = $DSMiscStrings.ID_DSMisc $OutputFile = $ComputerName + "_DSMisc.txt" $CommandToExecute = "cscript.exe DSMisc.vbs" RunCmD -commandToRun $CommandToExecute #11/30/12 - jasonf - include ntds.dit and *.log file sizes if (Test-Path "hklm:\system\currentcontrolset\services\NTDS\Parameters") { if ($null -ne (Get-ItemProperty "hklm:\system\currentcontrolset\services\NTDS\Parameters")."DSA Database file") { $DSADBFilePath = (get-itemproperty -Path "hklm:\system\currentcontrolset\services\NTDS\Parameters")."DSA Database file" $DSADBFileSize = (((get-item $DSADBFilePath).length)/1mb).ToString("##,###.##") "" | out-file $OutputFile -append -encoding ASCII "Database and Log Size Information" | out-file $OutputFile -append -encoding ASCII "=================================" | out-file $OutputFile -append -encoding ASCII "NTDS.dit path: $DSADBFilePath" | out-file $OutputFile -append -encoding ASCII "Size: $DSADBFileSize MB" | out-file $OutputFile -append -encoding ASCII } if ($null -ne (Get-ItemProperty "hklm:\system\currentcontrolset\services\NTDS\Parameters")."Database log files path") { $DSADBLogFilesPath = (get-itemproperty -Path "hklm:\system\currentcontrolset\services\NTDS\Parameters")."Database log files path" "Database log files path: $DSADBLogFilesPath" $DSADBLogFiles = get-childitem -path $DSADBLogFilesPath -filter *.log foreach ($logfile in $DSADBLogFiles) { "$logfile" | out-file $OutputFile -append -encoding ASCII "$logfile Size: " + ($logfile.length/1mb).ToString("##,###.##") + " MB" | out-file $OutputFile -append -encoding ASCII } } } CollectFiles -sectionDescription $sectionDescription -filesToCollect $OutputFile -fileDescription $DSMiscStrings.ID_DSMiscOutput -noFileExtensionsOnDescription Trap{WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat;Continue} # SIG # Begin signature block # MIIoQwYJK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LtMGZvdLxKA57iyqSRbYLYddKwF # Kt5HP2Tg98xV3r+6jey283uY5ECrbzBGttnzfazTkaCSUQNYsvthx7x3uj7YdBO0 # pnNUzW3+iZsRScQz0OePbvdDb37iQcweeuznx+w7G6pLdcvNavTv # SIG # End signature block
0
2742.ps1
function Get-AddrPort { Param( [Parameter(Mandatory=$True,Position=0)] [String]$AddrPort ) Write-Verbose "Entering $($MyInvocation.MyCommand)" Write-Verbose "Processing $AddrPort" if ($AddrPort -match '[0-9a-f]*:[0-9a-f]*:[0-9a-f%]*\]:[0-9]+') { $Addr, $Port = $AddrPort -split "]:" $Addr += "]" } else { $Addr, $Port = $AddrPort -split ":" } $Addr, $Port Write-Verbose "Exiting $($MyInvocation.MyCommand)" } if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { $netstatScriptBlock = { & $env:windir\system32\netstat.exe -naob } foreach($line in $(& $netstatScriptBlock)) { if ($line.length -gt 1 -and $line -notmatch "Active |Proto ") { $line = $line.trim() if ($line.StartsWith("TCP")) { $Protocol, $LocalAddress, $ForeignAddress, $State, $ConPId = ($line -split '\s{2,}') $Component = $Process = $False } elseif ($line.StartsWith("UDP")) { $State = "STATELESS" $Protocol, $LocalAddress, $ForeignAddress, $ConPid = ($line -split '\s{2,}') $Component = $Process = $False } elseif ($line -match "^\[[-_a-zA-Z0-9.]+\.(exe|com|ps1)\]$") { $Process = $line if ($Component -eq $False) { $Component = $Process } } elseif ($line -match "Can not obtain ownership information") { $Process = $Component = $line } else { $Component = $line } if ($State -match "TIME_WAIT") { $Component = "Not provided" $Process = "Not provided" } if ($Component -and $Process) { $LocalAddress, $LocalPort = Get-AddrPort($LocalAddress) $ForeignAddress, $ForeignPort = Get-AddrPort($ForeignAddress) $o = "" | Select-Object Protocol, LocalAddress, LocalPort, ForeignAddress, ForeignPort, State, ConPId, Component, Process $o.Protocol, $o.LocalAddress, $o.LocalPort, $o.ForeignAddress, $o.ForeignPort, $o.State, $o.ConPId, $o.Component, $o.Process = ` $Protocol, $LocalAddress, $LocalPort, $ForeignAddress, $ForeignPort, $State, $ConPid, $Component, $Process $o } } } } else { $netstatScriptBlock = { & $env:windir\system32\netstat.exe -nao } ("Protocol","LocalAddress","LocalPort","ForeignAddress","ForeignPort","State","PId") -join "`t" foreach($line in $(& $netstatScriptBlock)) { if ($line.length -gt 1 -and $line -notmatch "Active |Proto ") { $line = $line.trim() if ($line.StartsWith("TCP")) { $Protocol, $LocalAddress, $ForeignAddress, $State, $ConPId = ($line -split '\s{2,}') } elseif ($line.StartsWith("UDP")) { $State = "STATELESS" $Protocol, $LocalAddress, $ForeignAddress, $ConPId = ($line -split '\s{2,}') } $LocalAddress, $LocalPort = Get-AddrPort($LocalAddress) $ForeignAddress, $ForeignPort = Get-AddrPort($ForeignAddress) $o = "" | Select-Object Protocol, LocalAddress, LocalPort, ForeignAddress, ForeignPort, State, PId $o.Protocol, $o.LocalAddress, $o.LocalPort, $o.ForeignAddress, $o.ForeignPort, $o.State, $o.PId = ` $Protocol, $LocalAddress, $LocalPort, $ForeignAddress, $ForeignPort, $State, $Pid $o } } }
0
Set-UserCannotChangePass_1.ps1
#########1#########2#########3#########4#########5#########6#########7#########8#########9#########1 #########0#########0#########0#########0#########0#########0#########0#########0#########0#########0 # # Author: Erik McCarty # # Description: Set the "user Cannot Change Password" property on an active # directory user object # # Remarks: There is poor documentation on the internet that would lead you # to believe the $user.userAccountControl property value bit 0x000040 can # be set to turn on the "user Cannot Change Password" account property. # However you cannot assign this permission by directly modifying the # userAccountControl attribute. # # History: # 20080107 EWM Initial Creation # # reference: # http://msdn2.microsoft.com/en-us/library/aa746398.aspx # http://mow001.blogspot.com/2006/08/powershell-and-active-directory-part-8.html # http://ewmccarty.spaces.live.com/blog/cns!CE2AE9EFF99E6598!132.entry # Example: # # Set-UserCannotChangePassword "BMcClellan" # #########1#########2#########3#########4#########5#########6#########7#########8#########9#########1 #########0#########0#########0#########0#########0#########0#########0#########0#########0#########0 # function set-UserCannotChangePassword( [string] $sAMAccountName ){ # set variables $everyOne = [System.Security.Principal.SecurityIdentifier]'S-1-1-0' $self = [System.Security.Principal.SecurityIdentifier]'S-1-5-10' $SelfDeny = new-object System.DirectoryServices.ActiveDirectoryAccessRule ( $self,'ExtendedRight','Deny','ab721a53-1e2f-11d0-9819-00aa0040529b') $SelfAllow = new-object System.DirectoryServices.ActiveDirectoryAccessRule ( $self,'ExtendedRight','Allow','ab721a53-1e2f-11d0-9819-00aa0040529b') $EveryoneDeny = new-object System.DirectoryServices.ActiveDirectoryAccessRule ( $Everyone,'ExtendedRight','Deny','ab721a53-1e2f-11d0-9819-00aa0040529b') $EveryOneAllow = new-object System.DirectoryServices.ActiveDirectoryAccessRule ( $Everyone,'ExtendedRight','Allow','ab721a53-1e2f-11d0-9819-00aa0040529b') # find the user object in the default domain $searcher = New-Object DirectoryServices.DirectorySearcher $searcher.filter = "(&(samaccountname=$sAMAccountName))" $results = $searcher.findone() $user = $results.getdirectoryentry() # set "user cannot change password" $user.psbase.get_ObjectSecurity().AddAccessRule($selfDeny) $user.psbase.get_ObjectSecurity().AddAccessRule($EveryoneDeny) $user.psbase.CommitChanges() }
0
1685.ps1
function Get-MADObject { param ( [string]$name, [string]$description, [string]$searchroot, [ValidateSet($null,'user','group','computer')] $type ) if (!$name -and !$description -and !$searchroot -and !$type) { Throw 'Please provide a type, search term, or root.' } elseif (!$name -and !$description) { $name = '*' } if ($type) { $filter = "(&(objectcategory=$type)" } else { $filter = '(&(|(objectcategory=user)(objectcategory=group)(objectcategory=computer))' } if ($name) { $filter += "(|(samaccountname=$name)(name=$name)(sn=$name)(givenname=$name)(mail=$name@randgroup.com))" } if ($description) { if ($description -match '|') { $descstring = @('(|') $descstring += $description.Split('|') | % { '(description=' + $_ + ')' } $descstring += @(')') $descstring = -join $descstring $filter += $descstring } else { $filter += "(description=$description)" } } $filter += ')' $searcher = [adsisearcher]$filter $searcher.PageSize = 200 if ($searchroot) { $searchrootarray = $searchroot.split('/') | ? {$_} $newsearchroot = @('LDAP://') $newsearchroot += for ($i = $searchrootarray.Length - 1; $i -ge 0; $i--) { if ($i -ne 0) { 'OU=' + $searchrootarray[$i] + ',' } else { 'DC=' + $searchrootarray[$i].Split('.')[0] + ',DC=' + $searchrootarray[$i].Split('.')[1] } } $newsearchroot = -join $newsearchroot $searcher.SearchRoot = [adsi]$newsearchroot } $searcher.PropertiesToLoad.AddRange(('name', 'displayname', 'sn', 'givenname', 'objectcategory', 'whencreated', 'whenchanged', 'pwdlastset', 'lastlogon', 'distinguishedname', 'samaccountname', 'userprincipalname', 'mail', 'proxyaddresses', 'msexchhomeservername', 'homemdb', 'operatingsystem', 'description', 'title', 'department', 'manager', 'telephonenumber', 'mobile', 'scriptpath', 'homedirectory', 'homedrive', 'c', 'co', 'st', 'l', 'streetaddress', 'postalcode', 'company', 'useraccountcontrol', 'member', 'memberof')) $maxpwdage = ([adsi]"WinNT://$env:userdomain").maxpasswordage.value / 86400 $(foreach ($object in $searcher.FindAll()) { New-Object -TypeName PSObject -Property @{ Name = [string]$object.properties.name DisplayName = [string]$object.properties.displayname LastName = [string]$object.properties.sn FirstName = [string]$object.properties.givenname ObjectCategory = [string]$object.properties.objectcategory -replace '^cn=|,.*' WhenCreated = $(try{ Get-Date ([string]$object.Properties.whencreated) -f 'yyyy/MM/dd HH:mm:ss' } catch {''}) WhenChanged = $(try{ Get-Date ([string]$object.Properties.whenchanged) -f 'yyyy/MM/dd HH:mm:ss' } catch {''}) PwdLastSet = $(try{ Get-Date ([datetime]::fromfiletime($object.properties.pwdlastset[0])) -f 'yyyy/MM/dd HH:mm:ss' } catch {''}) PwdDoesNotExpire = if (([string]$object.properties.useraccountcontrol -band 65536) -eq 0) {$false} else {$true} PwdIsExpired = $(try{ if (($(Get-Date) - $(Get-Date ([datetime]::fromfiletime($object.properties.pwdlastset[0]))) | select -ExpandProperty days) -gt $maxpwdage) {$true} else {$false} }catch{''}) LastLogon = $(try{ Get-Date ([datetime]::fromfiletime($object.properties.lastlogon[0])) -f 'yyyy/MM/dd HH:mm:ss' } catch {''}) DistinguishedName = [string]$object.properties.distinguishedname SamAccountName = [string]$object.properties.samaccountname UserPrincipalName = [string]$object.properties.userprincipalname Mail = [string]$object.properties.mail ProxyAddresses = [string[]]$object.properties.proxyaddresses EmailServer = $(try{ [string]$object.properties.msexchhomeservername.split('=')[-1] } catch {''}) EmailDB = $(try{ [string]$object.properties.homemdb.split(',')[0] -replace 'cn=' } catch {''}) OperatingSystem = [string]$object.properties.operatingsystem Description = [string]$object.properties.description Title = [string]$object.properties.title Department = [string]$object.properties.department Manager = [string]$object.properties.manager TelephoneNumber = [string]$object.properties.telephonenumber Mobile = [string]$object.properties.mobile ScriptPath = [string]$object.properties.scriptpath HomeDirectory = [string]$object.properties.homedirectory HomeDrive = [string]$object.properties.homedrive Country1 = [string]$object.properties.c Country2 = [string]$object.properties.co State = [string]$object.properties.st City = [string]$object.properties.l StreetAddress = [string]$object.properties.streetaddress PostalCode = [string]$object.properties.postalcode Company = [string]$object.properties.company AccountIsLocked = $(try{ if ((([adsi]$object.path).psbase.InvokeGet('IsAccountLocked')) -eq $true) {$true} else {$false} }catch{''}) AccountIsDisabled = if (([string]$object.Properties.useraccountcontrol -band 2) -eq 0) {$false} else {$true} member = $object.properties.member | sort memberof = $object.properties.memberof | sort } }) | select name, displayname, lastname, firstname, objectcategory, whencreated, whenchanged, pwdlastset, PwdIsExpired, PwdDoesNotExpire, lastlogon, distinguishedname, samaccountname, userprincipalname, mail, proxyaddresses, emailserver, emaildb, operatingsystem, description, title, department, manager, telephonenumber, mobile, scriptpath, homedirectory, homedrive, country1, country2, state, city, streetaddress, postalcode, company, accountislocked, accountisdisabled, member, memberof }
0
Get-WordOutline_1.ps1
function Get-WordOutline ( $Path, [int]$MaxDepth = 9 ) { if ( $Path -is [System.IO.FileInfo] ) { $Path = $_.FullName } $word = New-Object -comObject word.application $document = $word.documents.open( $path ) $outline = $document.paragraphs | Where-Object { $_.outlineLevel -le $MaxDepth } | ForEach-Object { $n = ($_.outlineLevel - 1) * 2 ' ' * $n + ($_.range.text -replace '\\u000d$') } Write-Output $outline $document.close( [ref]$false ) $word.quit() }
0
1912.ps1
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone() $originalWarningPreference = $WarningPreference $WarningPreference = "SilentlyContinue" $skipTest = ! ($IsWindows -and $IsCoreCLR -and (Test-IsElevated)) $PSDefaultParameterValues["it:skip"] = $skipTest try { Describe "Implicit remoting and CIM cmdlets with AllSigned and Restricted policy" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $tempName = "TESTDRIVE:\signedscript_$(Get-Random).ps1" "123456" > $tempName $cert = $null foreach ($thisCertificate in (Get-ChildItem cert:\ -rec -codesigning)) { $null = Set-AuthenticodeSignature $tempName -Certificate $thisCertificate if ((Get-AuthenticodeSignature $tempName).Status -eq "Valid") { $cert = $thisCertificate break } } if ($null -eq $cert) { $skipThisTest = $true return } $skipThisTest = $false if (-not (Test-Path "cert:\currentuser\TrustedPublisher\$($cert.Thumbprint)")) { $store = New-Object System.Security.Cryptography.X509Certificates.X509Store "TrustedPublisher" $store.Open("ReadWrite") $store.Add($cert) $store.Close() } $session = New-RemoteSession $oldExecutionPolicy = Get-ExecutionPolicy -Scope Process Set-ExecutionPolicy AllSigned -Scope Process } AfterAll { if ($skipTest) { return } if ($null -ne $tempName) { Remove-Item -Path $tempName -Force -ErrorAction SilentlyContinue } if ($null -ne $oldExecutionPolicy) { Set-ExecutionPolicy $oldExecutionPolicy -Scope Process } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies that Import-PSSession works in AllSigned if Certificate is used" -Skip:($skipTest -or $skipThisTest) { try { $importedModule = Import-PSSession $session Get-Variable -Prefix Remote -Certificate $cert -AllowClobber $importedModule | Should -Not -BeNullOrEmpty } finally { $importedModule | Remove-Module -Force -ErrorAction SilentlyContinue } } It "Verifies security error when Certificate parameter is not used" -Skip:($skipTest -or $skipThisTest) { { $importedModule = Import-PSSession $session Get-Variable -Prefix Remote -AllowClobber } | Should -Throw -ErrorId "InvalidOperation,Microsoft.PowerShell.Commands.ImportPSSessionCommand" } } Describe "Tests Import-PSSession cmdlet works with types unavailable on the client" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $typeDefinition = @" namespace MyTest { public enum MyEnum { Value1 = 1, Value2 = 2 } } "@ $session = New-RemoteSession Invoke-Command -Session $session -Script { Add-Type -TypeDefinition $args[0] } -Args $typeDefinition Invoke-Command -Session $session -Script { function foo { param([MyTest.MyEnum][Parameter(Mandatory = $true)]$x) $x } } } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies client-side unavailable enum is correctly handled" { try { $module = Import-PSSession -Session $session -CommandName foo -AllowClobber (foo -x "Value2") | Should -Be 2 (foo -x "Value2").ToString() | Should -BeExactly "Value2" } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } } Describe "Cmdlet help from remote session" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies that get-help name for remote proxied commands matches the get-command name" { try { $module = Import-PSSession $session -Name Select-Object -prefix My -AllowClobber $gcmOutPut = (Get-Command Select-MyObject ).Name $getHelpOutPut = (Get-Help Select-MyObject).Name $gcmOutPut | Should -Be $getHelpOutPut } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } } Describe "Import-PSSession Cmdlet error handling" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies that broken alias results in one error" { try { Invoke-Command $session { Set-Alias BrokenAlias NonExistantCommand } $module = Import-PSSession $session -CommandName:BrokenAlias -CommandType:All -ErrorAction SilentlyContinue -ErrorVariable expectedError -AllowClobber $expectedError | Should -Not -BeNullOrEmpty $expectedError[0].ToString().Contains("BrokenAlias") | Should -BeTrue } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } Invoke-Command $session { Remove-Item alias:BrokenAlias } } } Context "Test content and format of proxied error message (Windows 7: BeforeAll { if ($skipTest) { return } $module = Import-PSSession -Session $session -Name Get-Variable -Prefix My -AllowClobber $oldErrorView = $ErrorView $ErrorView = "NormalView" } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } $ErrorView = $oldErrorView } It "Test non-terminating error" { $results = Get-MyVariable blah,pid 2>&1 ($results[1]).Value | Should -Not -Be $PID $errorString = $results[0] | Out-String ($errorString -like "*VariableNotFound*") | Should -BeTrue } It "Test terminating error" { $results = Get-MyVariable pid -Scope blah 2>&1 $results.Count | Should -Be 1 $errorString = $results[0] | Out-String ($errorString -like "*Argument*") | Should -BeTrue } } Context "Ordering of a sequence of error and output messages (Windows 7: BeforeAll { if ($skipTest) { return } Invoke-Command $session { function foo1{1; write-error 2; 3; write-error 4; 5; write-error 6} } $module = Import-PSSession $session -CommandName foo1 -AllowClobber $icmErr = $($icmOut = Invoke-Command $session { foo1 }) 2>&1 $proxiedErr = $($proxiedOut = foo1) 2>&1 $proxiedOut2 = foo1 2> $null $icmOut = "$icmOut" $icmErr = "$icmErr" $proxiedOut = "$proxiedOut" $proxiedOut2 = "$proxiedOut2" $proxiedErr = "$proxiedErr" } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Verifies proxied output = proxied output 2" { $proxiedOut2 | Should -Be $proxiedOut } It "Verifies proxied output = icm output (for mixed error and output results)" { $icmOut | Should -Be $proxiedOut } It "Verifies proxied error = icm error (for mixed error and output results)" { $icmErr | Should -Be $proxiedErr } It "Verifies proxied order = icm order (for mixed error and output results)" { $icmOrder = Invoke-Command $session { foo1 } 2>&1 | out-string $proxiedOrder = foo1 2>&1 | out-string $icmOrder | Should -Be $proxiedOrder } } Context "WarningVariable parameter works with implicit remoting (Windows 8: BeforeAll { if ($skipTest) { return } $module = Import-PSSession $session -CommandName Write-Warning -Prefix Remote -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Verifies WarningVariable" { $global:myWarningVariable = @() Write-RemoteWarning MyWarning -WarningVariable global:myWarningVariable ([string]($myWarningVariable[0])) | Should -Be 'MyWarning' } } } Describe "Tests Export-PSSession" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $sessionOption = New-PSSessionOption -ApplicationArguments @{myTest="MyValue"} $session = New-RemoteSession -SessionOption $sessionOption $file = [IO.Path]::Combine([IO.Path]::GetTempPath(), [Guid]::NewGuid().ToString()) $results = Export-PSSession -Session $session -CommandName Get-Variable -AllowClobber -ModuleName $file $oldTimestamp = $($results | Select-Object -First 1).LastWriteTime } AfterAll { if ($skipTest) { return } if ($null -ne $file) { Remove-Item $file -Force -Recurse -ErrorAction SilentlyContinue } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies Export-PSSession creates a file/directory" { @(Get-Item $file).Count | Should -Be 1 } It "Verifies Export-PSSession creates a psd1 file" { ($results | Where-Object { $_.Name -like "*$(Split-Path -Leaf $file).psd1" }) | Should -BeTrue } It "Verifies Export-PSSession creates a psm1 file" { ($results | Where-Object { $_.Name -like "*.psm1" }) | Should -BeTrue } It "Verifies Export-PSSession creates a ps1xml file" { ($results | Where-Object { $_.Name -like "*.ps1xml" }) | Should -BeTrue } It "Verifies that Export-PSSession fails when a module directory already exists" { $e = { Export-PSSession -Session $session -CommandName Get-Variable -AllowClobber -ModuleName $file -ErrorAction Stop } | Should -Throw -PassThru $e | Should -Not -BeNullOrEmpty ([string]($e[0]) -like "*$file*") | Should -BeTrue } It "Verifies that overwriting an existing directory succeeds with -Force" { $newResults = Export-PSSession -Session $session -CommandName Get-Variable -AllowClobber -ModuleName $file -Force @($newResults).Count | Should -Be 4 $newResults | ForEach-Object { $_.LastWriteTime | Should -BeGreaterThan $oldTimestamp } } Context "The module is usable when the original runspace is still around" { BeforeAll { if ($skipTest) { return } $module = Import-Module $file -PassThru } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Verifies that proxy returns remote pid" { (Get-Variable -Name pid).Value | Should -Not -Be $pid } It "Verfies Remove-Module doesn't remove user's runspace" { Remove-Module $module -Force -ErrorAction SilentlyContinue (Get-PSSession -InstanceId $session.InstanceId) | Should -Not -BeNullOrEmpty } } } Describe "Proxy module is usable when the original runspace is no longer around" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $sessionOption = New-PSSessionOption -ApplicationArguments @{myTest="MyValue"} $session = New-RemoteSession -SessionOption $sessionOption $file = [IO.Path]::Combine([IO.Path]::GetTempPath(), [Guid]::NewGuid().ToString()) $null = Export-PSSession -Session $session -CommandName Get-Variable -AllowClobber -ModuleName $file if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue; $session = $null } } AfterAll { if ($skipTest) { return } if ($null -ne $file) { Remove-Item $file -Force -Recurse -ErrorAction SilentlyContinue } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } Context "Proxy module should create a new session" { BeforeAll { if ($skipTest) { return } $module = import-Module $file -PassThru -Force $internalSession = & $module { $script:PSSession } } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Verifies proxy should return remote pid" -Pending { (Get-Variable -Name PID).Value | Should -Not -Be $PID } It "Verifies ApplicationArguments got preserved correctly" -Pending { $(Invoke-Command $internalSession { $PSSenderInfo.ApplicationArguments.MyTest }) | Should -BeExactly "MyValue" } It "Verifies Remove-Module removed the runspace that was automatically created" -Pending { Remove-Module $module -Force (Get-PSSession -InstanceId $internalSession.InstanceId -ErrorAction SilentlyContinue) | Should -BeNullOrEmpty } It "Verifies Runspace is closed after removing module from Export-PSSession that got initialized with an internal r-space" -Pending { ($internalSession.Runspace.RunspaceStateInfo.ToString()) | Should -BeExactly "Closed" } } Context "Runspace created by the module with explicit session options" { BeforeAll { if ($skipTest) { return } $explicitSessionOption = New-PSSessionOption -Culture fr-FR -UICulture de-DE $module = import-Module $file -PassThru -Force -ArgumentList $null, $explicitSessionOption $internalSession = & $module { $script:PSSession } } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Verifies proxy should return remote pid" -Pending { (Get-Variable -Name PID).Value | Should -Not -Be $PID } It "Verifies proxy returns modified culture" -Pending { (Get-Variable -Name PSCulture).Value | Should -BeExactly "fr-FR" } It "Verifies proxy returns modified culture" -Pending { (Get-Variable -Name PSUICulture).Value | Should -BeExactly "de-DE" } It "Verifies Remove-Module removes automatically created runspace" -Pending { Remove-Module $module -Force (Get-PSSession -InstanceId $internalSession.InstanceId -ErrorAction SilentlyContinue) | Should -BeNullOrEmpty } It "Verifies Runspace is closed after removing module from Export-PSSession that got initialized with an internal r-space" -Pending { ($internalSession.Runspace.RunspaceStateInfo.ToString()) | Should -BeExactly "Closed" } } Context "Passing a runspace into proxy module" { BeforeAll { if ($skipTest) { return } $newSession = New-RemoteSession $module = import-Module $file -PassThru -Force -ArgumentList $newSession $internalSession = & $module { $script:PSSession } } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } if ($null -ne $newSession) { Remove-PSSession $newSession -ErrorAction SilentlyContinue } } It "Verifies proxy returns remote pid" { (Get-Variable -Name PID).Value | Should -Not -Be $PID } It "Verifies switch parameters work" { (Get-Variable -Name PID -ValueOnly) | Should -Not -Be $PID } It "Verifies Adding a module affects runspace's state" { ($internalSession.Runspace.RunspaceStateInfo.ToString()) | Should -BeExactly "Opened" } It "Verifies Runspace stays opened after removing module from Export-PSSession that got initialized with an external runspace" { Remove-Module $module -Force ($internalSession.Runspace.RunspaceStateInfo.ToString()) | Should -BeExactly "Opened" } } } Describe "Import-PSSession with FormatAndTypes" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $samesession = New-RemoteSession -ConfigurationName $endpointName $session = New-RemoteSession function CreateTempPs1xmlFile { do { $tmpFile = [IO.Path]::Combine([IO.Path]::GetTempPath(), [IO.Path]::GetRandomFileName()) + ".ps1xml"; } while ([IO.File]::Exists($tmpFile)) $tmpFile } function CreateTypeFile { $tmpFile = CreateTempPs1xmlFile @" <Types> <Type> <Name>System.Management.Automation.Host.Coordinates</Name> <Members> <NoteProperty> <Name>MyTestLabel</Name> <Value>123</Value> </NoteProperty> </Members> </Type> <Type> <Name>MyTest.Root</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name>SerializationDepth</Name> <Value>1</Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>MyTest.Son</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name>SerializationDepth</Name> <Value>1</Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>MyTest.Grandson</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name>SerializationDepth</Name> <Value>1</Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> </Types> "@ | set-content $tmpFile $tmpFile } function CreateFormatFile { $tmpFile = CreateTempPs1xmlFile @" <Configuration> <ViewDefinitions> <View> <Name>MySizeView</Name> <ViewSelectedBy> <TypeName>System.Management.Automation.Host.Size</TypeName> </ViewSelectedBy> <TableControl> <TableHeaders> <TableColumnHeader> <Label>MyTestWidth</Label> </TableColumnHeader> <TableColumnHeader> <Label>MyTestHeight</Label> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <PropertyName>Width</PropertyName> </TableColumnItem> <TableColumnItem> <PropertyName>Height</PropertyName> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> "@ | set-content $tmpFile $tmpFile } $formatFile = CreateFormatFile $typeFile = CreateTypeFile } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } if ($null -ne $samesession) { Remove-PSSession $samesession -ErrorAction SilentlyContinue } if ($null -ne $formatFile) { Remove-Item $formatFile -Force -ErrorAction SilentlyContinue } if ($null -ne $typeFile) { Remove-Item $typeFile -Force -ErrorAction SilentlyContinue } } Context "Importing format file works" { BeforeAll { if ($skipTest) { return } $formattingScript = { new-object System.Management.Automation.Host.Size | ForEach-Object { $_.Width = 123; $_.Height = 456; $_ } | Out-String } $originalLocalFormatting = & $formattingScript $originalRemoteFormatting = Invoke-Command $samesession $formattingScript $originalLocalFormatting | Should -Be $originalRemoteFormatting Invoke-Command $samesession { param($file) Update-FormatData $file } -ArgumentList $formatFile $modifiedRemoteFormatting = Invoke-Command $samesession $formattingScript $originalRemoteFormatting | Should -Not -Be $modifiedRemoteFormatting $module = Import-PSSession -Session $samesession -CommandName @() -FormatTypeName * -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "modified remote and imported local should be equal" { $importedLocalFormatting = & $formattingScript $modifiedRemoteFormatting | Should -Be $importedLocalFormatting } It "original local and unimported local should be equal" { Remove-Module $module -Force $unimportedLocalFormatting = & $formattingScript $originalLocalFormatting | Should -Be $unimportedLocalFormatting } } It "Updating type table in a middle of a command has effect on serializer" { $results = Invoke-Command $session -ArgumentList $typeFile -ScriptBlock { param($file) New-Object System.Management.Automation.Host.Coordinates Update-TypeData $file New-Object System.Management.Automation.Host.Coordinates } $results.Count | Should -Be 2 $results[0].MyTestLabel | Should -BeNullOrEmpty $results[1].MyTestLabel | Should -Be 123 } Context "Implicit remoting works even when types.ps1xml is missing on the client" { BeforeAll { if ($skipTest) { return } $typeDefinition = @" namespace MyTest { public class Root { public Root(string s) { text = s; } public Son Son = new Son(); public string text; } public class Son { public Grandson Grandson = new Grandson(); } public class Grandson { public string text = "Grandson"; } } "@ Invoke-Command -Session $session -Script { Add-Type -TypeDefinition $args[0] } -ArgumentList $typeDefinition Invoke-Command -Session $session -Script { function foo { New-Object MyTest.Root "root" } } Invoke-Command -Session $session -Script { function bar { param([Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]$Son) $Son.Grandson.text } } $module = import-pssession $session foo,bar -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Serialization works for top-level properties" { $x = foo $x.text | Should -BeExactly "root" } It "Serialization settings works for deep properties" { $x = foo $x.Son.Grandson.text | Should -BeExactly "Grandson" } It "Serialization settings are preserved even if types.ps1xml is missing on the client" { $y = foo | bar $y | Should -BeExactly "Grandson" } } } Describe "Import-PSSession functional tests" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession Invoke-Command -Session $session { function MyFunction { param($x) "x = '$x'; args = '$args'" } } $remoteCommandType = $ExecutionContext.InvokeCommand.GetCommand('Get-Variable', [System.Management.Automation.CommandTypes]::Cmdlet) $remoteProxyBody = [System.Management.Automation.ProxyCommand]::Create($remoteCommandType) $remoteProxyDeclaration = "function Get-VariableProxy { $remoteProxyBody }" Invoke-Command -Session $session { param($x) Invoke-Expression $x } -Arg $remoteProxyDeclaration $remoteAliasDeclaration = "set-alias gvalias Get-Variable" Invoke-Command -Session $session { param($x) Invoke-Expression $x } -Arg $remoteAliasDeclaration Remove-Item alias:gvalias -Force -ErrorAction silentlycontinue $module = Import-PSSession -Session $session -Name MyFunction,Get-VariableProxy,Get-Variable,gvalias,cmd -AllowClobber -Type All } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Import-PSSession should return a PSModuleInfo object" { $module | Should -Not -BeNullOrEmpty } It "Import-PSSession should return a PSModuleInfo object" { ($module -as [System.Management.Automation.PSModuleInfo]) | Should -Not -BeNullOrEmpty } It "Helper functions should not be imported" { (Get-Item function:*PSImplicitRemoting* -ErrorAction SilentlyContinue) | Should -BeNullOrEmpty } It "Calls implicit remoting proxies 'MyFunction'" { (MyFunction 1 2 3) | Should -BeExactly "x = '1'; args = '2 3'" } It "proxy should return remote pid" { (Get-VariableProxy -Name:pid).Value | Should -Not -Be $pid } It "proxy should return remote pid" { (Get-Variable -Name:pid).Value | Should -Not -Be $pid } It "proxy should return remote pid" { $(& (Get-Command gvalias -Type alias) -Name:pid).Value | Should -Not -Be $pid } It "NoName-c8aeb5c8-2388-4d64-98c1-a9c6c218d404" { Invoke-Command -Session $session { $env:TestImplicitRemotingVariable = 123 } (cmd.exe /c "echo TestImplicitRemotingVariable=%TestImplicitRemotingVariable%") | Should -BeExactly "TestImplicitRemotingVariable=123" } Context "Test what happens after the runspace is closed" { BeforeAll { if ($skipTest) { return } Remove-PSSession $session $i = 0 while ( ($i -lt 20) -and ($null -ne (Get-Module | Where-Object { $_.Path -eq $module.Path })) ) { $i++ Start-Sleep -Milliseconds 50 } } It "Temporary module should be automatically removed after runspace is closed" { (Get-Module | Where-Object { $_.Path -eq $module.Path }) | Should -BeNullOrEmpty } It "Temporary psm1 file should be automatically removed after runspace is closed" { (Get-Item $module.Path -ErrorAction SilentlyContinue) | Should -BeNullOrEmpty } It "Event should be unregistered when the runspace is closed" { $implicitEventCount = 0 foreach ($item in $ExecutionContext.Events.Subscribers) { if ($item.SourceIdentifier -match "Implicit remoting event") { $implicitEventCount++ } } $implicitEventCount | Should -Be 0 } It "Private functions from the implicit remoting module shouldn't get imported into global scope" { @(Get-ChildItem function:*Implicit* -ErrorAction SilentlyContinue).Count | Should -Be 0 } } } Describe "Implicit remoting parameter binding" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Binding of ValueFromPipeline should work" { try { $module = Import-PSSession -Session $session -Name Get-Random -AllowClobber $x = 1..20 | Get-Random -Count 5 $x.Count | Should -Be 5 } finally { Remove-Module $module -Force } } Context "Pipeline-based parameter binding works even when client has no type constraints (Windows 7: BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { [cmdletbinding(defaultparametersetname="string")] param( [string] [parameter(ParameterSetName="string", ValueFromPipeline = $true)] $string, [ipaddress] [parameter(ParameterSetName="ipaddress", ValueFromPipeline = $true)] $ipaddress ) "Bound parameter: $($myInvocation.BoundParameters.Keys | Sort-Object)" } } Invoke-Command $session {"s" | foo} | Should -BeExactly "Bound parameter: string" Invoke-Command $session {[ipaddress]::parse("127.0.0.1") | foo} | Should -BeExactly "Bound parameter: ipaddress" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Pipeline binding works even if it relies on type constraints" { ("s" | foo) | Should -BeExactly "Bound parameter: string" } It "Pipeline binding works even if it relies on type constraints" { ([ipaddress]::parse("127.0.0.1") | foo) | Should -BeExactly "Bound parameter: ipaddress" } } Context "Pipeline-based parameter binding works even when client has no type constraints and parameterset is ambiguous (Windows 7: BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [string] [parameter(ParameterSetName="string", ValueFromPipeline = $true)] $string, [ipaddress] [parameter(ParameterSetName="ipaddress", ValueFromPipeline = $true)] $ipaddress ) "Bound parameter: $($myInvocation.BoundParameters.Keys)" } } Invoke-Command $session {"s" | foo} | Should -BeExactly "Bound parameter: string" Invoke-Command $session {[ipaddress]::parse("127.0.0.1") | foo} | Should -BeExactly "Bound parameter: ipaddress" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Pipeline binding works even if it relies on type constraints and parameter set is ambiguous" { ("s" | foo) | Should -BeExactly "Bound parameter: string" } It "Pipeline binding works even if it relies on type constraints and parameter set is ambiguous" { ([ipaddress]::parse("127.0.0.1") | foo) | Should -BeExactly "Bound parameter: ipaddress" } } Context "pipeline-based parameter binding works even when one of parameters that can be bound by pipeline gets bound by name" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [DateTime] [parameter(ValueFromPipeline = $true)] $date, [ipaddress] [parameter(ValueFromPipeline = $true)] $ipaddress ) "Bound parameter: $($myInvocation.BoundParameters.Keys | Sort-Object)" } } Invoke-Command $session {Get-Date | foo} | Should -BeExactly "Bound parameter: date" Invoke-Command $session {[ipaddress]::parse("127.0.0.1") | foo} | Should -BeExactly "Bound parameter: ipaddress" Invoke-Command $session {[ipaddress]::parse("127.0.0.1") | foo -date (get-date)} | Should -BeExactly "Bound parameter: date ipaddress" Invoke-Command $session {Get-Date | foo -ipaddress ([ipaddress]::parse("127.0.0.1"))} | Should -BeExactly "Bound parameter: date ipaddress" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Pipeline binding works even when also binding by name" { (Get-Date | foo) | Should -BeExactly "Bound parameter: date" } It "Pipeline binding works even when also binding by name" { ([ipaddress]::parse("127.0.0.1") | foo) | Should -BeExactly "Bound parameter: ipaddress" } It "Pipeline binding works even when also binding by name" { ([ipaddress]::parse("127.0.0.1") | foo -date $(Get-Date)) | Should -BeExactly "Bound parameter: date ipaddress" } It "Pipeline binding works even when also binding by name" { (Get-Date | foo -ipaddress ([ipaddress]::parse("127.0.0.1"))) | Should -BeExactly "Bound parameter: date ipaddress" } } Context "value from pipeline by property name - multiple parameters" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [System.TimeSpan] [parameter(ValueFromPipelineByPropertyName = $true)] $TotalProcessorTime, [System.Diagnostics.ProcessPriorityClass] [parameter(ValueFromPipelineByPropertyName = $true)] $PriorityClass ) "Bound parameter: $($myInvocation.BoundParameters.Keys | Sort-Object)" } } Invoke-Command $session {Get-Process -pid $pid | foo} | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" Invoke-Command $session {Get-Process -pid $pid | foo -Total 5} | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" Invoke-Command $session {Get-Process -pid $pid | foo -Priority normal} | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Pipeline binding works by property name" { (Get-Process -id $pid | foo) | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" } It "Pipeline binding works by property name" { (Get-Process -id $pid | foo -Total 5) | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" } It "Pipeline binding works by property name" { (Get-Process -id $pid | foo -Priority normal) | Should -BeExactly "Bound parameter: PriorityClass TotalProcessorTime" } } Context "2 parameters on the same position" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [string] [parameter(Position = 0, parametersetname = 'set1', mandatory = $true)] $string, [ipaddress] [parameter(Position = 0, parametersetname = 'set2', mandatory = $true)] $ipaddress ) "Bound parameter: $($myInvocation.BoundParameters.Keys | Sort-Object)" } } Invoke-Command $session {foo ([ipaddress]::parse("127.0.0.1"))} | Should -BeExactly "Bound parameter: ipaddress" Invoke-Command $session {foo "blah"} | Should -BeExactly "Bound parameter: string" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Positional binding works" { foo "blah" | Should -BeExactly "Bound parameter: string" } It "Positional binding works" { foo ([ipaddress]::parse("127.0.0.1")) | Should -BeExactly "Bound parameter: ipaddress" } } Context "positional binding and array argument value" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [object] [parameter(Position = 0, mandatory = $true)] $p1, [object] [parameter(Position = 1)] $p2 ) "$p1 : $p2" } } Invoke-Command $session {foo 1,2,3} | Should -BeExactly "1 2 3 : " Invoke-Command $session {foo 1,2,3 4} | Should -BeExactly "1 2 3 : 4" Invoke-Command $session {foo -p2 4 1,2,3} | Should -BeExactly "1 2 3 : 4" Invoke-Command $session {foo 1 4} | Should -BeExactly "1 : 4" Invoke-Command $session {foo -p2 4 1} | Should -BeExactly "1 : 4" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Positional binding works when binding an array value" { foo 1,2,3 | Should -BeExactly "1 2 3 : " } It "Positional binding works when binding an array value" { foo 1,2,3 4 | Should -BeExactly "1 2 3 : 4" } It "Positional binding works when binding an array value" { foo -p2 4 1,2,3 | Should -BeExactly "1 2 3 : 4" } It "Positional binding works when binding an array value" { foo 1 4 | Should -BeExactly "1 : 4" } It "Positional binding works when binding an array value" { foo -p2 4 1 | Should -BeExactly "1 : 4" } } Context "value from remaining arguments" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( [string] [parameter(Position = 0)] $firstArg, [string[]] [parameter(ValueFromRemainingArguments = $true)] $remainingArgs ) "$firstArg : $remainingArgs" } } Invoke-Command $session {foo} | Should -BeExactly " : " Invoke-Command $session {foo 1} | Should -BeExactly "1 : " Invoke-Command $session {foo -first 1} | Should -BeExactly "1 : " Invoke-Command $session {foo 1 2 3} | Should -BeExactly "1 : 2 3" Invoke-Command $session {foo -first 1 2 3} | Should -BeExactly "1 : 2 3" Invoke-Command $session {foo 2 3 -first 1 4 5} | Should -BeExactly "1 : 2 3 4 5" Invoke-Command $session {foo -remainingArgs 2,3 1} | Should -BeExactly "1 : 2 3" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Value from remaining arguments works" { $( foo ) | Should -BeExactly " : " } It "Value from remaining arguments works" { $( foo 1 ) | Should -BeExactly "1 : " } It "Value from remaining arguments works" { $( foo -first 1 ) | Should -BeExactly "1 : " } It "Value from remaining arguments works" { $( foo 1 2 3 ) | Should -BeExactly "1 : 2 3" } It "Value from remaining arguments works" { $( foo -first 1 2 3 ) | Should -BeExactly "1 : 2 3" } It "Value from remaining arguments works" { $( foo 2 3 -first 1 4 5 ) | Should -BeExactly "1 : 2 3 4 5" } It "Value from remaining arguments works" { $( foo -remainingArgs 2,3 1 ) | Should -BeExactly "1 : 2 3" } } Context "non cmdlet-based binding" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function foo { param( $firstArg, $secondArg ) "$firstArg : $secondArg : $args" } } Invoke-Command $session { foo } | Should -BeExactly " : : " Invoke-Command $session { foo 1 } | Should -BeExactly "1 : : " Invoke-Command $session { foo -first 1 } | Should -BeExactly "1 : : " Invoke-Command $session { foo 1 2 } | Should -BeExactly "1 : 2 : " Invoke-Command $session { foo 1 -second 2 } | Should -BeExactly "1 : 2 : " Invoke-Command $session { foo -first 1 -second 2 } | Should -BeExactly "1 : 2 : " Invoke-Command $session { foo 1 2 3 4 } | Should -BeExactly "1 : 2 : 3 4" Invoke-Command $session { foo -first 1 2 3 4 } | Should -BeExactly "1 : 2 : 3 4" Invoke-Command $session { foo 1 -second 2 3 4 } | Should -BeExactly "1 : 2 : 3 4" Invoke-Command $session { foo 1 3 -second 2 4 } | Should -BeExactly "1 : 2 : 3 4" Invoke-Command $session { foo -first 1 -second 2 3 4 } | Should -BeExactly "1 : 2 : 3 4" $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Non cmdlet-based binding works." { foo | Should -BeExactly " : : " } It "Non cmdlet-based binding works." { foo 1 | Should -BeExactly "1 : : " } It "Non cmdlet-based binding works." { foo -first 1 | Should -BeExactly "1 : : " } It "Non cmdlet-based binding works." { foo 1 2 | Should -BeExactly "1 : 2 : " } It "Non cmdlet-based binding works." { foo 1 -second 2 | Should -BeExactly "1 : 2 : " } It "Non cmdlet-based binding works." { foo -first 1 -second 2 | Should -BeExactly "1 : 2 : " } It "Non cmdlet-based binding works." { foo 1 2 3 4 | Should -BeExactly "1 : 2 : 3 4" } It "Non cmdlet-based binding works." { foo -first 1 2 3 4 | Should -BeExactly "1 : 2 : 3 4" } It "Non cmdlet-based binding works." { foo 1 -second 2 3 4 | Should -BeExactly "1 : 2 : 3 4" } It "Non cmdlet-based binding works." { foo 1 3 -second 2 4 | Should -BeExactly "1 : 2 : 3 4" } It "Non cmdlet-based binding works." { foo -first 1 -second 2 3 4 | Should -BeExactly "1 : 2 : 3 4" } } Context "default parameter initialization should be executed on the server" { BeforeAll { if ($skipTest) { return } Invoke-Command -Session $session -ScriptBlock { function MyInitializerFunction { param($x = $PID) $x } } $localPid = $PID $remotePid = Invoke-Command $session { $PID } $localPid | Should -Not -Be $remotePid $module = Import-PSSession -Session $session -Name MyInitializerFunction -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Initializer run on the remote server" { (MyInitializerFunction) | Should -Be $remotePid } It "Initializer not run when value provided" { (MyInitializerFunction 123) | Should -Be 123 } } Context "client-side parameters - cmdlet case" { BeforeAll { if ($skipTest) { return } $remotePid = Invoke-Command $session { $PID } $module = Import-PSSession -Session $session -Name Get-Variable -Type cmdlet -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Importing by name/type should work" { (Get-Variable -Name PID).Value | Should -Not -Be $PID } It "Test -AsJob parameter" { try { $job = Get-Variable -Name PID -AsJob $job | Should -Not -BeNullOrEmpty ($job -is [System.Management.Automation.Job]) | Should -BeTrue ($job.Finished.WaitOne([TimeSpan]::FromSeconds(10), $false)) | Should -BeTrue $job.JobStateInfo.State | Should -Be 'Completed' $childJob = $job.ChildJobs[0] $childJob.Output.Count | Should -Be 1 $childJob.Output[0].Value | Should -Be $remotePid } finally { Remove-Job $job -Force } } It "Test OutVariable" { $result1 = Get-Variable -Name PID -OutVariable global:result2 $result1.Value | Should -Be $remotePid $global:result2[0].Value | Should -Be $remotePid } } Context "client-side parameters - Windows 7 bug BeforeAll { if ($skipTest) { return } $module = Import-PSSession -Session $session -Name Write-Warning -Type cmdlet -Prefix Remote -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Test warnings present with '-WarningAction Continue'" { try { $jobWithWarnings = write-remotewarning foo -WarningAction continue -Asjob $null = Wait-Job $jobWithWarnings $jobWithWarnings.ChildJobs[0].Warning.Count | Should -Be 1 } finally { Remove-Job $jobWithWarnings -Force } } It "Test no warnings with '-WarningAction SilentlyContinue'" { try { $jobWithoutWarnings = write-remotewarning foo -WarningAction silentlycontinue -Asjob $null = Wait-Job $jobWithoutWarnings $jobWithoutWarnings.ChildJobs[0].Warning.Count | Should -Be 0 } finally { Remove-Job $jobWithoutWarnings -Force } } } Context "client-side parameters - non-cmdlet case" { BeforeAll { if ($skipTest) { return } Invoke-Command $session { function foo { param($OutVariable) "OutVariable = $OutVariable" } } Invoke-Command $session { foo -OutVariable x } | Should -BeExactly "OutVariable = x" $module = Import-PSSession -Session $session -Name foo -Type function -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Implicit remoting: OutVariable is not intercepted for non-cmdlet-bound functions" { foo -OutVariable x | Should -BeExactly "OutVariable = x" } } Context "switch and positional parameters" { BeforeAll { if ($skipTest) { return } $remotePid = Invoke-Command $session { $PID } $module = Import-PSSession -Session $session -Name Get-Variable -Type cmdlet -Prefix Remote -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Switch parameters work fine" { $proxiedPid = Get-RemoteVariable -Name pid -ValueOnly $remotePid | Should -Be $proxiedPid } It "Positional parameters work fine" { $proxiedPid = Get-RemoteVariable pid $remotePid | Should -Be ($proxiedPid.Value) } } } Describe "Implicit remoting on restricted ISS" -tags "Feature","RequireAdminOnWindows","Slow" { BeforeAll { if ($skipTest) { return } $sessionConfigurationDll = [IO.Path]::Combine([IO.Path]::GetTempPath(), "ImplicitRemotingRestrictedConfiguration$(Get-Random).dll") Add-Type -OutputAssembly $sessionConfigurationDll -TypeDefinition @" using System; using System.Collections.Generic; using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Management.Automation.Remoting; namespace MySessionConfiguration { public class MySessionConfiguration : PSSessionConfiguration { public override InitialSessionState GetInitialSessionState(PSSenderInfo senderInfo) { //System.Diagnostics.Debugger.Launch(); //System.Diagnostics.Debugger.Break(); InitialSessionState iss = InitialSessionState.CreateRestricted(System.Management.Automation.SessionCapabilities.RemoteServer); // add Out-String for testing stuff iss.Commands["Out-String"][0].Visibility = SessionStateEntryVisibility.Public; // remove all commands that are not public List<string> commandsToRemove = new List<string>(); foreach (SessionStateCommandEntry entry in iss.Commands) { List<SessionStateCommandEntry> sameNameEntries = new List<SessionStateCommandEntry>(iss.Commands[entry.Name]); if (!sameNameEntries.Exists(delegate(SessionStateCommandEntry e) { return e.Visibility == SessionStateEntryVisibility.Public; })) { commandsToRemove.Add(entry.Name); } } foreach (string commandToRemove in commandsToRemove) { iss.Commands.Remove(commandToRemove, null /* all types */); } return iss; } } } "@ Get-PSSessionConfiguration ImplicitRemotingRestrictedConfiguration* | Unregister-PSSessionConfiguration -Force $myConfiguration = Register-PSSessionConfiguration ` -Name ImplicitRemotingRestrictedConfiguration ` -ApplicationBase (Split-Path $sessionConfigurationDll) ` -AssemblyName (Split-Path $sessionConfigurationDll -Leaf) ` -ConfigurationTypeName "MySessionConfiguration.MySessionConfiguration" ` -Force $session = New-RemoteSession -ConfigurationName $myConfiguration.Name $session | Should -Not -BeNullOrEmpty } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } if ($null -ne $myConfiguration) { Unregister-PSSessionConfiguration -Name ($myConfiguration.Name) -Force -ErrorAction SilentlyContinue } if ($null -ne $sessionConfigurationDll) { Remove-Item $sessionConfigurationDll -Force -ErrorAction SilentlyContinue } } Context "restrictions works" { It "Get-Variable is private" { @(Invoke-Command $session { Get-Command -Name Get-Variabl* }).Count | Should -Be 0 } It "Only 9 commands are public" { @(Invoke-Command $session { Get-Command }).Count | Should -Be 9 } } Context "basic functionality of Import-PSSession works (against a directly exposed cmdlet and against a proxy function)" { BeforeAll { if ($skipTest) { return } $module = Import-PSSession $session Out-Strin*,Measure-Object -Type Cmdlet,Function -ArgumentList 123 -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "Import-PSSession works against the ISS-restricted runspace (Out-String)" { @(Get-Command Out-String -Type Function).Count | Should -Be 1 } It "Import-PSSession works against the ISS-restricted runspace (Measure-Object)" { @(Get-Command Measure-Object -Type Function).Count | Should -Be 1 } It "Invoking an implicit remoting proxy works against the ISS-restricted runspace (Out-String)" { $remoteResult = Out-String -input ("blah " * 10) -Width 10 $localResult = Microsoft.PowerShell.Utility\Out-String -input ("blah " * 10) -Width 10 $localResult | Should -Be $remoteResult } It "Invoking an implicit remoting proxy works against the ISS-restricted runspace (Measure-Object)" { $remoteResult = 1..10 | Measure-Object $localResult = 1..10 | Microsoft.PowerShell.Utility\Measure-Object ($localResult.Count) | Should -Be ($remoteResult.Count) } } } Describe "Implicit remoting tests" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } Context "Get-Command <Imported-Module> and <Imported-Module.Name> work (Windows 7: BeforeAll { if ($skipTest) { return } $module = Import-PSSession $session Get-Variable -Prefix My -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } It "PSModuleInfo.Name shouldn't contain a psd1 extension" { ($module.Name -notlike '*.psd1') | Should -BeTrue } It "PSModuleInfo.Name shouldn't contain a psm1 extension" { ($module.Name -notlike '*.psm1') | Should -BeTrue } It "PSModuleInfo.Name shouldn't contain a path" { ($module.Name -notlike "${env:TMP}*") | Should -BeTrue } It "Get-Command returns only 1 public command from implicit remoting module (1)" -Pending { $c = @(Get-Command -Module $module) $c.Count | Should -Be 1 $c[0].Name | Should -BeExactly "Get-MyVariable" } It "Get-Command returns only 1 public command from implicit remoting module (2)" -Pending { $c = @(Get-Command -Module $module.Name) $c.Count | Should -Be 1 $c[0].Name | Should -BeExactly "Get-MyVariable" } } Context "progress bar should be 1) present and 2) completed also" { BeforeAll { if ($skipTest) { return } $file = [IO.Path]::Combine([IO.Path]::GetTempPath(), [Guid]::NewGuid().ToString()) $powerShell = [PowerShell]::Create().AddCommand("Export-PSSession").AddParameter("Session", $session).AddParameter("ModuleName", $file).AddParameter("CommandName", "Get-Process").AddParameter("AllowClobber") $powerShell.Invoke() | Out-Null } AfterAll { if ($skipTest) { return } $powerShell.Dispose() if ($null -ne $file) { Remove-Item $file -Recurse -Force -ErrorAction SilentlyContinue } } It "'Completed' progress record should be present" { ($powerShell.Streams.Progress | Select-Object -last 1).RecordType.ToString() | Should -BeExactly "Completed" } } Context "display of property-less objects (not sure if this test belongs here) (Windows 7: BeforeAll { if ($skipTest) { return } $x = new-object random $expected = $x.ToString() } It "Display of local property-less objects" { ($x | Out-String).Trim() | Should -Be $expected } It "Display of remote property-less objects" { (Invoke-Command $session { Import-Module Microsoft.PowerShell.Utility; New-Object random } | out-string).Trim() | Should -Be $expected } } It "piping between remoting proxies should work" { try { $module = Import-PSSession -Session $session -Name Write-Output -AllowClobber $result = Write-Output 123 | Write-Output $result | Should -Be 123 } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } It "Strange parameter names should trigger an error" { try { Invoke-Command $session { function attack(${foo="$(calc)"}){Write-Output "It is done."}} $module = Import-PSSession -Session $session -CommandName attack -ErrorAction SilentlyContinue -ErrorVariable expectedError -AllowClobber $expectedError | Should -Not -BeNullOrEmpty } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } It "Non-terminating error from remote end got duplicated locally" { try { Invoke-Command $session { $oldGetCommand = ${function:Get-Command} } Invoke-Command $session { function Get-Command { write-error blah } } $module = Import-PSSession -Session $session -ErrorAction SilentlyContinue -ErrorVariable expectedError -AllowClobber $expectedError | Should -Not -BeNullOrEmpty $msg = [string]($expectedError[0]) $msg.Contains("blah") | Should -BeTrue } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } Invoke-Command $session { ${function:Get-Command} = $oldGetCommand } } } It "Should get an error if remote server returns something that wasn't asked for" { try { Invoke-Command $session { $oldGetCommand = ${function:Get-Command} } Invoke-Command $session { function notRequested { "notRequested" }; function Get-Command { Microsoft.PowerShell.Core\Get-Command Get-Variable,notRequested } } $module = Import-PSSession -Session $session Get-Variable -AllowClobber -ErrorAction SilentlyContinue -ErrorVariable expectedError $expectedError | Should -Not -BeNullOrEmpty $msg = [string]($expectedError[0]) $msg.Contains("notRequested") | Should -BeTrue } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } Invoke-Command $session { ${function:Get-Command} = $oldGetCommand } } } It "Get-Command returns something that is not CommandInfo" { Invoke-Command $session { $oldGetCommand = ${function:Get-Command} } Invoke-Command $session { function Get-Command { Microsoft.PowerShell.Utility\Get-Variable } } $e = { $module = Import-PSSession -Session $session -AllowClobber } | Should -Throw -PassThru $msg = [string]($e) $msg.Contains("Get-Command") | Should -BeTrue if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } Invoke-Command $session { ${function:Get-Command} = $oldGetCommand } } It "Command resolution for 'myOrder' should be respected by implicit remoting" { try { $tempdir = Join-Path $env:TEMP ([IO.Path]::GetRandomFileName()) $null = New-Item $tempdir -ItemType Directory -Force $oldPath = Invoke-Command $session { $env:PATH } 'param([Parameter(Mandatory=$true)]$scriptParam) "external script / $scriptParam"' > $tempdir\myOrder.ps1 Invoke-Command $session { param($x) $env:PATH = $env:PATH + [IO.Path]::PathSeparator + $x } -ArgumentList $tempDir Invoke-Command $session { function myOrder { param([Parameter(Mandatory=$true)]$functionParam) "function / $functionParam" } } Invoke-Command $session { function helper { param([Parameter(Mandatory=$true)]$aliasParam) "alias / $aliasParam" }; Set-Alias myOrder helper } $expectedResult = Invoke-Command $session { myOrder -aliasParam 123 } $module = Import-PSSession $session myOrder -CommandType All -AllowClobber $actualResult = myOrder -aliasParam 123 $expectedResult | Should -Be $actualResult } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } Invoke-Command $session { param($x) $env:PATH = $x; Remove-Item Alias:\myOrder, Function:\myOrder, Function:\helper -Force -ErrorAction SilentlyContinue } -ArgumentList $oldPath Remove-Item $tempDir -Force -Recurse -ErrorAction SilentlyContinue } } It "Test -Prefix parameter" { try { $module = Import-PSSession -Session $session -Name Get-Variable -Type cmdlet -Prefix My -AllowClobber (Get-MyVariable -Name pid).Value | Should -Not -Be $PID } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } (Get-Item function:Get-MyVariable -ErrorAction SilentlyContinue) | Should -BeNullOrEmpty } Context "BadVerbs of functions should trigger a warning" { BeforeAll { if ($skipTest) { return } Invoke-Command $session { function BadVerb-Variable { param($name) Get-Variable $name } } } AfterAll { if ($skipTest) { return } Invoke-Command $session { Remove-Item Function:\BadVerb-Variable } } It "Bad verb causes no error but warning" { try { $ps = [powershell]::Create().AddCommand("Import-PSSession", $true).AddParameter("Session", $session).AddParameter("CommandName", "BadVerb-Variable") $module = $ps.Invoke() | Select-Object -First 1 $ps.Streams.Error.Count | Should -Be 0 $ps.Streams.Warning.Count | Should -Not -Be 0 } finally { if ($null -ne $module) { $ps.Commands.Clear() $ps.AddCommand("Remove-Module").AddParameter("ModuleInfo", $module).AddParameter("Force", $true) > $null $ps.Invoke() > $null } $ps.Dispose() } } It "Imported function with bad verb should work" { try { $module = Import-PSSession $session BadVerb-Variable -WarningAction SilentlyContinue -AllowClobber $remotePid = Invoke-Command $session { $PID } $getVariablePid = Invoke-Command $session { (Get-Variable -Name PID).Value } $getVariablePid | Should -Be $remotePid Get-Item Function:\Get-Variable -ErrorAction SilentlyContinue | Should -BeNullOrEmpty Get-Item Function:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty Get-Item Alias:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -BeNullOrEmpty (BadVerb-Variable -Name pid).Value | Should -Be $remotePid } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } It "Test warning is supressed by '-DisableNameChecking'" { try { $ps = [powershell]::Create().AddCommand("Import-PSSession", $true).AddParameter("Session", $session).AddParameter("CommandName", "BadVerb-Variable").AddParameter("DisableNameChecking", $true) $module = $ps.Invoke() | Select-Object -First 1 $ps.Streams.Error.Count | Should -Be 0 $ps.Streams.Warning.Count | Should -Be 0 } finally { if ($null -ne $module) { $ps.Commands.Clear() $ps.AddCommand("Remove-Module").AddParameter("ModuleInfo", $module).AddParameter("Force", $true) > $null $ps.Invoke() > $null } $ps.Dispose() } } It "Imported function with bad verb by 'Import-PSSession -DisableNameChecking' should work" { try { $module = Import-PSSession $session BadVerb-Variable -DisableNameChecking -AllowClobber $remotePid = Invoke-Command $session { $PID } $getVariablePid = Invoke-Command $session { (Get-Variable -Name PID).Value } $getVariablePid | Should -Be $remotePid Get-Item Function:\Get-Variable -ErrorAction SilentlyContinue | Should -BeNullOrEmpty Get-Item Function:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty Get-Item Alias:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -BeNullOrEmpty (BadVerb-Variable -Name pid).Value | Should -Be $remotePid } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } } Context "BadVerbs of alias shouldn't trigger a warning + can import an alias without saying -CommandType Alias" { BeforeAll { if ($skipTest) { return } Invoke-Command $session { Set-Alias BadVerb-Variable Get-Variable } } AfterAll { if ($skipTest) { return } Invoke-Command $session { Remove-Item Alias:\BadVerb-Variable } } It "Bad verb alias causes no error or warning" { try { $ps = [powershell]::Create().AddCommand("Import-PSSession", $true).AddParameter("Session", $session).AddParameter("CommandName", "BadVerb-Variable") $module = $ps.Invoke() | Select-Object -First 1 $ps.Streams.Error.Count | Should -Be 0 $ps.Streams.Warning.Count | Should -Be 0 } finally { if ($null -ne $module) { $ps.Commands.Clear() $ps.AddCommand("Remove-Module").AddParameter("ModuleInfo", $module).AddParameter("Force", $true) > $null $ps.Invoke() > $null } $ps.Dispose() } } It "Importing alias with bad verb should work" { try { $module = Import-PSSession $session BadVerb-Variable -AllowClobber $remotePid = Invoke-Command $session { $PID } $getVariablePid = Invoke-Command $session { (Get-Variable -Name PID).Value } $getVariablePid | Should -Be $remotePid Get-Item Function:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -BeNullOrEmpty Get-Item Alias:\BadVerb-Variable -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty (BadVerb-Variable -Name pid).Value | Should -Be $remotePid } finally { if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } } } It "Removing a module should clean-up event handlers (Windows 7: $oldNumberOfHandlers = $executionContext.GetType().GetProperty("Events").GetValue($executionContext, $null).Subscribers.Count $module = Import-PSSession -Session $session -Name Get-Random -AllowClobber Remove-Module $module -Force $newNumberOfHandlers = $executionContext.GetType().GetProperty("Events").GetValue($executionContext, $null).Subscribers.Count $oldNumberOfHandlers | Should -Be $newNumberOfHandlers @(Get-ChildItem function:*Implicit* -ErrorAction SilentlyContinue).Count | Should -Be 0 } } Describe "Export-PSSession function" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession $tempdir = Join-Path $env:TEMP ([IO.Path]::GetRandomFileName()) New-Item $tempdir -ItemType Directory > $null @" Import-Module `"$tempdir\Diag`" `$mod = Get-Module Diag Return `$mod "@ > $tempdir\TestBug450687.ps1 } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } if ($null -ne $tempdir) { Remove-Item $tempdir -Force -Recurse -ErrorAction SilentlyContinue } } It "Test the module created by Export-PSSession" { try { Export-PSSession -Session $session -OutputModule $tempdir\Diag -CommandName New-Guid -AllowClobber > $null $iss = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault2() $ps = [PowerShell]::Create($iss) $result = $ps.AddScript(" & $tempdir\TestBug450687.ps1").Invoke() ($null -ne $result -and $result.Count -eq 1 -and $result[0].Name -eq "Diag") | Should -BeTrue $c = $result[0].ExportedCommands["New-Guid"] ($null -ne $c -and $c.CommandType -eq "Function") | Should -BeTrue } finally { $ps.Dispose() } } } Describe "Implicit remoting with disconnected session" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession -Name Session102 $remotePid = Invoke-Command $session { $PID } $module = Import-PSSession $session Get-Variable -prefix Remote -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Remote session PID should be different" { $sessionPid = Get-RemoteVariable pid $sessionPid.Value | Should -Be $remotePid } It "Disconnected session should be reconnected when calling proxied command" { Disconnect-PSSession $session $dSessionPid = Get-RemoteVariable pid $dSessionPid.Value | Should -Be $remotePid $session.State | Should -Be 'Opened' } It "Should have a new session when the disconnected session cannot be re-connected" -Pending { Disconnect-PSSession $session Start-Process powershell -arg 'Get-PSSession -cn localhost -name Session102 | Connect-PSSession' -Wait Start-Sleep -Seconds 3 $dSessionPid = Get-RemoteVariable pid $dSessionPid.Value | Should -Not -Be $remotePid } } Describe "Select-Object with implicit remoting" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession Invoke-Command $session { function foo { "a","b","c" } } $module = Import-PSSession $session foo -AllowClobber } AfterAll { if ($skipTest) { return } if ($null -ne $module) { Remove-Module $module -Force -ErrorAction SilentlyContinue } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Select-Object -First should work with implicit remoting" { $bar = foo | Select-Object -First 2 $bar | Should -Not -BeNullOrEmpty $bar.Count | Should -Be 2 $bar[0] | Should -BeExactly "a" $bar[1] | Should -BeExactly "b" } } Describe "Get-FormatData used in Export-PSSession should work on DL targets" -tags "Feature","RequireAdminOnWindows" { BeforeAll { $skipThisTest = $skipTest -or $IsCoreCLR -or (! (Test-Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727')) -or (! (Test-Path 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine')) if ($skipThisTest) { return } $configName = "DLConfigTest" $null = Register-PSSessionConfiguration -Name $configName -PSVersion 2.0 -Force $session = New-RemoteSession -ConfigurationName $configName } AfterAll { if ($skipThisTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } Unregister-PSSessionConfiguration -Name $configName -Force -ErrorAction SilentlyContinue } It "Verifies that Export-PSSession with PS 2.0 session and format type names succeeds" -Skip:$skipThisTest { try { $results = Export-PSSession -Session $session -OutputModule tempTest -CommandName Get-Process ` -AllowClobber -FormatTypeName * -Force -ErrorAction Stop $results.Count | Should -Not -Be 0 } finally { if ($results.Count -gt 0) { Remove-Item -Path $results[0].DirectoryName -Recurse -Force -ErrorAction SilentlyContinue } } } } Describe "GetCommand locally and remotely" -tags "Feature","RequireAdminOnWindows" { BeforeAll { if ($skipTest) { return } $session = New-RemoteSession } AfterAll { if ($skipTest) { return } if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue } } It "Verifies that the number of local cmdlet command count is the same as remote cmdlet command count." { $localCommandCount = (Get-Command -Type Cmdlet).Count $remoteCommandCount = Invoke-Command { (Get-Command -Type Cmdlet).Count } $localCommandCount | Should -Be $remoteCommandCount } } Describe "Import-PSSession on Restricted Session" -tags "Feature","RequireAdminOnWindows","Slow" { BeforeAll { if ($skipTest) { return } $configName = "restricted_" + (Get-RandomFileName) New-PSSessionConfigurationFile -Path $TestDrive\restricted.pssc -SessionType RestrictedRemoteServer Register-PSSessionConfiguration -Path $TestDrive\restricted.pssc -Name $configName -Force $session = New-RemoteSession -ConfigurationName $configName } AfterAll { if ($skipTest) { return } if ($session -ne $null) { Remove-PSSession -Session $session -ErrorAction SilentlyContinue } Unregister-PSSessionConfiguration -Name $configName -Force -ErrorAction SilentlyContinue } It "Verifies that Import-PSSession works on a restricted session" { $errorVariable = $null try { $module = Import-PSSession -Session $session -AllowClobber -ErrorVariable $errorVariable -CommandName Get-Help } finally { if ($module -ne $null) { Remove-Module $module -Force -ErrorAction SilentlyContinue } } $errorVariable | Should -BeNullOrEmpty } } } finally { $global:PSDefaultParameterValues = $originalDefaultParameterValues $WarningPreference = $originalWarningPreference }
0
1859.ps1
function New-ModuleFromLayout { param( [Parameter(Mandatory=$true)] [hashtable] $Layout, [Parameter(Mandatory=$true)] [string] $BaseDir ) if (-not (Test-Path $BaseDir)) { $null = New-Item -Path $BaseDir -ItemType Directory } foreach ($item in $Layout.get_Keys()) { $itemPath = Join-Path $BaseDir $item $ext = [System.IO.Path]::GetExtension($item) switch ($ext) { '.psd1' { $moduleParameters = $Layout[$item] New-ModuleManifest -Path $itemPath @moduleParameters break } { '.psm1','.ps1' -contains $_ } { $null = New-Item -Path $itemPath -Value $Layout[$item] break } default { if ($Layout[$item] -is [hashtable]) { New-ModuleFromLayout -BaseDir $itemPath -Layout $Layout[$item] } break } } } } Describe "Manifest required module autoloading from module path with simple names" -Tags "CI" { BeforeAll { $prevModulePath = $env:PSModulePath $env:PSModulePath = ($TestDrive -as [string]) + [System.IO.Path]::PathSeparator + $env:PSModulePath $mainModule = 'mainmod' $requiredModule = 'reqmod' New-ModuleFromLayout -BaseDir $TestDrive -Layout @{ $mainModule = @{ "$mainModule.psd1" = @{ RequiredModules = $requiredModule } } $requiredModule = @{ "$requiredModule.psd1" = @{} } } } AfterAll { $env:PSModulePath = $prevModulePath Get-Module $mainModule,$requiredModule | Remove-Module } It "Importing main module loads required modules successfully" { $mainMod = Import-Module $mainModule -PassThru -ErrorAction Stop $reqMod = Get-Module -Name $requiredModule $mainMod.Name | Should -BeExactly $mainModule $mainMod.RequiredModules[0].Name | Should -Be $requiredModule $reqMod.Name | Should -BeExactly $requiredModule } } Describe "Manifest required module autoloading with relative path to dir" -Tags "CI" { BeforeAll { $mainModule = 'mainmod' $requiredModule = 'reqmod' $mainModPath = Join-Path $TestDrive $mainModule $altSep = [System.IO.Path]::AltDirectorySeparatorChar New-ModuleFromLayout -BaseDir $TestDrive -Layout @{ $mainModule = @{ "$mainModule.psd1" = @{ RequiredModules = "..${altSep}$requiredModule" } } $requiredModule = @{ "$requiredModule.psd1" = @{} } } } AfterAll { Get-Module $mainModule,$requiredModule | Remove-Module } It "Importing main module loads required modules successfully" { $mainMod = Import-Module $mainModPath -PassThru -ErrorAction Stop $reqMod = Get-Module -Name $requiredModule $mainMod.Name | Should -BeExactly $mainModule $mainMod.RequiredModules[0].Name | Should -Be $requiredModule $reqMod.Name | Should -BeExactly $requiredModule } } Describe "Manifest required module autoloading with relative path to manifest" -Tags "CI" { BeforeAll { $mainModule = 'mainmod' $requiredModule = 'reqmod' $mainModPath = Join-Path $TestDrive $mainModule "$mainModule.psd1" $altSep = [System.IO.Path]::AltDirectorySeparatorChar $sep = [System.IO.Path]::DirectorySeparatorChar New-ModuleFromLayout -BaseDir $TestDrive -Layout @{ $mainModule = @{ "$mainModule.psd1" = @{ RequiredModules = "..${altSep}$requiredModule${sep}$requiredModule.psd1" } } $requiredModule = @{ "$requiredModule.psd1" = @{} } } } AfterAll { Get-Module $mainModule,$requiredModule | Remove-Module } It "Importing main module loads required modules successfully" { $mainMod = Import-Module $mainModPath -PassThru -ErrorAction Stop $reqMod = Get-Module -Name $requiredModule $mainMod.Name | Should -BeExactly $mainModule $mainMod.RequiredModules[0].Name | Should -Be $requiredModule $reqMod.Name | Should -BeExactly $requiredModule } } Describe "Manifest required module autoloading with absolute path to dir" -Tags "CI" { BeforeAll { $mainModule = 'mainmod' $requiredModule = 'reqmod' $mainModPath = Join-Path $TestDrive $mainModule "$mainModule.psd1" $altSep = [System.IO.Path]::AltDirectorySeparatorChar $sep = [System.IO.Path]::DirectorySeparatorChar New-ModuleFromLayout -BaseDir $TestDrive -Layout @{ $mainModule = @{ "$mainModule.psd1" = @{ RequiredModules = "$TestDrive${altSep}$requiredModule${sep}" } } $requiredModule = @{ "$requiredModule.psd1" = @{} } } } AfterAll { Get-Module $mainModule,$requiredModule | Remove-Module } It "Importing main module loads required modules successfully" { $mainMod = Import-Module $mainModPath -PassThru -ErrorAction Stop $reqMod = Get-Module -Name $requiredModule $mainMod.Name | Should -BeExactly $mainModule $mainMod.RequiredModules[0].Name | Should -Be $requiredModule $reqMod.Name | Should -BeExactly $requiredModule } } Describe "Manifest required module autoloading with absolute path to manifest" -Tags "CI" { BeforeAll { $mainModule = 'mainmod' $requiredModule = 'reqmod' $mainModPath = Join-Path $TestDrive $mainModule "$mainModule.psd1" $altSep = [System.IO.Path]::AltDirectorySeparatorChar $sep = [System.IO.Path]::DirectorySeparatorChar New-ModuleFromLayout -BaseDir $TestDrive -Layout @{ $mainModule = @{ "$mainModule.psd1" = @{ RequiredModules = "$TestDrive${altSep}$requiredModule${sep}$requiredModule.psd1" } } $requiredModule = @{ "$requiredModule.psd1" = @{} } } } AfterAll { Get-Module $mainModule,$requiredModule | Remove-Module } It "Importing main module loads required modules successfully" { $mainMod = Import-Module $mainModPath -PassThru -ErrorAction Stop $reqMod = Get-Module -Name $requiredModule $mainMod.Name | Should -BeExactly $mainModule $mainMod.RequiredModules[0].Name | Should -Be $requiredModule $reqMod.Name | Should -BeExactly $requiredModule } }
0
3640.ps1
function Test-CreateJobCredential { $a1 = Create-ElasticJobAgentTestEnvironment try { Test-CreateJobCredentialWithDefaultParam $a1 Test-CreateJobCredentialWithParentObject $a1 Test-CreateJobCredentialWithParentResourceId $a1 Test-CreateJobCredentialWithPiping $a1 } finally { Remove-ResourceGroupForTest $a1 } } function Test-GetJobCredential { $a1 = Create-ElasticJobAgentTestEnvironment try { Test-GetJobCredentialWithDefaultParam $a1 Test-GetJobCredentialWithParentObject $a1 Test-GetJobCredentialWithParentResourceId $a1 Test-GetJobCredentialWithPiping $a1 } finally { Remove-ResourceGroupForTest $a1 } } function Test-UpdateJobCredential { $a1 = Create-ElasticJobAgentTestEnvironment try { Test-UpdateJobCredentialWithDefaultParam $a1 Test-UpdateJobCredentialWithInputObject $a1 Test-UpdateJobCredentialWithResourceId $a1 Test-UpdateJobCredentialWithPiping $a1 } finally { Remove-ResourceGroupForTest $a1 } } function Test-RemoveJobCredential { $a1 = Create-ElasticJobAgentTestEnvironment try { Test-RemoveJobCredentialWithDefaultParam $a1 Test-RemoveJobCredentialWithInputObject $a1 Test-RemoveJobCredentialWithResourceId $a1 Test-RemoveJobCredentialWithPiping $a1 } finally { Remove-ResourceGroupForTest $a1 } } function Test-CreateJobCredentialWithDefaultParam ($a1) { $cn1 = Get-JobCredentialName $c1 = Get-ServerCredential $resp = New-AzSqlElasticJobCredential -ResourceGroupName $a1.ResourceGroupName -ServerName $a1.ServerName -AgentName $a1.AgentName -Name $cn1 -Credential $c1 Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.CredentialName $cn1 Assert-AreEqual $resp.UserName $c1.UserName } function Test-CreateJobCredentialWithParentObject ($a1) { $cn1 = Get-JobCredentialName $c1 = Get-ServerCredential $resp = New-AzSqlElasticJobCredential -ParentObject $a1 -Name $cn1 -Credential $c1 Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.CredentialName $cn1 Assert-AreEqual $resp.UserName $c1.UserName } function Test-CreateJobCredentialWithParentResourceId ($a1) { $cn1 = Get-JobCredentialName $c1 = Get-ServerCredential $resp = New-AzSqlElasticJobCredential -ParentResourceId $a1.ResourceId -Name $cn1 -Credential $c1 Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.CredentialName $cn1 Assert-AreEqual $resp.UserName $c1.UserName } function Test-CreateJobCredentialWithPiping ($a1) { $cn1 = Get-JobCredentialName $c1 = Get-ServerCredential $resp = $a1 | New-AzSqlElasticJobCredential -Name $cn1 -Credential $c1 Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.CredentialName $cn1 Assert-AreEqual $resp.UserName $c1.UserName } function Test-UpdateJobCredentialWithDefaultParam ($a1) { $jc1 = Create-JobCredentialForTest $a1 $newCred = Get-Credential $resp = Set-AzSqlElasticJobCredential -ResourceGroupName $a1.ResourceGroupName -ServerName $a1.ServerName -AgentName $a1.AgentName -Name $jc1.CredentialName -Credential $newCred Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $newCred.UserName } function Test-UpdateJobCredentialWithInputObject ($a1) { $jc1 = Create-JobCredentialForTest $a1 $newCred = Get-Credential $resp = Set-AzSqlElasticJobCredential -InputObject $jc1 -Credential $newCred Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $newCred.UserName } function Test-UpdateJobCredentialWithResourceId ($a1) { $jc1 = Create-JobCredentialForTest $a1 $newCred = Get-Credential $resp = Set-AzSqlElasticJobCredential -ResourceId $jc1.ResourceId -Credential $newCred Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $newCred.UserName } function Test-UpdateJobCredentialWithPiping ($a1) { $jc1 = Create-JobCredentialForTest $a1 $newCred = Get-Credential $resp = $jc1 | Set-AzSqlElasticJobCredential -Credential $newCred Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $newCred.UserName } function Test-GetJobCredentialWithDefaultParam ($a1) { $jc1 = Create-JobCredentialForTest $a1 $jc2 = Create-JobCredentialForTest $a1 $resp = Get-AzSqlElasticJobCredential -ResourceGroupName $a1.ResourceGroupName -ServerName $a1.ServerName -AgentName $a1.AgentName -Name $jc1.CredentialName Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName $resp = Get-AzSqlElasticJobCredential -ResourceGroupName $a1.ResourceGroupName -ServerName $a1.ServerName -AgentName $a1.AgentName Assert-True { $resp.Count -ge 2 } } function Test-GetJobCredentialWithParentObject ($a1) { $jc1 = Create-JobCredentialForTest $a1 $jc2 = Create-JobCredentialForTest $a1 $resp = Get-AzSqlElasticJobCredential -ParentObject $a1 -Name $jc1.CredentialName Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName $resp = Get-AzSqlElasticJobCredential -ParentObject $a1 Assert-True { $resp.Count -ge 2 } } function Test-GetJobCredentialWithParentResourceId ($a1) { $jc1 = Create-JobCredentialForTest $a1 $jc2 = Create-JobCredentialForTest $a1 $resp = Get-AzSqlElasticJobCredential -ParentResourceId $a1.ResourceId -Name $jc1.CredentialName Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName $resp = Get-AzSqlElasticJobCredential -ParentResourceId $a1.ResourceId Assert-True { $resp.Count -ge 2 } } function Test-GetJobCredentialWithPiping ($a1) { $jc1 = Create-JobCredentialForTest $a1 $jc2 = Create-JobCredentialForTest $a1 $resp = $a1 | Get-AzSqlElasticJobCredential -Name $jc1.CredentialName Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName $resp = $a1 | Get-AzSqlElasticJobCredential Assert-True { $resp.Count -ge 2 } } function Test-RemoveJobCredentialWithDefaultParam ($a1) { $jc1 = Create-JobCredentialForTest $a1 $resp = Remove-AzSqlElasticJobCredential -ResourceGroupName $a1.ResourceGroupName -ServerName $a1.ServerName -AgentName $a1.AgentName -Name $jc1.CredentialName Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName } function Test-RemoveJobCredentialWithInputObject ($a1) { $jc1 = Create-JobCredentialForTest $a1 $resp = Remove-AzSqlElasticJobCredential -InputObject $jc1 Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName } function Test-RemoveJobCredentialWithResourceId ($a1) { $jc1 = Create-JobCredentialForTest $a1 $resp = Remove-AzSqlElasticJobCredential -ResourceId $jc1.ResourceId Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName } function Test-RemoveJobCredentialWithPiping ($a1) { $jc1 = Create-JobCredentialForTest $a1 $jc2 = Create-JobCredentialForTest $a1 $resp = $jc1 | Remove-AzSqlElasticJobCredential Assert-AreEqual $resp.ResourceGroupName $a1.ResourceGroupName Assert-AreEqual $resp.ServerName $a1.ServerName Assert-AreEqual $resp.AgentName $a1.AgentName Assert-AreEqual $resp.CredentialName $jc1.CredentialName Assert-AreEqual $resp.UserName $jc1.UserName $all = $a1 | Get-AzSqlElasticJobCredential $resp = $all | Remove-AzSqlElasticJobCredential Assert-True { $resp.Count -ge 1 } Assert-Throws { $a1 | Get-AzSqlElasticJobCredential -Name $jc1.CredentialName } }
0
Get-Codecs.ps1
[string[]]$key = "SOFTWARE\\Classes\\CLSID\\{083863F1-70DE-11d0-BD40-00A0C911CE86}\\Instance", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32" function ModuleInfo([string]$path) { $item.SubItems.Add((gci $path).VersionInfo.CompanyName) $item.SubItems.Add((gci $path).VersionInfo.FileDescription) } function ItemsCount { $sbCount.Text = $lvPage1.Items.Count.ToString() + " item(s)" } $mnuScan_Click= { #clear both ListView before each scan $lvPage1.Items.Clear() $lvPage2.Items.Clear() <# Do not use Get-ChildItem cmdlet if you want quick scan! #> $reg = [Microsoft.Win32.Registry]::LocalMachine $rk = $reg.OpenSubKey($key[0]) $rk.GetSubKeyNames() | % { #adding name of filters $name = $reg.OpenSubKey($($key[0] + "\\" + $_)) $item = $lvPage1.Items.Add($name.GetValue("FriendlyName")) $name.Close() #adding its CLSID $item.SubItems.Add($_) #adding path and additional info of filters $path = $reg.OpenSubKey($("SOFTWARE\\Classes\\CLSID\\" + "\\" + $_ + "\\InprocServer32")) $item.SubItems.Add($path.GetValue("")) ModuleInfo($path.GetValue("")) $path.Close() } $rk.Close() $rk = $reg.OpenSubKey($key[1]) $rk.GetValueNames() | % { $item = $lvPage2.Items.Add($_) #hypothetical directory $file = $rk.GetValue($_) if (-not (Test-Path $file)) { #another possible directory of driver $pos = [Environment]::SystemDirectory + "\\" + $file if (Test-Path $pos) { $item.SubItems.Add($pos) ModuleInfo($pos) } } else { $item.SubItems.Add($file) ModuleInfo($file) } } $rk.Close() ItemsCount } $tcPage2_Enter= { $sbCount.Text = $lvPage2.Items.Count.ToString() + " item(s)" } #this is about form load function $frmMain_Load= { try { $icon = [Drawing.Icon]::ExtractAssociatedIcon($($pshome + "\\powershell.exe")) $pbImage.Image = $icon.ToBitmap() } catch {} } function frmMain_Show { Add-Type -AssemblyName System.Windows.Forms [Windows.Forms.Application]::EnableVisualStyles() $frmMain = New-Object Windows.Forms.Form $mnuMain = New-Object Windows.Forms.MainMenu $mnuFile = New-Object Windows.Forms.MenuItem $mnuScan = New-Object Windows.Forms.MenuItem $mnuExit = New-Object Windows.Forms.MenuItem $mnuHelp = New-Object Windows.Forms.MenuItem $mnuInfo = New-Object Windows.Forms.MenuItem $tabCtrl = New-Object Windows.Forms.TabControl $tcPage1 = New-Object Windows.Forms.TabPage $lvPage1 = New-Object Windows.Forms.ListView $chFName = New-Object Windows.Forms.ColumnHeader $chCLSID = New-Object Windows.Forms.ColumnHeader $chFPath = New-Object Windows.Forms.ColumnHeader $chFPubl = New-Object Windows.Forms.ColumnHeader $chFDesc = New-Object Windows.Forms.ColumnHeader $tcPage2 = New-Object Windows.Forms.TabPage $lvPage2 = New-Object Windows.Forms.ListView $chDName = New-Object Windows.Forms.ColumnHeader $chDPath = New-Object Windows.Forms.ColumnHeader $chDPubl = New-Object Windows.Forms.ColumnHeader $chDDesc = New-Object Windows.Forms.ColumnHeader $sbCount = New-Object Windows.Forms.StatusBar # #mnuMain # $mnuMain.MenuItems.AddRange(@($mnuFile, $mnuHelp)) # #mnuFile # $mnuFile.MenuItems.AddRange(@($mnuScan, $mnuExit)) $mnuFile.Text = "&File" # #mnuScan # $mnuScan.Shortcut = "F5" $mnuScan.Text = "&Scan" $mnuScan.Add_Click($mnuScan_Click) # #mnuExit # $mnuExit.Shortcut = "CtrlX" $mnuExit.Text = "E&xit" $mnuExit.Add_Click({$frmMain.Close()}) # #mnuHelp # $mnuHelp.MenuItems.AddRange(@($mnuInfo)) $mnuHelp.Text = "&Help" # #mnuInfo # $mnuInfo.Text = "About" $mnuInfo.Add_Click({frmAbout_Show}) # #tabCtrl # $tabCtrl.Controls.AddRange(@($tcPage1, $tcPage2)) $tabCtrl.Dock = "Fill" # #tcPage1 # $tcPage1.Controls.AddRange(@($lvPage1)) $tcPage1.Text = "DirectShow" $tcPage1.UseVisualStyleBackColor = $true $tcPage1.Add_Enter($tcPage1_Enter) # #lvPage1 # $lvPage1.AllowColumnReorder = $true $lvPage1.Columns.AddRange(@($chFName, $chCLSID, $chFPath, $chFPubl, $chFDesc)) $lvPage1.Dock = "Fill" $lvPage1.FullRowSelect = $true $lvPage1.GridLines = $false $lvPage1.MultiSelect = $false $lvPage1.ShowItemToolTips = $true $lvPage1.Sorting = "Ascending" $lvPage1.View = "Details" # #chFName # $chFName.Text = "Name" $chFName.Width = 110 # #chCLSID # $chCLSID.Text = "CLSID" $chCLSID.Width = 241 # #chFPath # $chFPath.Text = "Path" $chFPath.Width = 215 # #chFPubl # $chFPubl.Text = "Publisher" $chFPubl.Width = 145 # #chFDesc # $chFDesc.Text = "Description" $chFDesc.Width = 300 # #tcPage2 # $tcPage2.Controls.AddRange(@($lvPage2)) $tcPage2.Text = "Drivers" $tcPage2.UseVisualStyleBackColor = $true $tcPage2.Add_Enter($tcPage2_Enter) # #lvPage2 # $lvPage2.AllowColumnReorder = $true $lvPage2.Columns.AddRange(@($chDName, $chDPath, $chDPubl, $chDDesc)) $lvPage2.Dock = "Fill" $lvPage2.FullRowSelect = $true $lvPage2.GridLines = $false $lvPage2.MultiSelect = $false $lvPage2.ShowItemToolTips = $true $lvPage2.Sorting = "Ascending" $lvPage2.View = "Details" # #chDName # $chDName.Text = "Name" $chDName.Width = 100 # #chDPath # $chDPath.Text = "Path" $chDPath.Width = 210 # #chDPubl # $chDPubl.Text = "Publisher" $chDPubl.Width = 145 # #chDDesc # $chDDesc.Text = "Description" $chDDesc.Width = 300 # #sbCount # $sbCount.SizingGrip = $false # #frmMain # $frmMain.ClientSize = New-Object Drawing.Size(573, 217) $frmMain.Controls.AddRange(@($tabCtrl, $sbCount)) $frmMain.Menu = $mnuMain $frmMain.StartPosition = "CenterScreen" $frmMain.Text = "Codecs" [void]$frmMain.ShowDialog() } function frmAbout_Show { $frmMain = New-Object Windows.Forms.Form $pbImage = New-Object Windows.Forms.PictureBox $lblName = New-Object Windows.Forms.Label $lblCopy = New-Object Windows.Forms.Label $btnExit = New-Object Windows.Forms.Button # #pbImage # $pbImage.Location = New-Object Drawing.Point(16, 16) $pbImage.Size = New-Object Drawing.Size(32, 32) $pbImage.SizeMode = "StretchImage" # #lblName # $lblName.Font = New-Object Drawing.Font("Microsoft Sans Serif", 9, [Drawing.FontStyle]::Bold) $lblName.Location = New-Object Drawing.Size(53, 19) $lblName.Size = New-Object Drawing.Size(360, 18) $lblName.Text = "Codecs v1.00" # #lblCopy # $lblCopy.Location = New-Object Drawing.Point(67, 37) $lblCopy.Size = New-Object Drawing.Size(360, 23) $lblCopy.Text = "(C) 2012 Greg Zakharov gregzakh@gmail.com" # #btnExit # $btnExit.Location = New-Object Drawing.Point(135, 67) $btnExit.Text = "OK" # #frmMain # $frmMain.AcceptButton = $btnExit $frmMain.CancelButton = $btnExit $frmMain.ClientSize = New-Object Drawing.Size(350, 110) $frmMain.ControlBox = $false $frmMain.Controls.AddRange(@($pbImage, $lblName, $lblCopy, $btnExit)) $frmMain.FormBorderStyle = "FixedSingle" $frmMain.ShowInTaskbar = $false $frmMain.StartPosition = "CenterScreen" $frmMain.Text = "About..." $frmMain.Add_Load($frmMain_Load) [void]$frmMain.ShowDialog() } frmMain_Show
0
sample_48_2.ps1
function Invoke-RunTests { Param( [Parameter(Mandatory = $true)] $ContainerName, [Parameter(Mandatory = $false)] $Tenant, [Parameter(Mandatory = $true)] $CompanyName, [Parameter(Mandatory = $false)] [pscredential]$Credential, [Parameter(Mandatory = $true)] [Guid]$ExtensionId, [Parameter(Mandatory = $false)] [ValidateSet('All,Codeunit,Test')] [string]$Tests = 'All', [Parameter(Mandatory = $false)] [string]$TestCodeunit = '', [Parameter(Mandatory = $false)] [string]$TestFunction = '', [Parameter(Mandatory = $false)] [string]$TestSuiteName = '', [Parameter(Mandatory = $false)] [string]$ExtensionName, [Parameter(Mandatory = $false)] [switch]$GetCodeCoverage, [Parameter(Mandatory=$false)] [int]$TestRunnerCodeunitId = 130450, [Parameter(Mandatory = $false)] $DisabledTests, [Parameter(Mandatory = $false)] $Culture = 'en-US', [Parameter(Mandatory = $false)] $LaunchConfig, [switch]$GetPerformanceProfile ) $ResultId = [Guid]::NewGuid().Guid + ".xml" $ResultFile = Join-Path (Split-Path (Get-ALTestRunnerConfigPath) -Parent) $ResultId $LastResultFile = Join-Path (Split-Path (Get-ALTestRunnerConfigPath) -Parent) 'last.xml' $ContainerResultFile = Join-Path (Get-ContainerResultPath -LaunchConfig $LaunchConfig) $ResultId $Message = "Running tests on $ContainerName, company $CompanyName" $Params = @{ containerName = $ContainerName companyName = $CompanyName XUnitResultFileName = $ContainerResultFile culture = $Culture } if ($null -ne $Credential) { $Params.Add('credential', $Credential) } if ($Tenant) { $Params.Add('tenant', $Tenant) $Message += ", tenant $Tenant" } if ($TestCodeunit -ne '') { $Params.Add('testCodeunit', $TestCodeunit) $Message += ", codeunit $TestCodeunit" } if ($TestFunction -ne '') { $Params.Add('testFunction', $TestFunction) $Message += ", function $TestFunction" } if ($TestSuiteName -ne '') { $Params.Add('testSuite', $TestSuiteName) $Message += ", suite $TestSuiteName" } else { $Params.Add('extensionId', $ExtensionId) $Message += ", extension {0}" -f $ExtensionName } if ($TestRunnerCodeunitId -ne 0) { $Params.Add('testRunnerCodeunitId', $TestRunnerCodeunitId) $Message += ", test runner $TestRunnerCodeunitId" } if ($null -ne $DisabledTests) { $Params.Add('disabledTests', $DisabledTests) } $Message += ", culture $Culture" [int]$AttemptNo = 1 [bool]$BreakTestLoop = $false while (!$BreakTestLoop) { try { Write-Host $Message -ForegroundColor Green $refreshToken = Get-ValueFromALTestRunnerConfig -KeyName 'refreshToken' if ($null -ne $refreshToken) { $authContext = New-BcAuthContext -refreshToken $refreshToken $Params.Add('bcAuthContext', $authContext) } Invoke-CommandOnDockerHost { Param($Params) Run-TestsInBCContainer @Params -detailed -Verbose } -Parameters $Params if (Get-DockerHostIsRemote) { $Session = Get-DockerHostSession Invoke-CommandOnDockerHost { Param($ContainerResultFile, $ResultId) if (Test-Path $ContainerResultFile) { if (-not (Test-Path 'C:\BCContainerTests\')) { New-Item -Path 'C:\' -Name BCContainerTests -ItemType Directory -Force | Out-Null } Copy-FileFromBCContainer -containerName $ContainerName -containerPath $ContainerResultFile -localPath (Join-Path 'C:\BCContainerTests' $ResultId) } else { throw 'Tests have not been run' } } -Parameters ($ContainerResultFile, $ResultId) if ($GetCodeCoverage.IsPreset) { Get-CodeCoverage -LaunchConfig $LaunchConfig } if ($GetPerformanceProfile.IsPresent) { Get-PerformanceProfile -LaunchConfig $LaunchConfig } Write-Host "Copy C:\BCContainerTests\$ResultId to $LastResultFile" Copy-Item -FromSession $Session -Path "C:\BCContainerTests\$ResultId" -Destination $ResultFile Copy-Item -Path $ResultFile -Destination $LastResultFile } else { if (Test-Path $ContainerResultFile) { if ($GetCodeCoverage.IsPresent) { Get-CodeCoverage -LaunchConfig $LaunchConfig } if ($GetPerformanceProfile.IsPresent) { Get-PerformanceProfile -LaunchConfig $LaunchConfig } Copy-FileFromBCContainer -containerName $ContainerName -containerPath $ContainerResultFile -localPath $ResultFile Copy-Item -Path $ResultFile -Destination $LastResultFile } else { throw 'Tests have not been run' } } Merge-ALTestRunnerTestResults -ResultsFile $ResultFile -ToPath (Join-Path (Split-Path (Get-ALTestRunnerConfigPath) -Parent) 'Results') Remove-Item $ResultFile if (!(Get-DockerHostIsRemote)) { Remove-Item $ContainerResultFile } $BreakTestLoop = $true } catch { $AttemptNo++ Write-Host "Error occurred ($_)" -ForegroundColor Magenta Write-Host "Testing company set in config file exists in the container" -ForegroundColor Cyan $NewCompanyName = Test-CompanyExists -LaunchConfig $LaunchConfig if (![string]::IsNullOrEmpty($NewCompanyName)) { $Params.Remove('companyName') $Params.Add('companyName', $NewCompanyName) } if ($AttemptNo -ge 3) { $BreakTestLoop = $true } } } } Export-ModuleMember -Function Invoke-RunTests
0
Xml Module _1.6.ps1
#requires -version 2.0 # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace http`://poshcode.org/1492 # to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations # and prefixes are removed from all XML nodes (by an XSL transform) before searching. # IMPORTANT: returned results *will not* have namespaces in them, even if the input XML did. # Also, only raw XmlNodes are returned from this function, so the output isn't completely compatible # with the built in Select-Xml. It's equivalent to using Select-Xml ... | Select-Object -Expand Node # Version History: # Select-Xml 2.0 This was the first script version I wrote. # it didn't function identically to the built-in Select-Xml with regards to parameter parsing # Select-Xml 2.1 Matched the built-in Select-Xml parameter sets, it's now a drop-in replacement # BUT only if you were using the original with: Select-Xml ... | Select-Object -Expand Node # Select-Xml 2.2 Fixes a bug in the -Content parameterset where -RemoveNamespace was *presumed* # Version 3.0 Added New-XDocument and associated generation functions for my XML DSL # Version 3.1 Fixed a really ugly bug in New-XDocument in 3.0 which I should not have released # Version 4.0 Never content to leave well enough alone, I've completely reworked New-XDocument # Version 4.1 Tweaked namespaces again so they don't cascade down when they shouldn't. Got rid of the unnecessary stack. # Version 4.2 Tightened xml: only cmdlet, function, and external scripts, with "-" in their names are exempted from being converted into xml tags. # Fixed some alias error messages caused when PSCX is already loaded (we overwrite their aliases for cvxml and fxml) # Version 4.3 Added a Path parameter set to Format-XML so you can specify xml files for prety printing # Version 4.5 Fixed possible [Array]::Reverse call on a non-array in New-XElement (used by New-XDocument) # Work around possible variable slipping on null values by: # 1) allowing -param:$value syntax (which doesn't fail when $value is null) # 2) testing for -name syntax on the value and using it as an attribute instead # Version 4.6 Added -Arguments to Convert-Xml so that you can pass arguments to XSLT transforms! # Note: when using strings for xslt, make sure you single quote them or escape the $ signs. # Version 4.7 Fixed a typo in the namespace parameter of Select-Xml $xlr8r = [psobject].assembly.gettype("System.Management.Automation.TypeAccelerators") $xlinq = [Reflection.Assembly]::Load("System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") $xlinq.GetTypes() | ? { $_.IsPublic -and !$_.IsSerializable -and $_.Name -ne "Extensions" -and !$xlr8r::Get[$_.Name] } | % { $xlr8r::Add( $_.Name, $_.FullName ) } if(!$xlr8r::Get["Stack"]) { $xlr8r::Add( "Stack", "System.Collections.Generic.Stack``1, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" ) } if(!$xlr8r::Get["Dictionary"]) { $xlr8r::Add( "Dictionary", "System.Collections.Generic.Dictionary``2, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" ) } if(!$xlr8r::Get["PSParser"]) { $xlr8r::Add( "PSParser", "System.Management.Automation.PSParser, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ) } filter Format-XML { #.Synopsis # Pretty-print formatted XML source #.Description # Runs an XmlDocument through an auto-indenting XmlWriter #.Parameter Xml # The Xml Document #.Parameter Path # The path to an xml document (on disc or any other content provider). #.Parameter Indent # The indent level (defaults to 2 spaces) #.Example # [xml]$xml = get-content Data.xml # C:\\PS>Format-Xml $xml #.Example # get-content Data.xml | Format-Xml #.Example # Format-Xml C:\\PS\\Data.xml #.Example # ls *.xml | Format-Xml # [CmdletBinding()] Param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true, ParameterSetName="Document")] [xml]$Xml , [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, ParameterSetName="File")] [Alias("PsPath")] [string]$Path , [Parameter(Mandatory=$false)] $Indent=2 ) ## Load from file, if necessary if($Path) { [xml]$xml = Get-Content $Path } $StringWriter = New-Object System.IO.StringWriter $XmlWriter = New-Object System.Xml.XmlTextWriter $StringWriter $xmlWriter.Formatting = "indented" $xmlWriter.Indentation = $Indent $xml.WriteContentTo($XmlWriter) $XmlWriter.Flush() $StringWriter.Flush() Write-Output $StringWriter.ToString() } Set-Alias fxml Format-Xml -EA 0 function Select-Xml { #.Synopsis # The Select-XML cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the Content, Path, or Xml parameter to specify the XML to be searched. #.Description # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations and prefixes are removed from all XML nodes (by an XSL transform) before searching. # # However, only raw XmlNodes are returned from this function, so the output isn't currently compatible with the built in Select-Xml, but is equivalent to using Select-Xml ... | Select-Object -Expand Node # # Also note that if the -RemoveNamespace switch is supplied the returned results *will not* have namespaces in them, even if the input XML did, and entities get expanded automatically. #.Parameter Content # Specifies a string that contains the XML to search. You can also pipe strings to Select-XML. #.Parameter Namespace # Specifies a hash table of the namespaces used in the XML. Use the format @{<namespaceName> = <namespaceUri>}. #.Parameter Path # Specifies the path and file names of the XML files to search. Wildcards are permitted. #.Parameter Xml # Specifies one or more XML nodes to search. #.Parameter XPath # Specifies an XPath search query. The query language is case-sensitive. This parameter is required. #.Parameter RemoveNamespace # Allows the execution of XPath queries without namespace qualifiers. # # If you specify the -RemoveNamespace switch, all namespace declarations and prefixes are actually removed from the Xml before the XPath search query is evaluated, and your XPath query should therefore NOT contain any namespace prefixes. # # Note that this means that the returned results *will not* have namespaces in them, even if the input XML did, and entities get expanded automatically. [CmdletBinding(DefaultParameterSetName="Xml")] PARAM( [Parameter(Position=1,ParameterSetName="Path",Mandatory=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("PSPath")] [String[]]$Path , [Parameter(Position=1,ParameterSetName="Xml",Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("Node")] [System.Xml.XmlNode[]]$Xml , [Parameter(ParameterSetName="Content",Mandatory=$true,ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [String[]]$Content , [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$false)] [ValidateNotNullOrEmpty()] [Alias("Query")] [String[]]$XPath , [Parameter(Mandatory=$false)] [ValidateNotNullOrEmpty()] [Hashtable]$Namespace , [Switch]$RemoveNamespace ) BEGIN { function Select-Node { PARAM([Xml.XmlNode]$Xml, [String[]]$XPath, $NamespaceManager) BEGIN { foreach($node in $xml) { if($NamespaceManager -is [Hashtable]) { $nsManager = new-object System.Xml.XmlNamespaceManager $node.NameTable foreach($ns in $Namespace.GetEnumerator()) { $nsManager.AddNamespace( $ns.Key, $ns.Value ) } } foreach($path in $xpath) { $node.SelectNodes($path, $nsManager) } } } } [Text.StringBuilder]$XmlContent = [String]::Empty } PROCESS { $NSM = $Null; if($PSBoundParameters.ContainsKey("Namespace")) { $NSM = $Namespace } switch($PSCmdlet.ParameterSetName) { "Content" { $null = $XmlContent.AppendLine( $Content -Join "`n" ) } "Path" { foreach($file in Get-ChildItem $Path) { [Xml]$Xml = Get-Content $file if($RemoveNamespace) { $Xml = Remove-XmlNamespace $Xml } Select-Node $Xml $XPath $NSM } } "Xml" { foreach($node in $Xml) { if($RemoveNamespace) { $node = Remove-XmlNamespace $node } Select-Node $node $XPath $NSM } } } } END { if($PSCmdlet.ParameterSetName -eq "Content") { [Xml]$Xml = $XmlContent.ToString() if($RemoveNamespace) { $Xml = Remove-XmlNamespace $Xml } Select-Node $Xml $XPath $NSM } } } Set-Alias slxml Select-Xml -EA 0 function Convert-Node { #.Synopsis # Convert a single XML Node via XSL stylesheets [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [System.Xml.XmlReader]$XmlReader , [Parameter(Position=1,Mandatory=$true,ValueFromPipeline=$false)] [System.Xml.Xsl.XslCompiledTransform]$StyleSheet , [Parameter(Position=2,Mandatory=$false)] [Alias("Parameters")] [hashtable]$Arguments ) PROCESS { $output = New-Object IO.StringWriter $argList = $null if($Arguments) { $argList = New-Object System.Xml.Xsl.XsltArgumentList foreach($arg in $Arguments.GetEnumerator()) { $namespace, $name = $arg.Key -split ":" ## Fix namespace if(!$name) { $name = $Namespace $namespace = "" } Write-Verbose "ns:$namespace name:$name value:$($arg.Value)" $argList.AddParam($name,"$namespace",$arg.Value) } } $StyleSheet.Transform( $XmlReader, $argList, $output ) Write-Output $output.ToString() } } function Convert-Xml { #.Synopsis # The Convert-XML function lets you use Xslt to transform XML strings and documents. #.Description #.Parameter Content # Specifies a string that contains the XML to search. You can also pipe strings to Select-XML. #.Parameter Namespace # Specifies a hash table of the namespaces used in the XML. Use the format @{<namespaceName> = <namespaceUri>}. #.Parameter Path # Specifies the path and file names of the XML files to search. Wildcards are permitted. #.Parameter Xml # Specifies one or more XML nodes to search. #.Parameter Xsl # Specifies an Xml StyleSheet to transform with... [CmdletBinding(DefaultParameterSetName="Xml")] PARAM( [Parameter(Position=1,ParameterSetName="Path",Mandatory=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("PSPath")] [String[]]$Path , [Parameter(Position=1,ParameterSetName="Xml",Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("Node")] [System.Xml.XmlNode[]]$Xml , [Parameter(ParameterSetName="Content",Mandatory=$true,ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [String[]]$Content , [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$false)] [ValidateNotNullOrEmpty()] [Alias("StyleSheet")] [String[]]$Xslt , [Alias("Parameters")] [hashtable]$Arguments ) BEGIN { $StyleSheet = New-Object System.Xml.Xsl.XslCompiledTransform if(Test-Path @($Xslt)[0] -EA 0) { Write-Verbose "Loading Stylesheet from $(Resolve-Path @($Xslt)[0])" $StyleSheet.Load( (Resolve-Path @($Xslt)[0]) ) } else { $OFS = "`n" Write-Verbose "$Xslt" $StyleSheet.Load(([System.Xml.XmlReader]::Create((New-Object System.IO.StringReader "$Xslt" )) )) } [Text.StringBuilder]$XmlContent = [String]::Empty } PROCESS { switch($PSCmdlet.ParameterSetName) { "Content" { $null = $XmlContent.AppendLine( $Content -Join "`n" ) } "Path" { foreach($file in Get-ChildItem $Path) { Convert-Node -Xml ([System.Xml.XmlReader]::Create((Resolve-Path $file))) $StyleSheet $Arguments } } "Xml" { foreach($node in $Xml) { Convert-Node -Xml (New-Object Xml.XmlNodeReader $node) $StyleSheet $Arguments } } } } END { if($PSCmdlet.ParameterSetName -eq "Content") { [Xml]$Xml = $XmlContent.ToString() Convert-Node -Xml $Xml $StyleSheet $Arguments } } } Set-Alias cvxml Convert-Xml -EA 0 function Remove-XmlNamespace { #.Synopsis # Removes namespace definitions and prefixes from xml documents #.Description # Runs an xml document through an XSL Transformation to remove namespaces from it if they exist. # Entities are also naturally expanded #.Parameter Content # Specifies a string that contains the XML to transform. #.Parameter Path # Specifies the path and file names of the XML files to transform. Wildcards are permitted. # # There will bne one output document for each matching input file. #.Parameter Xml # Specifies one or more XML documents to transform [CmdletBinding(DefaultParameterSetName="Xml")] PARAM( [Parameter(Position=1,ParameterSetName="Path",Mandatory=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("PSPath")] [String[]]$Path , [Parameter(Position=1,ParameterSetName="Xml",Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("Node")] [System.Xml.XmlNode[]]$Xml , [Parameter(ParameterSetName="Content",Mandatory=$true,ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [String[]]$Content , [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$false)] [ValidateNotNullOrEmpty()] [Alias("StyleSheet")] [String[]]$Xslt ) BEGIN { $StyleSheet = New-Object System.Xml.Xsl.XslCompiledTransform $StyleSheet.Load(([System.Xml.XmlReader]::Create((New-Object System.IO.StringReader @" <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/|comment()|processing-instruction()"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="*"> <xsl:element name="{local-name()}"> <xsl:apply-templates select="@*|node()"/> </xsl:element> </xsl:template> <xsl:template match="@*"> <xsl:attribute name="{local-name()}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> </xsl:stylesheet> "@)))) [Text.StringBuilder]$XmlContent = [String]::Empty } PROCESS { switch($PSCmdlet.ParameterSetName) { "Content" { $null = $XmlContent.AppendLine( $Content -Join "`n" ) } "Path" { foreach($file in Get-ChildItem $Path) { [Xml]$Xml = Get-Content $file Convert-Node -Xml $Xml $StyleSheet } } "Xml" { $Xml | Convert-Node $StyleSheet } } } END { if($PSCmdlet.ParameterSetName -eq "Content") { [Xml]$Xml = $XmlContent.ToString() Convert-Node -Xml $Xml $StyleSheet } } } Set-Alias rmns Remove-XmlNamespace -EA 0 function New-XDocument { #.Synopsis # Creates a new XDocument (the new xml document type) #.Description # This is the root for a new XML mini-dsl, akin to New-BootsWindow for XAML # It creates a new XDocument, and takes scritpblock(s) to define it's contents #.Parameter root # The root node name #.Parameter version # Optional: the XML version. Defaults to 1.0 #.Parameter encoding # Optional: the Encoding. Defaults to UTF-8 #.Parameter standalone # Optional: whether to specify standalone in the xml declaration. Defaults to "yes" #.Parameter args # this is where all the dsl magic happens. Please see the Examples. :) # #.Example # [string]$xml = New-XDocument rss -version "2.0" { # channel { # title {"Test RSS Feed"} # link {"http`://HuddledMasses.org"} # description {"An RSS Feed generated simply to demonstrate my XML DSL"} # item { # title {"The First Item"} # link {"http`://huddledmasses.org/new-site-new-layout-lost-posts/"} # guid -isPermaLink true {"http`://huddledmasses.org/new-site-new-layout-lost-posts/"} # description {"Ema Lazarus' Poem"} # pubDate {(Get-Date 10/31/2003 -f u) -replace " ","T"} # } # } # } # # C:\\PS>$xml.Declaration.ToString() ## I can't find a way to have this included in the $xml.ToString() # C:\\PS>$xml.ToString() # # <?xml version="1.0" encoding="UTF-8" standalone="yes"?> # <rss version="2.0"> # <channel> # <title>Test RSS Feed</title> # <link>http ://HuddledMasses.org</link> # <description>An RSS Feed generated simply to demonstrate my XML DSL</description> # <item> # <title>The First Item</title> # <link>http ://huddledmasses.org/new-site-new-layout-lost-posts/</link> # <guid isPermaLink="true">http ://huddledmasses.org/new-site-new-layout-lost-posts/</guid> # <description>Ema Lazarus' Poem</description> # <pubDate>2003-10-31T00:00:00Z</pubDate> # </item> # </channel> # </rss> # # # Description # ----------- # This example shows the creation of a complete RSS feed with a single item in it. # # NOTE that the backtick in the http`: in the URLs in the input is unecessary, and I added the space after the http: in the URLs in the output -- these are accomodations to PoshCode's spam filter. Backticks are not need in the input, and spaces do not appear in the actual output. # # #.Example # [XNamespace]$atom="http`://www.w3.org/2005/Atom" # C:\\PS>[XNamespace]$dc = "http`://purl.org/dc/elements/1.1" # # C:\\PS>New-XDocument ($atom + "feed") -Encoding "UTF-16" -$([XNamespace]::Xml +'lang') "en-US" -dc $dc { # title {"Test First Entry"} # link {"http`://HuddledMasses.org"} # updated {(Get-Date -f u) -replace " ","T"} # author { # name {"Joel Bennett"} # uri {"http`://HuddledMasses.org"} # } # id {"http`://huddledmasses.org/" } # # entry { # title {"Test First Entry"} # link {"http`://HuddledMasses.org/new-site-new-layout-lost-posts/" } # id {"http`://huddledmasses.org/new-site-new-layout-lost-posts/" } # updated {(Get-Date 10/31/2003 -f u) -replace " ","T"} # summary {"Ema Lazarus' Poem"} # link -rel license -href "http`://creativecommons.org/licenses/by/3.0/" -title "CC By-Attribution" # dc:rights { "Copyright 2009, Some rights reserved (licensed under the Creative Commons Attribution 3.0 Unported license)" } # category -scheme "http`://huddledmasses.org/tag/" -term "huddled-masses" # } # } | % { $_.Declaration.ToString(); $_.ToString() } # # <?xml version="1.0" encoding="UTF-16" standalone="yes"?> # <feed xml:lang="en-US" xmlns="http ://www.w3.org/2005/Atom"> # <title>Test First Entry</title> # <link>http ://HuddledMasses.org</link> # <updated>2009-07-29T17:25:49Z</updated> # <author> # <name>Joel Bennett</name> # <uri>http ://HuddledMasses.org</uri> # </author> # <id>http ://huddledmasses.org/</id> # <entry> # <title>Test First Entry</title> # <link>http ://HuddledMasses.org/new-site-new-layout-lost-posts/</link> # <id>http ://huddledmasses.org/new-site-new-layout-lost-posts/</id> # <updated>2003-10-31T00:00:00Z</updated> # <summary>Ema Lazarus' Poem</summary> # <link rel="license" href="http ://creativecommons.org/licenses/by/3.0/" title="CC By-Attribution" /> # <dc:rights>Copyright 2009, Some rights reserved (licensed under the Creative Commons Attribution 3.0 Unported license)</dc:rights> # <category scheme="http ://huddledmasses.org/tag/" term="huddled-masses" /> # </entry> # </feed> # # # Description # ----------- # This example shows the use of a default namespace, as well as additional specific namespaces for the "dc" namespace. It also demonstrates how you can get the <?xml?> declaration which does not appear in a simple .ToString(). # # NOTE that the backtick in the http`: in the URLs in the input is unecessary, and I added the space after the http: in the URLs in the output -- these are accomodations to PoshCode's spam filter. Backticks are not need in the input, and spaces do not appear in the actual output.# # [CmdletBinding()] Param( [Parameter(Mandatory = $true, Position = 0)] [System.Xml.Linq.XName]$root , [Parameter(Mandatory = $false)] [string]$Version = "1.0" , [Parameter(Mandatory = $false)] [string]$Encoding = "UTF-8" , [Parameter(Mandatory = $false)] [string]$Standalone = "yes" , [AllowNull()][AllowEmptyString()][AllowEmptyCollection()] [Parameter(Position=99, Mandatory = $false, ValueFromRemainingArguments=$true)] [PSObject[]]$args ) BEGIN { $script:NameSpaceHash = New-Object 'Dictionary[String,XNamespace]' if($root.NamespaceName) { $script:NameSpaceHash.Add("", $root.Namespace) } } PROCESS { New-Object XDocument (New-Object XDeclaration $Version, $Encoding, $standalone),( New-Object XElement $( $root while($args) { $attrib, $value, $args = $args if($attrib -is [ScriptBlock]) { # Write-Verbose "Preparsed DSL: $attrib" $attrib = ConvertFrom-XmlDsl $attrib Write-Verbose "Reparsed DSL: $attrib" &$attrib } elseif ( $value -is [ScriptBlock] -and "-CONTENT".StartsWith($attrib.TrimEnd(':').ToUpper())) { $value = ConvertFrom-XmlDsl $value &$value } elseif ( $value -is [XNamespace]) { New-Object XAttribute ([XNamespace]::Xmlns + $attrib.TrimStart("-").TrimEnd(':')), $value $script:NameSpaceHash.Add($attrib.TrimStart("-").TrimEnd(':'), $value) } else { Write-Verbose "XAttribute $attrib = $value" New-Object XAttribute $attrib.TrimStart("-").TrimEnd(':'), $value } } )) } } Set-Alias xml New-XDocument -EA 0 Set-Alias New-Xml New-XDocument -EA 0 function New-XAttribute { #.Synopsys # Creates a new XAttribute (an xml attribute on an XElement for XDocument) #.Description # This is the work-horse for the XML mini-dsl #.Parameter name # The attribute name #.Parameter value # The attribute value [CmdletBinding()] Param([Parameter(Mandatory=$true)]$name,[Parameter(Mandatory=$true)]$value) New-Object XAttribute $name, $value } Set-Alias xa New-XAttribute -EA 0 Set-Alias New-XmlAttribute New-XAttribute -EA 0 function New-XElement { #.Synopsys # Creates a new XElement (an xml tag for XDocument) #.Description # This is the work-horse for the XML mini-dsl #.Parameter tag # The name of the xml tag #.Parameter args # this is where all the dsl magic happens. Please see the Examples. :) [CmdletBinding()] Param( [Parameter(Mandatory = $true, Position = 0)] [System.Xml.Linq.XName]$tag , [AllowNull()][AllowEmptyString()][AllowEmptyCollection()] [Parameter(Position=99, Mandatory = $false, ValueFromRemainingArguments=$true)] [PSObject[]]$args ) # BEGIN { # if([string]::IsNullOrEmpty( $tag.NamespaceName )) { # $tag = $($script:NameSpaceStack.Peek()) + $tag # if( $script:NameSpaceStack.Count -gt 0 ) { # $script:NameSpaceStack.Push( $script:NameSpaceStack.Peek() ) # } else { # $script:NameSpaceStack.Push( $null ) # } # } else { # $script:NameSpaceStack.Push( $tag.Namespace ) # } # } PROCESS { New-Object XElement $( $tag while($args) { $attrib, $value, $args = $args if($attrib -is [ScriptBlock]) { # then it's content &$attrib } elseif ( $value -is [ScriptBlock] -and "-CONTENT".StartsWith($attrib.TrimEnd(':').ToUpper())) { # then it's content &$value } elseif ( $value -is [XNamespace]) { New-Object XAttribute ([XNamespace]::Xmlns + $attrib.TrimStart("-").TrimEnd(':')), $value $script:NameSpaceHash.Add($attrib.TrimStart("-").TrimEnd(':'), $value) } elseif($value -match "-(?!\\d)\\w") { $args = @($value)+@($args) } elseif($value -ne $null) { New-Object XAttribute $attrib.TrimStart("-").TrimEnd(':'), $value } } ) } # END { # $null = $script:NameSpaceStack.Pop() # } } Set-Alias xe New-XElement Set-Alias New-XmlElement New-XElement function ConvertFrom-XmlDsl { Param([ScriptBlock]$script) $parserrors = $null $global:tokens = [PSParser]::Tokenize( $script, [ref]$parserrors ) [Array]$duds = $global:tokens | Where-Object { $_.Type -eq "Command" -and !$_.Content.Contains('-') -and ($(Get-Command $_.Content -Type Cmdlet,Function,ExternalScript -EA 0) -eq $Null) } [Array]::Reverse( $duds ) [string[]]$ScriptText = "$script" -split "`n" ForEach($token in $duds ) { # replace : notation with namespace notation if( $token.Content.Contains(":") ) { $key, $localname = $token.Content -split ":" $ScriptText[($token.StartLine - 1)] = $ScriptText[($token.StartLine - 1)].Remove( $token.StartColumn -1, $token.Length ).Insert( $token.StartColumn -1, "'" + $($script:NameSpaceHash[$key] + $localname) + "'" ) } else { $ScriptText[($token.StartLine - 1)] = $ScriptText[($token.StartLine - 1)].Remove( $token.StartColumn -1, $token.Length ).Insert( $token.StartColumn -1, "'" + $($script:NameSpaceHash[''] + $token.Content) + "'" ) } # insert 'xe' before everything (unless it's a valid command) $ScriptText[($token.StartLine - 1)] = $ScriptText[($token.StartLine - 1)].Insert( $token.StartColumn -1, "xe " ) } Write-Output ([ScriptBlock]::Create( ($ScriptText -join "`n") )) } ######## CliXml function ConvertFrom-CliXml { param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [String[]]$InputObject ) begin { $OFS = "`n" [String]$xmlString = "" } process { $xmlString += $InputObject } end { $type = [type]::gettype("System.Management.Automation.Deserializer") $ctor = $type.getconstructor("instance,nonpublic", $null, @([xml.xmlreader]), $null) $sr = new-object System.IO.StringReader $xmlString $xr = new-object System.Xml.XmlTextReader $sr $deserializer = $ctor.invoke($xr) $method = @($type.getmethods("nonpublic,instance") | where-object {$_.name -like "Deserialize"})[1] $done = $type.getmethod("Done", [System.Reflection.BindingFlags]"nonpublic,instance") while (!$done.invoke($deserializer, @())) { try { $method.invoke($deserializer, "") } catch { write-warning "Could not deserialize $string: $_" } } $xr.Close() $sr.Dispose() } } function ConvertTo-CliXml { param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [PSObject[]]$InputObject ) begin { $type = [type]::gettype("System.Management.Automation.Serializer") $ctor = $type.getconstructor("instance,nonpublic", $null, @([System.Xml.XmlWriter]), $null) $sw = new-object System.IO.StringWriter $xw = new-object System.Xml.XmlTextWriter $sw $serializer = $ctor.invoke($xw) $method = $type.getmethod("Serialize", "nonpublic,instance", $null, [type[]]@([object]), $null) $done = $type.getmethod("Done", [System.Reflection.BindingFlags]"nonpublic,instance") } process { try { [void]$method.invoke($serializer, $InputObject) } catch { write-warning "Could not serialize $($InputObject.gettype()): $_" } } end { [void]$done.invoke($serializer, @()) $sw.ToString() $xw.Close() $sw.Dispose() } } ######## Xaml # if($PSVersionTable.CLRVersion -ge "4.0"){ # trap { continue } # [Reflection.Assembly]::LoadWithPartialName("System.Xaml") | Out-Null # if("System.Xaml.XamlServices" -as [type]) { # } # } Export-ModuleMember -alias * -function New-XDocument, New-XAttribute, New-XElement, Remove-XmlNamespace, Convert-Xml, Select-Xml, Format-Xml, ConvertTo-CliXml, ConvertFrom-CliXml # SIG # Begin signature block # MIIRDAYJKoZIhvcNAQcCoIIQ/TCCEPkCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUzDxrTxXwmegpPJOFVeVSMySS # Qeyggg5CMIIHBjCCBO6gAwIBAgIBFTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQG # EwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERp # Z2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2Vy # dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDcxMDI0MjIwMTQ1WhcNMTIxMDI0MjIw # MTQ1WjCBjDELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKzAp # BgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxODA2BgNV # BAMTL1N0YXJ0Q29tIENsYXNzIDIgUHJpbWFyeSBJbnRlcm1lZGlhdGUgT2J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BI9KpvLjAn6Dy1nQEwfvAfYAL8WMwyZykPYIS/y2Dq3SB2XvzFy27 # zpIdla8qIShuNlX22FQL6/FKBriy96jcdGEYF9rbsuWku04NqSLjNM47wCAzLs/n # FXpdcBL1R6QEK4MRhcEL9Ho4hGbVvmJES64IY+P3xlV2vlEJkk3etB/FpNDOQf8j # RTXrrBUYFvOCv20uHsRpc3kFduXt3HRV2QnAlRpG26YpZN4xvgqSGXUeqRceef7D # dm4iTdHK5tIxggI0MIICMAIBATCBkjCBjDELMAkGA1UEBhMCSUwxFjAUBgNVBAoT # DVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmlj # YXRlIFNpZ25pbmcxODA2BgNVBAMTL1N0YXJ0Q29tIENsYXNzIDIgUHJpbWFyeSBJ # bnRlcm1lZGlhdGUgT2JqZWN0IENBAgFRMAkGBSsOAwIaBQCgeDAYBgorBgEEAYI3 # AgEMMQowCKACgAChAoAAMBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisG # AQQBgjcCAQsxDjAMBgorBgEEAYI3AgEWMCMGCSqGSIb3DQEJBDEWBBQYoPjaFo3a # OrUH23e74FM2yGbeQjANBgkqhkiG9w0BAQEFAASCAQAEoEa/WFrgcCGJyTXYDJn7 # TCOFYqAoNNg+dy4mtYXlzuf7v/VBDHhaoeFx4WLhONzsLGFabdfsEPZrS0FgDXX9 # QuFHhumigd1e9cLtNsjyJiPXEHO3s2U/ISnj+qFrZ9Q2CN1vBQzR0k4T9feK8GRM # yKPsje7JV93+PTB8IbL5UpsrLVz+JGxsaWtOpWuYdXGfnvXYYELmYYcXOuJxim8v # TTvfvJ7SA5w+3er+NChAr98uJKuqrZnkJTV1Ki+8JwYTdAtNm1kJaM/Drnbk50K4 # v0FMGeqSYRns3shmCvhlkUH0v+mXz7CpnVYztIBlgbxnio7PWmbTqknPEhNMeyjb # SIG # End signature block
0
sample_44_72.ps1
# # Module manifest for module 'OCI.PSModules.Identitydataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identitydataplane.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '0db2e619-5a8a-4c35-906a-750fbc5977b8' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Identitydataplane Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Identitydataplane.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'New-OCIIdentitydataplaneScopedAccessToken', 'New-OCIIdentitydataplaneUserSecurityToken' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Identitydataplane' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_13_0.ps1
# # Module manifest for module 'OCI.PSModules.Apmcontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmcontrolplane.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '2656b809-7098-428e-b605-696525730fec' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Apmcontrolplane Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Apmcontrolplane.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIApmcontrolplaneApmDomain', 'Get-OCIApmcontrolplaneApmDomainsList', 'Get-OCIApmcontrolplaneApmDomainWorkRequestsList', 'Get-OCIApmcontrolplaneDataKeysList', 'Get-OCIApmcontrolplaneWorkRequest', 'Get-OCIApmcontrolplaneWorkRequestErrorsList', 'Get-OCIApmcontrolplaneWorkRequestLogsList', 'Get-OCIApmcontrolplaneWorkRequestsList', 'Move-OCIApmcontrolplaneApmDomainCompartment', 'New-OCIApmcontrolplaneApmDomain', 'New-OCIApmcontrolplaneDataKeys', 'Remove-OCIApmcontrolplaneApmDomain', 'Remove-OCIApmcontrolplaneDataKeys', 'Update-OCIApmcontrolplaneApmDomain' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Apmcontrolplane' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
2706.ps1
function Get-LibSymbols { [CmdletBinding()] Param ( [Parameter(Position = 0, Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [ValidateScript({ Test-Path $_ })] [Alias('FullName')] [String[]] $Path ) BEGIN { $Code = @' using System; using System.IO; using System.Text; using System.Runtime.InteropServices; namespace COFF2 { public class HEADER { public ushort Machine; public ushort NumberOfSections; public DateTime TimeDateStamp; public uint PointerToSymbolTable; public uint NumberOfSymbols; public ushort SizeOfOptionalHeader; public ushort Characteristics; public HEADER(BinaryReader br) { this.Machine = br.ReadUInt16(); this.NumberOfSections = br.ReadUInt16(); this.TimeDateStamp = (new DateTime(1970, 1, 1, 0, 0, 0)).AddSeconds(br.ReadUInt32()); this.PointerToSymbolTable = br.ReadUInt32(); this.NumberOfSymbols = br.ReadUInt32(); this.SizeOfOptionalHeader = br.ReadUInt16(); this.Characteristics = br.ReadUInt16(); } } public class IMAGE_ARCHIVE_MEMBER_HEADER { public string Name; public DateTime Date; public ulong Size; public string EndHeader; public IMAGE_ARCHIVE_MEMBER_HEADER(BinaryReader br) { string tempName = Encoding.UTF8.GetString(br.ReadBytes(16)); DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0); this.Name = tempName.Substring(0, tempName.IndexOf((Char) 47)); this.Date = dt.AddSeconds(Convert.ToDouble(Encoding.UTF8.GetString(br.ReadBytes(12)).Split((Char) 20)[0])); br.ReadBytes(20); // Skip over UserID, GroupID, and Mode. They are useless fields. this.Size = Convert.ToUInt64(Encoding.UTF8.GetString(br.ReadBytes(10)).Split((Char) 20)[0]); this.EndHeader = Encoding.UTF8.GetString(br.ReadBytes(2)); } } public class Functions { [DllImport("dbghelp.dll", SetLastError=true, PreserveSig=true)] public static extern int UnDecorateSymbolName( [In] [MarshalAs(UnmanagedType.LPStr)] string DecoratedName, [Out] StringBuilder UnDecoratedName, [In] [MarshalAs(UnmanagedType.U4)] uint UndecoratedLength, [In] [MarshalAs(UnmanagedType.U4)] uint Flags); } } '@ Add-Type -TypeDefinition $Code function Dispose-Objects { $BinaryReader.Close() $FileStream.Dispose() } } PROCESS { foreach ($File in $Path) { $LibFilePath = Resolve-Path $File $LibFileName = Split-Path $LibFilePath -Leaf $IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60 $IMAGE_ARCHIVE_START = "!<arch>`n" $IMAGE_SIZEOF_LIB_HDR = $IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR + $IMAGE_ARCHIVE_START.Length $IMAGE_ARCHIVE_END = "```n" $SizeofCOFFFileHeader = 20 $FileStream = [IO.File]::OpenRead($LibFilePath) $FileLength = $FileStream.Length if ($FileLength -lt $IMAGE_SIZEOF_LIB_HDR) { Write-Error "$($LibFileName) is too small to store a lib header." $FileStream.Dispose() return } $BinaryReader = New-Object IO.BinaryReader($FileStream) $ArchiveStart = [Text.Encoding]::UTF8.GetString($BinaryReader.ReadBytes(8)) if ($ArchiveStart -ne $IMAGE_ARCHIVE_START) { Write-Error "$($LibFileName) does not contain a valid lib header." Dispose-Objects return } $ArchiveHeader = New-Object COFF2.IMAGE_ARCHIVE_MEMBER_HEADER($BinaryReader) if ($ArchiveHeader.EndHeader -ne $IMAGE_ARCHIVE_END) { Write-Error "$($LibFileName) does not contain a valid lib header." Dispose-Objects return } if ($ArchiveHeader.Size -eq 0) { Write-Warning "$($LibFileName) contains no symbols." Dispose-Objects return } $NumberOfSymbols = $BinaryReader.ReadBytes(4) if ([BitConverter]::IsLittleEndian) { [Array]::Reverse($NumberOfSymbols) } $NumberOfSymbols = [BitConverter]::ToUInt32($NumberOfSymbols, 0) $SymbolOffsets = New-Object UInt32[]($NumberOfSymbols) foreach ($Offset in 0..($SymbolOffsets.Length - 1)) { $SymbolOffset = $BinaryReader.ReadBytes(4) if ([BitConverter]::IsLittleEndian) { [Array]::Reverse($SymbolOffset) } $SymbolOffsets[$Offset] = [BitConverter]::ToUInt32($SymbolOffset, 0) } $SymbolStringLength = $ArchiveHeader.Size + $IMAGE_SIZEOF_LIB_HDR - $FileStream.Position - 1 $SymbolOffsetsSorted = $SymbolOffsets | Sort-Object -Unique $SymbolOffsetsSorted | ForEach-Object { $FileStream.Seek($_, 'Begin') | Out-Null $ArchiveHeader = New-Object COFF2.IMAGE_ARCHIVE_MEMBER_HEADER($BinaryReader) $CoffHeader = New-Object COFF2.HEADER($BinaryReader) if ($CoffHeader.NumberOfSections -eq [UInt16]::MaxValue) { $SymbolStringLength = $CoffHeader.NumberOfSymbols $Symbols = [Text.Encoding]::UTF8.GetString($BinaryReader.ReadBytes($SymbolStringLength)).Split([Char] 0) $DecoratedSymbol = $Symbols[0] $UndecoratedSymbol = '' $SymbolType = 'C' if ($DecoratedSymbol.StartsWith('?')) { $StrBuilder = New-Object Text.Stringbuilder(512) [COFF.Functions]::UnDecorateSymbolName($DecoratedSymbol, $StrBuilder, $StrBuilder.Capacity, 0) | Out-Null $UndecoratedSymbol = $StrBuilder.ToString() $SymbolType = 'C++' } else { if ($DecoratedSymbol[0] -eq '_' -or $DecoratedSymbol[0] -eq '@') { $UndecoratedSymbol = $DecoratedSymbol.Substring(1).Split('@')[0] } else { $UndecoratedSymbol = $DecoratedSymbol.Split('@')[0] } } $SymInfo = @{ DecoratedName = $DecoratedSymbol UndecoratedName = $UndecoratedSymbol Module = $Symbols[1] SymbolType = $SymbolType } $ParsedSymbol = New-Object PSObject -Property $SymInfo $ParsedSymbol.PSObject.TypeNames[0] = 'COFF.SymbolInfo' Write-Output $ParsedSymbol } } Dispose-Objects } } END {} }
0
sample_37_15.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Delete an Azure Load Testing resource. .Description Delete an Azure Load Testing resource. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/az.loadtesting/remove-azload #> function Remove-AzLoad { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('LoadTestName')] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')] [System.String] # Name of the Azure Load Testing resource. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')] [System.String] # Name of the resource group. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the subscription. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { try { Az.LoadTesting.internal\Remove-AzLoad @PSBoundParameters } catch { throw } } } # SIG # Begin signature block # MIInvgYJKoZIhvcNAQcCoIInrzCCJ6sCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCP52Dp34fot62t # 3GTgrpfAl7UBT+ZLgWLyEjnXaogXuKCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDw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vzSEbHSrpga4iXl8LzSz5bYvLAKYm+ylK7NPFYUYvO+d1bn2aoiLBe5fXWsPNMOz # tK5dKVqLJ85aOD292YiyfeZKb0CsqVTMeq1iH1qSv+XlR3uSIC3HcVywbpOassIS # Xglw4lK4o+gRu0Phw0WCToSc8weiNlaTVQYDv5+tKEx2FA4FNp6jkNGu0uiQ5GWt # hYNN0lQSsa4mIlKoVcEIvA70mfcPNxCA+CaW/nQjQXmk7jiJn8NJ46cNGAFrZtLZ # jDWzy1YqHd0U8ehNEG+5ccwKRU4q8P84olR0rmob/kPpIEJr38lrG5yldR5rI1x5 # ywk= # SIG # End signature block
0
ce50f222-81f6-4509-90ad-8904f9331d7c.ps1
# Detect 32 or 64 bits Windows – regardless of WoW64 – with the PowerShell OSArchitecture function # By Vincent Hoogendoorn @@# See http://vincenth.net/blog/archive/2009/11/02/detect-32-or-64-bits-windows-regardless-of-wow64-with-the-powershell-osarchitecture-function.aspx for details. @@# For the used InvokeCSharp function source, see http://vincenth.net/blog/archive/2009/10/27/call-inline-c-from-powershell-with-invokecsharp.aspx @@# or search http://poshcode.org for InvokeCSharp Function global:CurrentProcessIsWOW64 { # Use some inline C# code to call the unmanaged IsWow64Process() function in Kernel32.dll and return its result: $code = @" using System; using System.Runtime.InteropServices; public class Kernel32 { [DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool IsWow64Process([In] IntPtr hProcess, [Out] out bool lpSystemInfo); // This overload returns True if the current process is running on Wow, False otherwise public bool CurrentProcessIsWow64() { bool retVal; if (!(IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal))) { throw new Exception("IsWow64Process() failed"); } return retVal; } } "@ InvokeCSharp -code $code -class 'Kernel32' -method 'CurrentProcessIsWow64' } Function global:ProcessArchitecture { switch ([System.IntPtr]::Size) { 4 { 32 } 8 { 64 } default { throw "Unknown Process Architecture: $([System.IntPtr]::Size * 8) bits" } } } Function global:OSArchitecture { if (((ProcessArchitecture) -eq 32) -and (CurrentProcessIsWOW64)) { 64 } else { ProcessArchitecture } # Note that on Vista, W2008 and later Windows versions, we could use (Get-WMIObject win32_operatingsystem).OSArchitecture. # We don't use that because we also support W2003 }
0
sample_24_78.ps1
# # Module manifest for module 'OCI.PSModules.Monitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Monitoring.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'bb8a391d-e2cd-45ce-b0df-4636cbbb16a4' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Monitoring Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Monitoring.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIMonitoringAlarm', 'Get-OCIMonitoringAlarmHistory', 'Get-OCIMonitoringAlarmsList', 'Get-OCIMonitoringAlarmsStatusList', 'Get-OCIMonitoringAlarmSuppression', 'Get-OCIMonitoringAlarmSuppressionsList', 'Get-OCIMonitoringMetricsList', 'Invoke-OCIMonitoringRetrieveDimensionStates', 'Invoke-OCIMonitoringSummarizeAlarmSuppressionHistory', 'Invoke-OCIMonitoringSummarizeMetricsData', 'Move-OCIMonitoringAlarmCompartment', 'New-OCIMonitoringAlarm', 'New-OCIMonitoringAlarmSuppression', 'Remove-OCIMonitoringAlarm', 'Remove-OCIMonitoringAlarmSuppression', 'Submit-OCIMonitoringMetricData', 'Update-OCIMonitoringAlarm' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Monitoring' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
Find-GeoCode_1.ps1
$mappoint = New-WebServiceProxy http://staging.mappoint.net/standard-30/mappoint.wsdl -Namespace MapPoint $FindService = new-object MapPoint.FindServiceSoap # You need an account, sign up here: https://mappoint-css.live.com/mwssignup $FindService.Credentials = Get-Credential function Find-ReverseGeoCode( [double]$Latitude, [double]$longitude, [switch]$force ) { $Coords = new-object MapPoint.LatLong $Coords.Latitude = $Latitude $Coords.Longitude = $longitude $Locations = $FindService.GetLocationInfo( $Coords, "MapPoint.NA", $null) if($force) { return $Locations } elseif($Locations[0].Address) { return $Locations[0].Address # .FormattedAddress + " - " + $Locations[0].Address.CountryRegion } else { return $Locations | ?{ $_.Entity.TypeName -eq "PopulatedPlace" } # | %{ $_.Entity.DisplayName } } } function Find-GeoCode( $address, $country = "US" ) { $spec = new-object MapPoint.FindAddressSpecification $spec.DataSourceName = "MapPoint.NA" $spec.InputAddress = $FindService.ParseAddress( $address, $country ) $Found = $FindService.FindAddress( $spec ) if($Found.NumberFound) { $found.Results | Select -expand FoundLocation | Select -Expand LatLong } # if($Found.NumberFound -gt 1) { # $found.Results| Select -expand FoundLocation | Select -Expand Address # } } ## This is how non-geography geeks think of them: Set-Alias Find-Address Find-ReverseGeoCode Set-Alias Find-Coordinates Find-GeoCode
0
sample_61_71.ps1
# # Module manifest for module 'OCI.PSModules.Visualbuilder' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Visualbuilder.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '30071ced-fbc1-4b5d-9ea5-b0fb2ecea5bc' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Visualbuilder Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.3.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Visualbuilder.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIVisualbuilderVbInstance', 'Get-OCIVisualbuilderVbInstancesList', 'Get-OCIVisualbuilderWorkRequest', 'Get-OCIVisualbuilderWorkRequestErrorsList', 'Get-OCIVisualbuilderWorkRequestLogsList', 'Get-OCIVisualbuilderWorkRequestsList', 'Invoke-OCIVisualbuilderRequestSummarizedApplications', 'Move-OCIVisualbuilderVbInstanceCompartment', 'New-OCIVisualbuilderVbInstance', 'Remove-OCIVisualbuilderVbInstance', 'Start-OCIVisualbuilderVbInstance', 'Stop-OCIVisualbuilderVbInstance', 'Update-OCIVisualbuilderVbInstance' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Visualbuilder' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
973.ps1
$SubscriptionId = '' $resourceGroupName = "myResourceGroup-$(Get-Random)" $location = "westus2" $vNetName = "myVnet-$(Get-Random)" $vNetAddressPrefix = "10.0.0.0/16" $defaultSubnetName = "myDefaultSubnet-$(Get-Random)" $defaultSubnetAddressPrefix = "10.0.0.0/24" $miSubnetName = "myMISubnet-$(Get-Random)" $miSubnetAddressPrefix = "10.0.0.0/24" $instanceName = "myMIName-$(Get-Random)" $miAdminSqlLogin = "SqlAdmin" $miAdminSqlPassword = "ChangeYourAdminPassword1" $edition = "General Purpose" $vCores = 8 $maxStorage = 256 $computeGeneration = "Gen4" $license = "LicenseIncluded" Set-AzContext -SubscriptionId $subscriptionId  $resourceGroup = New-AzResourceGroup -Name $resourceGroupName -Location $location $virtualNetwork = New-AzVirtualNetwork `                       -ResourceGroupName $resourceGroupName `                       -Location $location `                       -Name $vNetName `                       -AddressPrefix $vNetAddressPrefix Add-AzVirtualNetworkSubnetConfig `                       -Name $miSubnetName ` -VirtualNetwork $virtualNetwork `                       -AddressPrefix $miSubnetAddressPrefix ` | Set-AzVirtualNetwork $virtualNetwork = Get-AzVirtualNetwork -Name $vNetName -ResourceGroupName $resourceGroupName $miSubnetConfig = Get-AzVirtualNetworkSubnetConfig ` -Name $miSubnetName ` -VirtualNetwork $virtualNetwork $miSubnetConfigId = $miSubnetConfig.Id $networkSecurityGroupMiManagementService = New-AzNetworkSecurityGroup `                       -Name 'myNetworkSecurityGroupMiManagementService' `                       -ResourceGroupName $resourceGroupName `                       -location $location $routeTableMiManagementService = New-AzRouteTable `                       -Name 'myRouteTableMiManagementService' `                       -ResourceGroupName $resourceGroupName `                       -location $location Set-AzVirtualNetworkSubnetConfig `                       -VirtualNetwork $virtualNetwork `                       -Name $miSubnetName `                       -AddressPrefix $miSubnetAddressPrefix `                       -NetworkSecurityGroup $networkSecurityGroupMiManagementService `                       -RouteTable $routeTableMiManagementService | `                     Set-AzVirtualNetwork Get-AzNetworkSecurityGroup `                       -ResourceGroupName $resourceGroupName `                       -Name "myNetworkSecurityGroupMiManagementService" `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 100 `                       -Name "allow_management_inbound" ` -Access Allow ` -Protocol Tcp ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix * ` -DestinationPortRange 9000,9003,1438,1440,1452 ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 200 `                       -Name "allow_misubnet_inbound" ` -Access Allow ` -Protocol * ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix $miSubnetAddressPrefix ` -DestinationPortRange * ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 300 `                       -Name "allow_health_probe_inbound" ` -Access Allow ` -Protocol * ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix AzureLoadBalancer ` -DestinationPortRange * ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 1000 `                       -Name "allow_tds_inbound" ` -Access Allow ` -Protocol Tcp ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix VirtualNetwork ` -DestinationPortRange 1433 ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 1100 `                       -Name "allow_redirect_inbound" ` -Access Allow ` -Protocol Tcp ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix VirtualNetwork ` -DestinationPortRange 11000-11999 ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 4096 `                       -Name "deny_all_inbound" ` -Access Deny ` -Protocol * ` -Direction Inbound `                       -SourcePortRange * ` -SourceAddressPrefix * ` -DestinationPortRange * ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 100 `                       -Name "allow_management_outbound" ` -Access Allow ` -Protocol Tcp ` -Direction Outbound `                       -SourcePortRange * ` -SourceAddressPrefix * ` -DestinationPortRange 80,443,12000 ` -DestinationAddressPrefix * `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 200 `                       -Name "allow_misubnet_outbound" ` -Access Allow ` -Protocol * ` -Direction Outbound `                       -SourcePortRange * ` -SourceAddressPrefix * ` -DestinationPortRange * ` -DestinationAddressPrefix $miSubnetAddressPrefix `                       | Add-AzNetworkSecurityRuleConfig ` -Priority 4096 `                       -Name "deny_all_outbound" ` -Access Deny ` -Protocol * ` -Direction Outbound `                       -SourcePortRange * ` -SourceAddressPrefix * ` -DestinationPortRange * ` -DestinationAddressPrefix * ` | Set-AzNetworkSecurityGroup Get-AzRouteTable `                       -ResourceGroupName $resourceGroupName `                       -Name "myRouteTableMiManagementService" `                       | Add-AzRouteConfig `                       -Name "ToManagedInstanceManagementService" `                       -AddressPrefix 0.0.0.0/0 `                       -NextHopType Internet `                       | Add-AzRouteConfig `                       -Name "ToLocalClusterNode" `                       -AddressPrefix $miSubnetAddressPrefix `                       -NextHopType VnetLocal `                      | Set-AzRouteTable New-AzSqlInstance -Name $instanceName `                       -ResourceGroupName $resourceGroupName -Location westus2 -SubnetId $miSubnetConfigId `                       -AdministratorCredential (Get-Credential) `                       -StorageSizeInGB $maxStorage -VCore $vCores -Edition $edition `                       -ComputeGeneration $computeGeneration -LicenseType $license
0
sample_16_63.ps1
# # Module manifest for module 'OCI.PSModules.Email' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Email.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'f1bd31ba-98e7-4163-b9d9-5016214290ab' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Email Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Email.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIEmailDkim', 'Get-OCIEmailDkimsList', 'Get-OCIEmailDomain', 'Get-OCIEmailDomainsList', 'Get-OCIEmailSender', 'Get-OCIEmailSendersList', 'Get-OCIEmailSuppression', 'Get-OCIEmailSuppressionsList', 'Get-OCIEmailWorkRequest', 'Get-OCIEmailWorkRequestErrorsList', 'Get-OCIEmailWorkRequestLogsList', 'Get-OCIEmailWorkRequestsList', 'Move-OCIEmailDomainCompartment', 'Move-OCIEmailSenderCompartment', 'New-OCIEmailDkim', 'New-OCIEmailDomain', 'New-OCIEmailSender', 'New-OCIEmailSuppression', 'Remove-OCIEmailDkim', 'Remove-OCIEmailDomain', 'Remove-OCIEmailSender', 'Remove-OCIEmailSuppression', 'Update-OCIEmailDkim', 'Update-OCIEmailDomain', 'Update-OCIEmailSender' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Email' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_29_94.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '05a069dc-62d0-41ee-b47b-3fe73fff277d' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Ocvp Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Ocvp.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIOcvpCluster', 'Get-OCIOcvpClustersList', 'Get-OCIOcvpEsxiHost', 'Get-OCIOcvpEsxiHostsList', 'Get-OCIOcvpSddc', 'Get-OCIOcvpSddcsList', 'Get-OCIOcvpSupportedCommitmentsList', 'Get-OCIOcvpSupportedHostShapesList', 'Get-OCIOcvpSupportedVmwareSoftwareVersionsList', 'Get-OCIOcvpWorkRequest', 'Get-OCIOcvpWorkRequestErrorsList', 'Get-OCIOcvpWorkRequestLogsList', 'Get-OCIOcvpWorkRequestsList', 'Invoke-OCIOcvpDowngradeHcx', 'Invoke-OCIOcvpInplaceUpgrade', 'Invoke-OCIOcvpRefreshHcxLicenseStatus', 'Invoke-OCIOcvpReplaceHost', 'Invoke-OCIOcvpRetrievePassword', 'Invoke-OCIOcvpSwapBilling', 'Invoke-OCIOcvpUpgradeHcx', 'Move-OCIOcvpSddcCompartment', 'New-OCIOcvpCluster', 'New-OCIOcvpEsxiHost', 'New-OCIOcvpSddc', 'Remove-OCIOcvpCluster', 'Remove-OCIOcvpEsxiHost', 'Remove-OCIOcvpSddc', 'Stop-OCIOcvpDowngradeHcx', 'Update-OCIOcvpCluster', 'Update-OCIOcvpEsxiHost', 'Update-OCIOcvpSddc' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Ocvp' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_13_65.ps1
ConvertFrom-StringData @' id_filever=Collecting critical file versions '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC5Phm1j+58Cc4T # lUIbYdsDiYVIkn5vq/tCFW4GNAMU26CCDYUwggYDMIID66ADAgECAhMzAAAEA73V # lV0POxit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JBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9u # MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRp # b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAC # AdFFWZgQzEJPAAEAAAIBMCIEIKMcBulW2TKoXBfoaBGu0S2w65GKyV6YpORLn7xf # HyoaMA0GCSqGSIb3DQEBCwUABIICACjAgc5GgJrBAEEn/r35TZkc8m98QbCxfivg # 8guuWQrOI8OnkLgtITxnZf87T3ReKxvLbuCviCsTf+MymwNwFX2Sk3XbyOhDyoan # rul3SEoGnWtnRAN8u/izKaFZBEsPWx6Gmu6BH67T7sgNeA7Q86syCqCEPS6QNsWb # KTTQkn4VIWH7KoBCA9FNNb9t8slNMYWvQ6pleF+rpwMXHMA9OmwcjD0Tfh3UHXVU # GG6Ox8Tsubhg+dNyNZ2r+2eQ6KQEJZRnB+3unF8IUQ6d5oNNixm2WWXKKGp0UQSU # KfbCWzSnZRBG1FG+zmdnvj4NFcwlXMM/zvmJZuoJMhlNybeDI0PtUjG1By5/T/4K # sQmeu9ooRsRzxPqLXBbxTHQWSq5+8p7506va3l6gQ/WbsthtHu3DARnFVJ1g74a2 # /mBUnVKnYI4S7k1R3k1YC5jpSuirN5vyXfiDIa/EmyGH8ErWXBMdmt/eNPbZvbtw # BLk3N3wIVl0sb9yoDoCbAMaAtJzyx0GlYALmUAts0dqTtSdIUKLhlxn0pGR2FJzG # +AqzgL2GgtwSbHlpybrR8ev8afqJcTwFxqlypfy7LB23hiUj9rlXu9C0YmL7g5vU # 2crOafHUrlt2Clqcvr5ILe54tWMa/AVvyvZscwFBGbQAUFqwmEkK0dt/oppsp1vD # W2nFfF3Q # SIG # End signature block
0
2991.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "New-PesterState" { Context "TestNameFilter parameter is set" { $p = new-pesterstate -TestNameFilter "filter" it "sets the TestNameFilter property" { $p.TestNameFilter | should -be "filter" } } Context "TagFilter parameter is set" { $p = new-pesterstate -TagFilter "tag", "tag2" it "sets the TestNameFilter property" { $p.TagFilter | should -be ("tag", "tag2") } } Context "ExcludeTagFilter parameter is set" { $p = new-pesterstate -ExcludeTagFilter "tag3", "tag" it "sets the ExcludeTagFilter property" { $p.ExcludeTagFilter | should -be ("tag3", "tag") } } Context "TagFilter and ExcludeTagFilter parameter are set" { $p = new-pesterstate -TagFilter "tag", "tag2" -ExcludeTagFilter "tag3" it "sets the TestNameFilter property" { $p.TagFilter | should -be ("tag", "tag2") } it "sets the ExcludeTagFilter property" { $p.ExcludeTagFilter | should -be ("tag3") } } Context "TestNameFilter and TagFilter parameter is set" { $p = new-pesterstate -TagFilter "tag", "tag2" -testnamefilter "filter" it "sets the TagFilter property" { $p.TagFilter | should -be ("tag", "tag2") } it "sets the TestNameFilter property" { $p.TestNameFilter | should -be "Filter" } } Context "ScritpBlockFilter is set" { it "sets the ScriptBlockFilter property" { $o = New-PesterOption -ScriptBlockFilter @(@{Path = "C:\Tests"; Line = 293}) $p = New-PesterState -PesterOption $o $p.ScriptBlockFilter | Should -Not -BeNullOrEmpty $p.ScriptBlockFilter[0].Path | Should -Be "C:\Tests" $p.ScriptBlockFilter[0].Line | Should -Be 293 } } } Describe "Pester state object" { $p = New-PesterState Context "entering describe" { It "enters describe" { $p.EnterTestGroup("describeName", "describe") $p.CurrentTestGroup.Name | Should -Be "describeName" $p.CurrentTestGroup.Hint | Should -Be "describe" } } Context "leaving describe" { It "leaves describe" { $p.LeaveTestGroup("describeName", "describe") $p.CurrentTestGroup.Name | Should -Not -Be "describeName" $p.CurrentTestGroup.Hint | Should -Not -Be "describe" } } context "adding test result" { $p.EnterTestGroup('Describe', 'Describe') it "times test accurately within 10 milliseconds" { $p.EnterTest() $Time = Measure-Command -Expression { Start-Sleep -Milliseconds 100 } $p.LeaveTest() $p.AddTestResult("result", "Passed", $null) $result = $p.TestResult[-1] $result.time.TotalMilliseconds | Should -BeGreaterOrEqual ($Time.Milliseconds - 10) $result.time.TotalMilliseconds | Should -BeLessOrEqual ($Time.Milliseconds + 10) } it "accurately increments total testsuite time within 10 milliseconds" { $TotalTimeStart = $p.time; $p.EnterTestGroup('My Test Group', 'Script') $Time = Measure-Command -Expression { $p.EnterTestGroup('My Describe 1', 'Describe') Start-Sleep -Milliseconds 100 $p.EnterTest() Start-Sleep -Milliseconds 100 $p.LeaveTest() $p.AddTestResult("result", "Passed", $null) Start-Sleep -Milliseconds 100 $p.LeaveTestGroup('My Describe 1', 'Describe') } $p.LeaveTestGroup('My Test Group', 'Script') $TimeRecorded = $p.time - $TotalTimeStart $TimeRecorded.Milliseconds | Should -BeGreaterOrEqual ($Time.Milliseconds - 10) $TimeRecorded.Milliseconds | Should -BeLessOrEqual ($Time.Milliseconds + 10) } it "adds passed test" { $p.AddTestResult("result", "Passed", 100) $result = $p.TestResult[-1] $result.Name | should -be "result" $result.passed | should -be $true $result.Result | Should -be "Passed" $result.time.ticks | should -be 100 } it "adds failed test" { try { throw 'message' } catch { $e = $_ } $p.AddTestResult("result", "Failed", 100, "fail", "stack", "suite name", @{param = 'eters'}, $e) $result = $p.TestResult[-1] $result.Name | should -be "result" $result.passed | should -be $false $result.Result | Should -be "Failed" $result.time.ticks | should -be 100 $result.FailureMessage | should -be "fail" $result.StackTrace | should -be "stack" $result.ParameterizedSuiteName | should -be "suite name" $result.Parameters['param'] | should -be 'eters' $result.ErrorRecord.Exception.Message | should -be 'message' } it "adds skipped test" { $p.AddTestResult("result", "Skipped", 100) $result = $p.TestResult[-1] $result.Name | should -be "result" $result.passed | should -be $true $result.Result | Should -be "Skipped" $result.time.ticks | should -be 100 } it "adds Pending test" { $p.AddTestResult("result", "Pending", 100) $result = $p.TestResult[-1] $result.Name | should -be "result" $result.passed | should -be $true $result.Result | Should -be "Pending" $result.time.ticks | should -be 100 } $p.LeaveTestGroup('Describe', 'Describe') } Context "Path and TestNameFilter parameter is set" { $strict = New-PesterState -Strict It "Keeps Passed state" { $strict.AddTestResult("test", "Passed") $result = $strict.TestResult[-1] $result.passed | should -be $true $result.Result | Should -be "Passed" } It "Keeps Failed state" { $strict.AddTestResult("test", "Failed") $result = $strict.TestResult[-1] $result.passed | should -be $false $result.Result | Should -be "Failed" } It "Changes Pending state to Failed" { $strict.AddTestResult("test", "Pending") $result = $strict.TestResult[-1] $result.passed | should -be $false $result.Result | Should -be "Failed" } It "Changes Skipped state to Failed" { $strict.AddTestResult("test", "Skipped") $result = $strict.TestResult[-1] $result.passed | should -be $false $result.Result | Should -be "Failed" } It "Changes Inconclusive state to Failed" { $strict.AddTestResult("test", "Inconclusive") $result = $strict.TestResult[-1] $result.passed | should -be $false $result.Result | Should -be "Failed" } } Context 'Status counts in Strict mode' { It "increases Passed count" { $state = New-PesterState -Strict $state.AddTestResult("test", "Passed") $state.PassedCount | Should -Be 1 } It "increases Failed count" { $state = New-PesterState -Strict $state.AddTestResult("test", "Failed") $state.FailedCount | Should -Be 1 } It "increases Failed count instead of Pending" { $state = New-PesterState -Strict $state.AddTestResult("test", "Pending") $state.FailedCount | Should -Be 1 $state.PendingCount | Should -Be 0 } It "increases Failed count instead of Skipped" { $state = New-PesterState -Strict $state.AddTestResult("test", "Skipped") $state.FailedCount | Should -Be 1 $state.SkippedCount | Should -Be 0 } It "increases Failed count instead of Inconclusive" { $state = New-PesterState -Strict $state.AddTestResult("test", "Inconclusive") $state.FailedCount | Should -Be 1 $state.InconclusiveCount | Should -Be 0 } } } }
0
sample_25_41.ps1
# # Module manifest for module 'OCI.PSModules.Common' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Common.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Corporation 2020. All rights reserved.' # Description of the functionality provided by this module Description = 'OCI Common module exports Cmdlets that manages features offered by OCI Modules for Powershell like History Store, OCI Configuration file setup and Per-Session Region/Config/Profile preferences. Common module also contains some functionalties that are common to all OCI Service modules, therefore all OCI Service modules depends on Common module.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module # RequiredModules = @() # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Common.dll', 'assemblies/BouncyCastle.Crypto.dll', 'assemblies/NLog.dll', 'assemblies/Polly.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'OCI.PSModules.Common.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @() # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCICmdletHistory', 'Set-OCICmdletHistory', 'Clear-OCICmdletHistory', 'Get-OCIClientSession', 'Set-OCIClientSession', 'Set-OCIClientConfig', 'New-OCIClientKeys', 'Clear-OCIClientSession', 'Register-OCIRealm', 'Register-OCIRegion', 'Get-OCIRegion', 'Get-OCIRegionsList', 'Get-OCIRealm', 'Get-OCIRealmsList' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Common' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
sample_45_82.ps1
# # Module manifest for module 'OCI.PSModules.Apigateway' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apigateway.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '6afcef29-4171-4ad7-a267-5ec2cf2367ad' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Apigateway Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.2.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Apigateway.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIApigatewayApi', 'Get-OCIApigatewayApiContent', 'Get-OCIApigatewayApiDeploymentSpecification', 'Get-OCIApigatewayApisList', 'Get-OCIApigatewayApiValidations', 'Get-OCIApigatewayCertificate', 'Get-OCIApigatewayCertificatesList', 'Get-OCIApigatewayDeployment', 'Get-OCIApigatewayDeploymentsList', 'Get-OCIApigatewayGateway', 'Get-OCIApigatewayGatewaysList', 'Get-OCIApigatewaySdk', 'Get-OCIApigatewaySdkLanguageTypesList', 'Get-OCIApigatewaySdksList', 'Get-OCIApigatewaySubscriber', 'Get-OCIApigatewaySubscribersList', 'Get-OCIApigatewayUsagePlan', 'Get-OCIApigatewayUsagePlansList', 'Get-OCIApigatewayWorkRequest', 'Get-OCIApigatewayWorkRequestErrorsList', 'Get-OCIApigatewayWorkRequestLogsList', 'Get-OCIApigatewayWorkRequestsList', 'Move-OCIApigatewayApiCompartment', 'Move-OCIApigatewayCertificateCompartment', 'Move-OCIApigatewayDeploymentCompartment', 'Move-OCIApigatewayGatewayCompartment', 'Move-OCIApigatewaySubscriberCompartment', 'Move-OCIApigatewayUsagePlanCompartment', 'New-OCIApigatewayApi', 'New-OCIApigatewayCertificate', 'New-OCIApigatewayDeployment', 'New-OCIApigatewayGateway', 'New-OCIApigatewaySdk', 'New-OCIApigatewaySubscriber', 'New-OCIApigatewayUsagePlan', 'Remove-OCIApigatewayApi', 'Remove-OCIApigatewayCertificate', 'Remove-OCIApigatewayDeployment', 'Remove-OCIApigatewayGateway', 'Remove-OCIApigatewaySdk', 'Remove-OCIApigatewaySubscriber', 'Remove-OCIApigatewayUsagePlan', 'Stop-OCIApigatewayWorkRequest', 'Update-OCIApigatewayApi', 'Update-OCIApigatewayCertificate', 'Update-OCIApigatewayDeployment', 'Update-OCIApigatewayGateway', 'Update-OCIApigatewaySdk', 'Update-OCIApigatewaySubscriber', 'Update-OCIApigatewayUsagePlan' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Apigateway' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0
1384.ps1
function Uninstall-CCertificate { [CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='ByThumbprint')] param( [Parameter(Mandatory=$true,ParameterSetName='ByThumbprint',ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)] [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndCustomStoreName')] [string] $Thumbprint, [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndCustomStoreName')] [Security.Cryptography.X509Certificates.X509Certificate2] $Certificate, [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndCustomStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndCustomStoreName')] [Security.Cryptography.X509Certificates.StoreLocation] $StoreLocation, [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndStoreName')] [Security.Cryptography.X509Certificates.StoreName] $StoreName, [Parameter(Mandatory=$true,ParameterSetName='ByThumbprintAndCustomStoreName')] [Parameter(Mandatory=$true,ParameterSetName='ByCertificateAndCustomStoreName')] [string] $CustomStoreName, [Parameter(ParameterSetName='ByThumbprintAndStoreName')] [Parameter(ParameterSetName='ByThumbprintAndCustomStoreName')] [Parameter(ParameterSetName='ByCertificateAndStoreName')] [Parameter(ParameterSetName='ByCertificateAndCustomStoreName')] [Management.Automation.Runspaces.PSSession[]] $Session ) process { Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( $PSCmdlet.ParameterSetName -like 'ByCertificate*' ) { $Thumbprint = $Certificate.Thumbprint } $invokeCommandParameters = @{} if( $Session ) { $invokeCommandParameters['Session'] = $Session } if( $PSCmdlet.ParameterSetName -eq 'ByThumbprint' ) { Get-ChildItem -Path 'Cert:\LocalMachine','Cert:\CurrentUser' -Recurse | Where-Object { -not $_.PsIsContainer } | Where-Object { $_.Thumbprint -eq $Thumbprint } | ForEach-Object { $cert = $_ $description = $cert.FriendlyName if( -not $description ) { $description = $cert.Subject } $certPath = $_.PSPath | Split-Path -NoQualifier Write-Verbose ('Uninstalling certificate ''{0}'' ({1}) at {2}.' -f $description,$cert.Thumbprint,$certPath) $_ } | Remove-Item return } Invoke-Command @invokeCommandParameters -ScriptBlock { [CmdletBinding()] param( [string] $Thumbprint, [Security.Cryptography.X509Certificates.StoreLocation] $StoreLocation, $StoreName, [string] $CustomStoreName ) Set-StrictMode -Version 'Latest' if( $CustomStoreName ) { $storeNamePath = $CustomStoreName } else { $storeNamePath = $StoreName if( $StoreName -eq [Security.Cryptography.X509Certificates.StoreName]::CertificateAuthority ) { $storeNamePath = 'CA' } } $certPath = Join-Path -Path 'Cert:\' -ChildPath $StoreLocation $certPath = Join-Path -Path $certPath -ChildPath $storeNamePath $certPath = Join-Path -Path $certPath -ChildPath $Thumbprint if( -not (Test-Path -Path $certPath -PathType Leaf) ) { Write-Debug -Message ('Certificate {0} not found.' -f $certPath) return } $cert = Get-Item -Path $certPath if( $CustomStoreName ) { $store = New-Object 'Security.Cryptography.X509Certificates.X509Store' $CustomStoreName,$StoreLocation } else { $store = New-Object 'Security.Cryptography.X509Certificates.X509Store' ([Security.Cryptography.X509Certificates.StoreName]$StoreName),$StoreLocation } $store.Open( ([Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite) ) try { $target = $cert.FriendlyName if( -not $target ) { $target = $cert.Subject } if( $PSCmdlet.ShouldProcess( ("certificate {0} ({1})" -f $certPath,$target), "remove" ) ) { Write-Verbose ('Uninstalling certificate ''{0}'' ({1}) at {2}.' -f $target,$cert.Thumbprint,$certPath) $store.Remove( $cert ) } } finally { $store.Close() } } -ArgumentList $Thumbprint,$StoreLocation,$StoreName,$CustomStoreName } } Set-Alias -Name 'Remove-Certificate' -Value 'Uninstall-CCertificate'
0
604.ps1
function Send-PPErrorReport{ param( [Parameter(Mandatory=$true)] [String] $FileName, [Parameter(Mandatory=$true)] [String] $ScriptName, [switch] $ClearErrorVariable ) if($Error){ $Error $Body = "" $Error | foreach{$Body += $_.ToString() + $_.InvocationInfo.PositionMessage + "`n`n"} $Mail = Get-PPConfiguration $PSconfigs.Mail.Filter | %{$_.Content.Mail | where{$_.Name -eq $PSconfigs.Mail.ErrorClass}} | select -first 1 Send-MailMessage -To $Mail.ReplyToAddress -From $Mail.FromAddress -Subject ($env:COMPUTERNAME + " " + $ScriptName + " if($ClearErrorVariable){$error.clear()} } }
0
sample_4_74.ps1
# # Module manifest for module 'OCI.PSModules.Visualbuilder' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Visualbuilder.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '30071ced-fbc1-4b5d-9ea5-b0fb2ecea5bc' # Author of this module Author = 'Oracle Cloud Infrastructure' # Company or vendor of this module CompanyName = 'Oracle Corporation' # Copyright statement for this module Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.' # Description of the functionality provided by this module Description = 'This modules provides Cmdlets for OCI Visualbuilder Service' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '93.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Visualbuilder.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-OCIVisualbuilderVbInstance', 'Get-OCIVisualbuilderVbInstancesList', 'Get-OCIVisualbuilderWorkRequest', 'Get-OCIVisualbuilderWorkRequestErrorsList', 'Get-OCIVisualbuilderWorkRequestLogsList', 'Get-OCIVisualbuilderWorkRequestsList', 'Invoke-OCIVisualbuilderRequestSummarizedApplications', 'Move-OCIVisualbuilderVbInstanceCompartment', 'New-OCIVisualbuilderVbInstance', 'Remove-OCIVisualbuilderVbInstance', 'Start-OCIVisualbuilderVbInstance', 'Stop-OCIVisualbuilderVbInstance', 'Update-OCIVisualbuilderVbInstance' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = '*' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Visualbuilder' # A URL to the license for this module. LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt' # A URL to the main website for this project. ProjectUri = 'https://github.com/oracle/oci-powershell-modules/' # A URL to an icon representing this module. IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png' # ReleaseNotes of this module ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' }
0