Имя пользователя:
Пароль:
 | Правила  

Компьютерный форум OSzone.net » Программирование, базы данных и автоматизация действий » Скриптовые языки администрирования Windows » PowerShell - [решено] Модуль DhcpServer

Ответить
Настройки темы
PowerShell - [решено] Модуль DhcpServer

Новый участник


Сообщения: 24
Благодарности: 0

Профиль | Сайт | Отправить PM | Цитировать


Стандартный модуль, что ставится вместе с RSAT.
Можно ли задать 2 параметра по умолчанию -ComputerName и -ScopeId ? Которые нужно прописывать во всех функциях ниже:
Код: Выделить весь код
PS C:\WINDOWS\system32> Get-Command -Module dhcpserver

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           Reconcile-DhcpServerv4IPRecord                     2.0.0.0    DhcpServer
Function        Add-DhcpServerInDC                                 2.0.0.0    DhcpServer
Function        Add-DhcpServerSecurityGroup                        2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Class                              2.0.0.0    DhcpServer
Function        Add-DhcpServerv4ExclusionRange                     2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Failover                           2.0.0.0    DhcpServer
Function        Add-DhcpServerv4FailoverScope                      2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Filter                             2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Lease                              2.0.0.0    DhcpServer
Function        Add-DhcpServerv4MulticastExclusionRange            2.0.0.0    DhcpServer
Function        Add-DhcpServerv4MulticastScope                     2.0.0.0    DhcpServer
Function        Add-DhcpServerv4OptionDefinition                   2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Policy                             2.0.0.0    DhcpServer
Function        Add-DhcpServerv4PolicyIPRange                      2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Reservation                        2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Scope                              2.0.0.0    DhcpServer
Function        Add-DhcpServerv4Superscope                         2.0.0.0    DhcpServer
Function        Add-DhcpServerv6Class                              2.0.0.0    DhcpServer
Function        Add-DhcpServerv6ExclusionRange                     2.0.0.0    DhcpServer
Function        Add-DhcpServerv6Lease                              2.0.0.0    DhcpServer
Function        Add-DhcpServerv6OptionDefinition                   2.0.0.0    DhcpServer
Function        Add-DhcpServerv6Reservation                        2.0.0.0    DhcpServer
Function        Add-DhcpServerv6Scope                              2.0.0.0    DhcpServer
Function        Backup-DhcpServer                                  2.0.0.0    DhcpServer
Function        Export-DhcpServer                                  2.0.0.0    DhcpServer
Function        Get-DhcpServerAuditLog                             2.0.0.0    DhcpServer
Function        Get-DhcpServerDatabase                             2.0.0.0    DhcpServer
Function        Get-DhcpServerDnsCredential                        2.0.0.0    DhcpServer
Function        Get-DhcpServerInDC                                 2.0.0.0    DhcpServer
Function        Get-DhcpServerSetting                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Binding                            2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Class                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv4DnsSetting                         2.0.0.0    DhcpServer
Function        Get-DhcpServerv4ExclusionRange                     2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Failover                           2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Filter                             2.0.0.0    DhcpServer
Function        Get-DhcpServerv4FilterList                         2.0.0.0    DhcpServer
Function        Get-DhcpServerv4FreeIPAddress                      2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Lease                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv4MulticastExclusionRange            2.0.0.0    DhcpServer
Function        Get-DhcpServerv4MulticastLease                     2.0.0.0    DhcpServer
Function        Get-DhcpServerv4MulticastScope                     2.0.0.0    DhcpServer
Function        Get-DhcpServerv4MulticastScopeStatistics           2.0.0.0    DhcpServer
Function        Get-DhcpServerv4OptionDefinition                   2.0.0.0    DhcpServer
Function        Get-DhcpServerv4OptionValue                        2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Policy                             2.0.0.0    DhcpServer
Function        Get-DhcpServerv4PolicyIPRange                      2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Reservation                        2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Scope                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv4ScopeStatistics                    2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Statistics                         2.0.0.0    DhcpServer
Function        Get-DhcpServerv4Superscope                         2.0.0.0    DhcpServer
Function        Get-DhcpServerv4SuperscopeStatistics               2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Binding                            2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Class                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv6DnsSetting                         2.0.0.0    DhcpServer
Function        Get-DhcpServerv6ExclusionRange                     2.0.0.0    DhcpServer
Function        Get-DhcpServerv6FreeIPAddress                      2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Lease                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv6OptionDefinition                   2.0.0.0    DhcpServer
Function        Get-DhcpServerv6OptionValue                        2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Reservation                        2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Scope                              2.0.0.0    DhcpServer
Function        Get-DhcpServerv6ScopeStatistics                    2.0.0.0    DhcpServer
Function        Get-DhcpServerv6StatelessStatistics                2.0.0.0    DhcpServer
Function        Get-DhcpServerv6StatelessStore                     2.0.0.0    DhcpServer
Function        Get-DhcpServerv6Statistics                         2.0.0.0    DhcpServer
Function        Get-DhcpServerVersion                              2.0.0.0    DhcpServer
Function        Import-DhcpServer                                  2.0.0.0    DhcpServer
Function        Invoke-DhcpServerv4FailoverReplication             2.0.0.0    DhcpServer
Function        Remove-DhcpServerDnsCredential                     2.0.0.0    DhcpServer
Function        Remove-DhcpServerInDC                              2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Class                           2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4ExclusionRange                  2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Failover                        2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4FailoverScope                   2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Filter                          2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Lease                           2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4MulticastExclusionRange         2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4MulticastLease                  2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4MulticastScope                  2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4OptionDefinition                2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4OptionValue                     2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Policy                          2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4PolicyIPRange                   2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Reservation                     2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Scope                           2.0.0.0    DhcpServer
Function        Remove-DhcpServerv4Superscope                      2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6Class                           2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6ExclusionRange                  2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6Lease                           2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6OptionDefinition                2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6OptionValue                     2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6Reservation                     2.0.0.0    DhcpServer
Function        Remove-DhcpServerv6Scope                           2.0.0.0    DhcpServer
Function        Rename-DhcpServerv4Superscope                      2.0.0.0    DhcpServer
Function        Repair-DhcpServerv4IPRecord                        2.0.0.0    DhcpServer
Function        Restore-DhcpServer                                 2.0.0.0    DhcpServer
Function        Set-DhcpServerAuditLog                             2.0.0.0    DhcpServer
Function        Set-DhcpServerDatabase                             2.0.0.0    DhcpServer
Function        Set-DhcpServerDnsCredential                        2.0.0.0    DhcpServer
Function        Set-DhcpServerSetting                              2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Binding                            2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Class                              2.0.0.0    DhcpServer
Function        Set-DhcpServerv4DnsSetting                         2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Failover                           2.0.0.0    DhcpServer
Function        Set-DhcpServerv4FilterList                         2.0.0.0    DhcpServer
Function        Set-DhcpServerv4MulticastScope                     2.0.0.0    DhcpServer
Function        Set-DhcpServerv4OptionDefinition                   2.0.0.0    DhcpServer
Function        Set-DhcpServerv4OptionValue                        2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Policy                             2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Reservation                        2.0.0.0    DhcpServer
Function        Set-DhcpServerv4Scope                              2.0.0.0    DhcpServer
Function        Set-DhcpServerv6Binding                            2.0.0.0    DhcpServer
Function        Set-DhcpServerv6Class                              2.0.0.0    DhcpServer
Function        Set-DhcpServerv6DnsSetting                         2.0.0.0    DhcpServer
Function        Set-DhcpServerv6OptionDefinition                   2.0.0.0    DhcpServer
Function        Set-DhcpServerv6OptionValue                        2.0.0.0    DhcpServer
Function        Set-DhcpServerv6Reservation                        2.0.0.0    DhcpServer
Function        Set-DhcpServerv6Scope                              2.0.0.0    DhcpServer
Function        Set-DhcpServerv6StatelessStore                     2.0.0.0    DhcpServer
Dhcp сервер один и область тоже одна, очень надоедает вбивать одно и тоже постоянно
Get-DhcpServerv4Reservation -ComputerName srvdc -ScopeId 111.111.0.0 | Sort-Object name

