ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

What's New in PowerShell 3.0

PowerShell

What's New

Автор: John Savill's Technical Training

Загружено: 2013-05-17

Просмотров: 1467

Описание: An overview of some of the coolest new features of PowerShell 3.0. Check out my blog at http://www.savilltech.com/blog for the latest information. Below is the code I use in this video.

#region CIM
Get-Command -Module CimCmdlets

Get-CimClass -ClassName disk
Get-CimClass win32* -MethodName Term*
Get-CimInstance Win32_Process
#endregion

#region Simplification example
Get-Process | where {$_.HandleCount -gt 900}
Get-Process | where {$psitem.HandleCount -gt 900}
Get-Process | where HandleCount -gt 900
#endregion

#region Robust sessions
$RemoteSession = New-PSSession --Name Server1Session --ComputerName savdaldc01
Invoke-Command --Session $RemoteSession --ScriptBlock {$date = Get-Date}
Disconnect-PSSession --session $RemoteSession

#This would then be run on the savdaldc01 machine locally showing state not lost
Get-PSSession --ComputerName localhost
$LocalSession = Connect-PSSession --ComputerName localhost --Name Server1Session
Invoke-command --Session $LocalSession --Scriptblock { $date }
Get-PSSession --ComputerName localhost | Remove-PSSession
#endregion

#region Workflow
Workflow MyWorkflow {Write-Output -InputObject "Hello from Workflow!"}
Get-Command --Name MyWorkflow --Syntax
MyWorkflow


Workflow LongWorkflow
{
Write-Output -InputObject "Loading some information..."
Start-Sleep -Seconds 10
CheckPoint-Workflow
Write-Output -InputObject "Performing some action..."
Start-Sleep -Seconds 10
CheckPoint-Workflow
Write-Output -InputObject "Cleaning up..."
Start-Sleep -Seconds 10
}

LongWorkflow --AsJob --JobName LongWF
Suspend-Job LongWF
Get-Job LongWF
Receive-Job LongWF --Keep
Resume-Job LongWF
Get-Job LongWF
Receive-Job LongWF --Keep
Remove-Job LongWF
#endregion

#region Background job
$Trigger = New-JobTrigger --Daily --At 2am
Register-ScheduledJob --Name MyScheduledJob --ScriptBlock {Get-Process} --Trigger $Trigger
Get-ScheduledJob
(Get-ScheduledJob --Name MyScheduledJob).JobTriggers
Get-ScheduledJob --Name MyScheduledJob
Unregister-ScheduledJob -Name MyScheduledJob
#endregion

#region Misc commands
Get-Command disk
Get-Module
Get-Disk
Get-Module
Show-Command
Get-Command | sort Module | out-gridview
#endregion

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
What's New in PowerShell 3.0

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]