OCS PowerShell Functions from the OCS RTM Reskit, OCS-ALL.ps1
PowerShell is what you make out of it. It's a base for powerful scripting that can help you determine specific information about an OCS deployment, change a single attribute of a single user or change multiple attributes on thousands of users.
This script can be loaded by launching PowerShell, change directory to where your PS scripts live, and run the script:
- PS C:\PowerShell_scripts>. ./OCS-ALL.ps1
You'll now be able to run any of the OCS functions for the OCS-ALL,ps1 script. Some of these functions will return a single line answer and some will return many lines of data. In the later case I like to "pipe" the results into a text file.
Other functions from the OCS-ALL.ps1 that I use that require you to pipe the results into a text file are:
- Get-ocserrorevent >ocserror.txt
- Get-ocswaringevent >ocswarning.txt
The following are all the functions within the OCS-ALL.ps1 script.
- Get-OCSSIPDomain
- New-OCSSIPDomain
- Remove-OCSSipDomain
- Get-OCSPool
- Choose-OCSPool
- Get-OCSADContainer
- Get-OCSSchemaVersion
- Get-OCSWarningEvent
- Get-OCSErrorEvent
- Get-OCSUser
- Remove-OCSUser
- Get-OCSUserDetail
- Get-OCSPICUserCount
- Get-ADUser
- Export-ADUser
- New-OCSuser
- Update-OCSUser
- Export-OCSUser
- Import-OCSUser
- Get-OCSMeetingPolicy
- New-OCSMeetingPolicy
- Update-OCSMeetingPolicy
- Remove-OCSMeetingPolicy
- Choose-OCSMeetingPolicy
- Get-OCSUCPolicy
- New-OCSUCPolicy
- Update-OCSUCPolicy
- Remove-OCSUCPolicy
- Choose-OCSUCPolicy
- Get-OCSNormalizationRule
- Choose-OCSNormalizationRule
- New-OCSNormalizationRule
- Remove-OCSNormalizationRule
- Update-OCSNormalizationRule
- Get-OCSLocationProfile
- Choose-OCSLocationProfile
- Remove-OCSLocationProfile
- New-OCSLocationProfile
- Add-OCSNormalizationRuleToOCSLocationProfile
- Remove-OCSNormalizationRuleFromOCSLocationProfile
- Get-OCSPhoneRoute
- Choose-OCSPhoneRoute
- Remove-OCSPhoneRoute
- New-OCSPhoneRoute
- Update-OCSPhoneRoute
- Get-OCSPhoneRouteUsage
- Choose-OCSPhoneRouteUsage
- Remove-OCSPhoneRouteUsage
- New-OCSPhoneRouteUsage
- Get-OCSGlobalUCSetting
- Get-OCSUCPolicyForOCSUser
- Get-OCSPhoneRouteUsageForOCSUCPolicy
- Get-OCSPhoneRouteForOCSPhoneRouteUsage
- Get-OCSPhoneRouteForNumber
- Add-OCSPhoneRouteUsageToOCSPhoneRoute
- Remove-OCSPhoneRouteUsageFromOCSPhoneRoute
- Add-OCSPhoneRouteUsageToOCSUCPolicy
- Remove-OCSPhoneRouteUsageFromOCSUCPolicy
- Start-OCSReplication
- Get-OCSWindowsService
- Stop-OCSWindowsService
- Start-OCSWindowsService
- Get-OCSSipRoutingCert
- Get-OCSEdgeFederationExternalCert
- Get-OCSEdgeFederationInternalCert
- Get-OCSEdgeConferencingExternalCert
- Get-OCSEdgeAvAuthCert
- Get-OCSEdgeInternalDomain
- New-OCSEdgeInternalDomain
- Remove-OCSEdgeInternalDomain
- Get-OCSEdgeInternalServer
- New-OCSEdgeInternalServer
- Remove-OCSEdgeInternalServer
- Get-OCSEdgeFederationDenied
- Remove-OCSEdgeFederationDenied
- New-OCSEdgeFederationDenied
- Get-OCSEdgeFederationPartner
- New-OCSEdgeFederationPartner
- Export-OCSEdgeFederationPartner
- Import-OCSEdgeFederationPartner
- Remove-OCSEdgeFederationPartner
- Get-OCSEdgeIMProvider
- New-OCSEdgeIMProvider
- Update-OCSEdgeIMProvider
- Remove-OCSEdgeIMProvider
- Get-OCSTrustedService
- Choose-OCSMediationServer
- Get-OCSMediationServerSetting
- Set-OCSMediationServerPlusSign
- Enable-ExchUmForOcsUser
- Get-ExchUMDialPlan
- Get-OCSFunction