This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to the Extracted or Mounted Windows ISO | |
$ISOMediaFolder = 'E:\' | |
# Path to new re-mastered ISO | |
$ISOFile = 'C:\Users\lamw\Desktop\Windows2016.iso' | |
# Need to specify the root directory of the oscdimg.exe utility which you need to download | |
$PathToOscdimg = 'C:\Program Files\Windows AIK\Tools\PETools' | |
# Instead of pointing to normal efisys.bin, use the *_noprompt instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Domainlist = Import-Csv -Path DomainList.csv | |
foreach ($domain in $Domainlist){ | |
netdom trust lab.local /Domain:$($domain.name) /remove /Force /verbose | |
write-host "Trist domain $($domain.name) deleted" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.iconTheme": "vscode-icons", | |
"workbench.colorTheme": "Dracula", | |
"files.defaultLanguage": "powershell", | |
"powershell.scriptAnalysis.enable": true, | |
"powershell.codeFormatting.openBraceOnSameLine": true, | |
"editor.formatOnSave": true, | |
"editor.formatOnType": true, | |
"editor.formatOnPaste": true, | |
"powershell.integratedConsole.focusConsoleOnExecute": false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hosts = Get-VMHost | |
$versions = @{} | |
Foreach($vihost in $hosts){ | |
$esxcli = Get-VMHost $vihost | Get-EsxCli | |
$versions.Add($vihost, ($esxcli.system.module.get("enic") | | |
Select Version)) | |
} | |
$versions.GetEnumerator() | Sort-Object Name | Format-List |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hosts = Get-VMHost | |
$versions = @{} | |
Foreach($vihost in $hosts){ | |
$esxcli = Get-VMHost $vihost | Get-EsxCli | |
$versions.Add($vihost, ($esxcli.system.module.get("fnic") | | |
Select Version)) | |
} | |
$versions.GetEnumerator() | Sort Name | Format-List |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$report = @() | |
$VMs = Get-datastore | Where {$_.name -like '*DSName*' -or $_.name -like '*DSName*'} | Get-VM | |
Foreach ($VM in $VMs){ | |
$line = $VM | Select Name, @{N="vCPU";E={($_).NumCpu}}, @{N="Memory (GB)";E={($_).MemoryGB}}, @{N="Cluster";E={Get-Cluster -VM $_}}, @{N="Folder";E={$_.folder}}, @{N="Network";E={$_.Networkadapters.NetworkName}} | |
$report += $line | |
} | |
$report | Export-csv C:\temp\VMList.csv -NoTypeInformation -UseCulture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vms = Get-Cluster <cluster_name> | Get-VM | |
write-host "Powered on: " ($vms | where {$_.PowerState -eq "PoweredOn"}).Count | |
write-host "Powered off: " ($vms | where {$_.PowerState -eq "PoweredOff"}).Count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$password = "password" | ConvertTo-SecureString -AsPlainText -Force | |
$username = "user" | |
$cred = New-Object System.Management.Automation.PSCredential($username,$password) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) { | |
. "C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?$APPLICATION->IncludeComponent("bitrix:sale.basket.basket.line", "", Array( | |
"PATH_TO_BASKET" => SITE_DIR."personal/cart/", // Страница корзины | |
"PATH_TO_PERSONAL" => SITE_DIR."personal/", // Страница персонального раздела | |
"SHOW_PERSONAL_LINK" => "N", // Отображать персональный раздел | |
"SHOW_NUM_PRODUCTS" => "Y", // Показывать количество товаров | |
"SHOW_TOTAL_PRICE" => "Y", // Показывать общую сумму по товарам | |
"SHOW_PRODUCTS" => "N", // Показывать список товаров | |
"POSITION_FIXED" => "N", // Отображать корзину поверх шаблона | |
"SHOW_AUTHOR" => "Y", // Добавить возможность авторизации | |
"PATH_TO_REGISTER" => SITE_DIR."login/", // Страница регистрации |
NewerOlder