- Get-PSSnapin
- Syntax
- Description
- Examples
- Example 1: Get snap-ins that are currently loaded
- Example 2: Get snap-ins that have been registered
- Example 3: Get current snap-ins that match a string
- Parameters
- Inputs
- Outputs
- Notes
- Add-PSSnapin
- Синтаксис
- Описание
- Параметры
- -PassThru
- Ввод и вывод
- Примечания
- SharePoint командлеты
- Add-PSSnapin
- Syntax
- Description
- Examples
- Example 1: Add snap-ins
- Example 2: Add all the registered snap-ins
- Example 3: Register a snap-in and add it
- Parameters
- Inputs
- Outputs
- Notes
Get-PSSnapin
Gets the Windows PowerShell snap-ins on the computer.
Syntax
Description
The Get-PSSnapin cmdlet gets the Windows PowerShell snap-ins that have been added to the current session or that have been registered on the system. This cmdlet lists the snap-ins in the order in which they are detected.
Get-PSSnapin gets only registered snap-ins. To register a Windows PowerShell snap-in, use the InstallUtil tool included with the Microsoft .NET Framework 2.0. For more information, see How to Register Cmdlets, Providers, and Host Applications.
Starting in Windows PowerShell 3.0, the core commands that are included in Windows PowerShell are packaged in modules. The exception is Microsoft.PowerShell.Core, which is a snap-in (PSSnapin). By default, only the Microsoft.PowerShell.Core snap-in is added to the session. Modules are imported automatically on first use and you can use the Import-Module cmdlet to import them.
Examples
Example 1: Get snap-ins that are currently loaded
This command gets the Windows PowerShell snap-ins that are currently loaded in the session. This includes the snap-ins that are installed with Windows PowerShell and those that have been added to the session.
Example 2: Get snap-ins that have been registered
This command gets the Windows PowerShell snap-ins that have been registered on the computer, including those that have already been added to the session. The output does not include snap-ins that are installed with Windows PowerShell or Windows PowerShell snap-in dynamic-link libraries (DLLs) that have not yet been registered on the system.
Example 3: Get current snap-ins that match a string
This command gets the Windows PowerShell snap-ins in the current session that have names that begin with smp.
Parameters
Specifies an array of snap-in names. This cmdlet gets only the specified Windows PowerShell snap-ins. Wildcard characters are permitted.
Type: | String [ ] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that this cmdlet gets the Windows PowerShell snap-ins that have been registered on the system even if they have not yet been added to the session.
The snap-ins that are installed with Windows PowerShell do not appear in this list.
Without this parameter, Get-PSSnapin gets the Windows PowerShell snap-ins that have been added to the session.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
You cannot pipe input to this cmdlet.
Outputs
Get-PSSnapin returns an object for each snap-in that it gets.
Notes
Starting in Windows PowerShell 3.0, the core commands that are installed with Windows PowerShell are packaged in modules. In Windows PowerShell 2.0, and in host programs that create older-style sessions in later versions of Windows PowerShell, the core commands are packaged in snap-ins (PSSnapin). The exception is Microsoft.PowerShell.Core, which is always a snap-in. Also, remote sessions, such as those started by the New-PSSession cmdlet, are older-style sessions that include core snap-ins.
For information about the CreateDefault2 method that creates newer-style sessions with core modules, see CreateDefault2 Method.
Add-PSSnapin
Добавляет одну или несколько оснасток Windows PowerShell в текущий сеанс.
Синтаксис
Описание
Командлет Add-PSSnapin добавляет зарегистрированные оснастки Windows PowerShell в текущий сеанс. После добавления оснасток в текущем сеансе можно использовать командлеты и поставщики, которые поддерживаются этими оснастками.
Чтобы добавить оснастки во все будущие сеансы Windows PowerShell, следует добавить команду Add-PSSnapin в профиль Windows PowerShell. Дополнительные сведения см. в разделе about_Profiles.
Параметры
Задает имя оснастки. (Это параметр Name, его не следует путать с параметром AssemblyName или ModuleName.)
Чтобы определить имена зарегистрированных в системе оснасток, введите команду «Get-PSSnapin -registered».
Значение по умолчанию
Принимать входные данные из конвейера?
Принимать подстановочные знаки?
-PassThru
Возвращает объект, представляющий каждую добавленную оснастку. По умолчанию этот командлет не формирует никаких выходных данных.
Значение по умолчанию
Принимать входные данные из конвейера?
Принимать подстановочные знаки?
Данный командлет поддерживает общие параметры -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer и -OutVariable. Дополнительные сведения см. в разделе about_Commonparameters.
Ввод и вывод
Входным типом является тип объектов, которые можно передавать командлету по конвейеру. Возвращаемым типом является тип объектов, возвращаемых командлетом.
Объекты невозможно передать командлету Add-PSSnapin по конвейеру.
Нет или System.Management.Automation.PSSnapInInfo
При использовании параметра PassThru командлет Add-PSSnapin возвращает объект PSSnapInInfo, представляющий оснастку. В противном случае этот командлет не формирует никаких выходных данных.
Примечания
Чтобы получить дополнительные сведения об оснастках Windows PowerShell, см. раздел about_Pssnapins. Сведения о создании оснастки Windows PowerShell см. в разделе «Как создать оснастку Windows PowerShell» в библиотеке MSDN (Microsoft Developer Network) по адресу https://go.microsoft.com/fwlink/?LinkId=144762.
Командлет Add-PSSnapin добавляет оснастку только в текущий сеанс. Чтобы добавить оснастку во все сеансы Windows PowerShell, ее следует добавить в профиль Windows PowerShell. Дополнительные сведения см. в разделе about_Profiles.
Может быть добавлена любая оснастка Windows PowerShell, зарегистрированная при помощи программы установки Microsoft .NET Framework. Дополнительные сведения см. в разделе «Регистрация командлетов, поставщиков и ведущих приложений» библиотеки MSDN по адресу https://go.microsoft.com/fwlink/?LinkID=143619.
Для получения списка оснасток, зарегистрированных на компьютере, введите команду «Get-PSSnapin -registered».
Перед добавлением оснастки командлет Add-PSSnapin проверяет версию оснастки, чтобы удостовериться в ее совместимости с текущей версией Windows PowerShell. Если версия оснастки не поддерживается, Windows PowerShell сообщает об ошибке.
SharePoint командлеты
+ CategoryInfo : InvalidArgument: (Microsoft.SharePoint.PowerShell:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCom mand
Обязательно обновить версию или есть способ добавить оснастку?
Сайты и рабочие области SharePoint
Объясните пожалуйста на пальцах, как создать рабочую область второго уровня (т.е. внутри рабочей.
Действия над элементами списка Sharepoint 2013
Доброго времени суток ! Есть список в SharePoint 2013 с информацией о сотрудниках организации для.
SharePoint
Здравствуйте! У меня такой вопрос, есть какие нибудь статьи по интеграции SharePoint с Си — шарп.
VS C# SharePoint
Добрый день. Пытаюсь развернуть решение в Visual Studio 2010 C# для проекта SharePoint Foundation.
Установкой на хост SP не озадачивался.
Попробую завтра обновить шел до 5, но не уверен, что это решит вопрос полностью.
Оснастка «Microsoft.SharePoint.PowerShell» установлена на самом SharePoint сервере. Поэтому запускайте нужный скрипт непосредственно на SPP сервере или используйте PS Remoting с клиентской машины.
Пока скрипт нужно запускать именно на хостовой машине, не буду объяснять об особенностях работы нашей корпоративной сети и разграничении доступа, это естественно и понятно. Есть несколько веток, куда у меня есть права, где необходимо размещать файл с результатом работы другого скрипта, хочу объединить в один, создать задание в планировщике и забыть. Возможно, задание переместиться на какой-нибудь из серверов, но не SP, где потребуется аналогичные манипуляции.
Не хотелось бы на хост ставить SP сервер только для того чтобы оснастка появилась, надо попробовать отрыть DLL и зарегистрировать.
PS Remoting пока не использовал, сейчас буду гуглить. Спасибо за подсказку.
Добавлено через 3 часа 33 минуты
С PS Remoting не получиться, т.к. служба WinRM на сервере SP отсутствует и на нем в принципе ничего не поменять (это к вопросу разграничения полномочий), но уж очень не хочется вручную файл выкладывать.
Ищу варианты.
Глупый вопрос: возможно ли нестандартным способом зарегистрировать в Win7x64 библиотеку SPServer2007, установленный на WinServ2003x32_SP2?
Решил задачу, оказалось все так просто.
Подключил как сетевой диск и скопировал.
Заказываю контрольные, курсовые, дипломные и любые другие студенческие работы здесь или здесь.
размещение на SharePoint
Коллеги, помогите разобраться. Есть база. пытаюсь ее разместить на SharePoint — начала ругаться.
Access и Sharepoint
Добрый день. Извините если создал тему не там. Есть БД аксес и в ней формы. Как можно отображать.
русификация sharepoint
Скачала с оф сайта sharepoint services 3.0 с русским языком, поставила sharepoint(у меня windows.
Публикация БД на Sharepoint
Добрый вечер! Помогите, пожалуйста! Мною была создана БД с формами для записи новых данных в.
Add-PSSnapin
Adds one or more Windows PowerShell snap-ins to the current session.
Syntax
Description
The Add-PSSnapin cmdlet adds registered Windows PowerShell snap-ins to the current session. After the snap-ins are added, you can use the cmdlets and providers that the snap-ins support in the current session.
To add the snap-in to all future Windows PowerShell sessions, add an Add-PSSnapin command to your Windows PowerShell profile. For more information, see about_Profiles.
Beginning in Windows PowerShell 3.0, the core commands that are included in Windows PowerShell are packaged in modules. The exception is Microsoft.PowerShell.Core, which is a snap-in (PSSnapin). By default, only the Microsoft.PowerShell.Core snap-in is added to the session. Modules are imported automatically on first use and you can use the Import-Module cmdlet to import them.
Examples
Example 1: Add snap-ins
This command adds the Microsoft Exchange and Active Directory snap-ins to the current session.
Example 2: Add all the registered snap-ins
This command adds all of the registered Windows PowerShell snap-ins to the session. It uses the Get-PSSnapin cmdlet with the Registered parameter to get objects representing each of the registered snap-ins. The pipeline operator (|) passes the result to Add-PSSnapin , which adds them to the session. The PassThru parameter returns objects that represent each of the added snap-ins.
Example 3: Register a snap-in and add it
The first command gets snap-ins that have been added to the current session that include the snap-ins that are installed with Windows PowerShell. In this example, ManagementFeatures is not returned. This indicates that it has not been added to the session.
The second command gets snap-ins that have been registered on your system, which includes those that have already been added to the session. It does not include the snap-ins that are installed with Windows PowerShell. In this case, the command does not return any snap-ins. This indicates that the ManagementFeatures snapin has not been registered on the system.
The third command creates an alias, installutil, for the path of the InstallUtil tool in .NET Framework.
The fourth command uses the InstallUtil tool to register the snap-in. The command specifies the path of ManagementCmdlets.dll, the filename or module name of the snap-in.
The fifth command is the same as the second command. This time, you use it to verify that the ManagementCmdlets snap-in is registered.
The sixth command uses the Add-PSSnapin cmdlet to add the ManagementFeatures snap-in to the session. It specifies the name of the snap-in, ManagementFeatures, not the file name.
To verify that the snap-in is added to the session, the seventh command uses the Module parameter of the Get-Command cmdlet. It displays the items that were added to the session by a snap-in or module.
You can also use the PSSnapin property of the object that the Get-Command cmdlet returns to find the snap-in or module in which a cmdlet originated. The eighth command uses dot notation to find the value of the PSSnapin property of the Set-Alias cmdlet.
This example demonstrates the process of registering a snap-in on your system and then adding it to your session. It uses ManagementFeatures, a fictitious snap-in implemented in a file that is named ManagementCmdlets.dll.
Parameters
Specifies the name of the snap-in. This is the Name, not the AssemblyName or ModuleName. Wildcards are permitted.
To find the names of the registered snap-ins on your system, type Get-PSSnapin -Registered .
Type: | String [ ] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Indicates that this cmdlet returns an object that represents each added snap-in. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
You cannot pipe objects to this cmdlet.
Outputs
None or System.Management.Automation.PSSnapInInfo
This cmdlet returns a PSSnapInInfo object that represents the snap-in if you specify the PassThru parameter. Otherwise, this cmdlet does not generate any output.
Notes
Beginning in Windows PowerShell 3.0, the core commands that are installed with Windows PowerShell are packaged in modules. In Windows PowerShell 2.0, and in host programs that create older-style sessions in later versions of Windows PowerShell, the core commands are packaged in snap-ins (PSSnapins). The exception is Microsoft.PowerShell.Core, which is always a snap-in. Also, remote sessions, such as those started by the New-PSSession cmdlet, are older-style sessions that include core snap-ins.
For information about the CreateDefault2 method that creates newer-style sessions with core modules, see CreateDefault2 Method.
Add-PSSnapin adds the snap-in only to the current session. To add the snap-in to all Windows PowerShell sessions, add it to your Windows PowerShell profile. For more information, see about_Profiles.
You can add any snap-in that has been registered using the Microsoft .NET Framework install utility. For more information, see How to Register Cmdlets, Providers, and Host Applications.
To get a list of snap-ins that are registered on your computer, type Get-PSSnapin -Registered .
Before adding a snap-in, Add-PSSnapin checks the version of the snap-in to verify that it is compatible with the current version of Windows PowerShell. If the snap-in fails the version check, Windows PowerShell reports an error.