Отправлено: 16:46, 12-03-2015

 

Ветеран


Сообщения: 1259
Благодарности: 861

Профиль | Отправить PM | Цитировать


Код: Выделить весь код
$PSDefaultParameterValues = @{"*-DhcpServerv*:ComputerName"="srvdc";"*-DhcpServerv*:ScopeId"="111.111.0.0"}
Это сообщение посчитали полезным следующие участники:

Отправлено: 16:57, 12-03-2015 | #2



Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети.

Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля.


Аватара для IVa_

Старожил


Сообщения: 349
Благодарности: 16

Профиль | Цитировать


Конечно можно, в PowerShell можно программировать процесс программирования.
Только вот как этого я вам не скажу.Хотел предложить, параметры занести в переменные, но это не ответ на ваш вопрос верно.
$ComputerName = $true
$ScopeId = $True

-------
Одна и та же информация в разное время может быть полезной и бесполезной.


Отправлено: 17:00, 12-03-2015 | #3



Компьютерный форум OSzone.net » Программирование, базы данных и автоматизация действий » Скриптовые языки администрирования Windows » PowerShell - [решено] Модуль DhcpServer

Участник сейчас на форуме Участник сейчас на форуме Участник вне форума Участник вне форума Автор темы Автор темы Шапка темы Сообщение прикреплено

Похожие темы
Название темы Автор Информация о форуме Ответов Последнее сообщение
Службы - Модуль поддержки NetBIOS abanazidi Microsoft Windows 7 4 20-12-2013 08:42
[решено] Дополнительный модуль памяти напарНИК Материнские платы и память 1 08-12-2010 18:35
[решено] Появился рекламный модуль Dador Лечение систем от вредоносных программ 25 19-05-2010 13:29
Рекламный модуль eifbest Лечение систем от вредоносных программ 1 08-07-2009 09:06
PHP NUKE и модуль Scorpion666 Вебмастеру 12 29-03-2006 07:26




 
Переход