full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressArchive.ps1
Sample_xArchive_CompressArchive.ps1
Configuration Sample_xArchive_CompressArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Configuration Sample_xWindowsProcess_EnsureAbsentWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Not...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xRemoteFile.ps1
Sample_xRemoteFile.ps1
configuration Sample_xRemoteFile_DownloadFile { param ( [string[]] $nodeName = 'localhost', [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $destinationPath, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xService_ServiceWithCredential.ps1
Sample_xService_ServiceWithCredential.ps1
Configuration Sample_xService_ServiceWithCredential { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Configuration Sample_xWindowsProcess_ArgumentsWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess powershell { Path = "C:\Windows\System32\Win...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xService_CreateService.ps1
Sample_xService_CreateService.ps1
Configuration Sample_xService_CreateService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String] ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xDscWebService.ps1
Sample_xDscWebService.ps1
# DSC configuration for Pull Server and Compliance Server # Prerequisite: Certificate "CN=PSDSCPullServerCert" in "CERT:\LocalMachine\MY\" store # Note: A Certificate may be generated using MakeCert.exe: http://msdn.microsoft.com/en-us/library/windows/desktop/aa386968%28v=vs.85%29.aspx configuration Sample_xDscWeb...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_WithCredential.ps1
Sample_xWindowsProcess_WithCredential.ps1
Configuration Sample_xWindowsProcess_WithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Notepad.exe" ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressMultipleDirs.ps1
Sample_xArchive_CompressMultipleDirs.ps1
Configuration Sample_xArchive_CompressMultipleDirs { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xArchive_ExpandArchive.ps1
Sample_xArchive_ExpandArchive.ps1
Configuration Sample_xArchive_ExpandArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false)]...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xPSSessionConfiguration.ps1
Sample_xPSSessionConfiguration.ps1
configuration Sample_xPSEndpoint_NewWithDefaults { param ( [Parameter(Mandatory)] [String]$Name ) Import-DscResource -module xPSDesiredStateConfiguration xPSEndpoint PSSessionConfiguration { Name = $Name Ensure = 'Present' } } configuration...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressArchive.ps1
Test_Sample_xArchive_CompressArchive.ps1
$zipFilePath = "$pwd\Target.zip" del "$pwd\Sample-1.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-2.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-3.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/Examples/Sample_xFileUpload.ps1
Sample_xFileUpload.ps1
Configuration FileUploadConfiguration { param ( [parameter(Mandatory = $true)] [String] $destinationPath, [parameter(Mandatory = $true)] [String] $sourcePath, [PSCredential] $credential, [String] $certificateThumbprint ) Import-DscResource -modulename xPSDesiredStateConfiguration node localhost { ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1
New-PSSessionConfigurationResource.ps1
ipmo xDSCResourceDesigner $resProperties = @{ Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' ` -Name Name -Type String -Attribute Key RunAsCred = New-xDscResourceProperty -Description 'Credential for Running under d...
PowerShellCorpus/Github/absmart_PowerShell/DSC/PullServerSetup/Modules/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1
GenerateXRemoteFileSchema.ps1
$DestinationPath = New-xDscResourceProperty -Name DestinationPath -Type String -Attribute Key -Description 'Path under which downloaded or copied file should be accessible after operation.' $Uri = New-xDscResourceProperty -Name Uri -Type String -Attribute Required -Description 'Uri of a file which should be copied or ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xComputerManagement/Tests/xComputermanagement.Tests.ps1
xComputermanagement.Tests.ps1
$Module = "$PSScriptRoot\..\DSCResources\MSFT_xComputer\MSFT_xComputer.psm1" Remove-Module -Name MSFT_xComputer -Force -ErrorAction SilentlyContinue Import-Module -Name $Module -Force -ErrorAction Stop InModuleScope MSFT_xComputer { Describe 'MSFT_xComputer' { $SecPassword = ConvertTo...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSIProductId_xPackage.ps1
Sample_InstallMSIProductId_xPackage.ps1
<# Simple installer that installs an msi package and matches based on the product id. #> param ( [String]$OutputPath = ".", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $PackageName, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $S...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCreds_xPackage.ps1
Sample_InstallExeCreds_xPackage.ps1
<# Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials. #> param ( [String]$OutputPath = ".", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $PackageName, [parameter(Mandatory = $true)] [ValidateNo...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSI_xPackage.ps1
Sample_InstallMSI_xPackage.ps1
<# Simple installer for an msi package that matches via the Name. #> param ( [String]$OutputPath = ".", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $PackageName, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $SourcePath ) Conf...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCredsRegistry_xPackage.ps1
Sample_InstallExeCredsRegistry_xPackage.ps1
<# Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials. This sample also uses custom registry data to discover the package. #> param ( [String]$OutputPath = ".", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_DeleteService.ps1
Sample_xService_DeleteService.ps1
Configuration Sample_xService_DeleteService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType, [System.String] [Validate...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_ServiceWithCredential.ps1
Sample_xService_ServiceWithCredential.ps1
Configuration Sample_xService_ServiceWithCredential { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_CreateService.ps1
Sample_xService_CreateService.ps1
Configuration Sample_xService_CreateService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String] ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Configuration Sample_xWindowsProcess_EnsureAbsentWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Not...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Configuration Sample_xWindowsProcess_ArgumentsWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess powershell { Path = "C:\Windows\System32\Win...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/Sample_xWindowsProcess_WithCredential.ps1
Sample_xWindowsProcess_WithCredential.ps1
Configuration Sample_xWindowsProcess_WithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Notepad.exe" ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressMultipleDirs.ps1
Test_Sample_xArchive_CompressMultipleDirs.ps1
$zipFilePath = "$pwd\Target.zip" del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\SourceDir-2" -Force -Recurse -ErrorAction SilentlyContinue New-Item $pwd\SourceDir-1 -Type Directory | Out-Null New-Item $pwd\SourceDir-1\Sample-1.txt -Type File | Out-Null New-Item $pwd\SourceDir-...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_ExpandArchive.ps1
Test_Sample_xArchive_ExpandArchive.ps1
$zipFilePath = "$pwd\SampleArchive.zip" $expandedZipDir = "$pwd\TargetExpanded" del "$pwd\SourceDir" -Force -Recurse -ErrorAction SilentlyContinue del "$zipFilePath" -Force -Recurse -ErrorAction SilentlyContinue New-Item $pwd\SourceDir -Type Directory | Out-Null New-Item $pwd\SourceDir\Sample-1.txt -Type Fil...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_DeleteService.ps1
Sample_xService_DeleteService.ps1
Configuration Sample_xService_DeleteService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType, [System.String] [Validate...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressArchive.ps1
Sample_xArchive_CompressArchive.ps1
Configuration Sample_xArchive_CompressArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Configuration Sample_xWindowsProcess_EnsureAbsentWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Not...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xRemoteFile.ps1
Sample_xRemoteFile.ps1
configuration Sample_xRemoteFile_DownloadFile { param ( [string[]] $nodeName = 'localhost', [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $destinationPath, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_ServiceWithCredential.ps1
Sample_xService_ServiceWithCredential.ps1
Configuration Sample_xService_ServiceWithCredential { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Configuration Sample_xWindowsProcess_ArgumentsWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess powershell { Path = "C:\Windows\System32\Win...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_CreateService.ps1
Sample_xService_CreateService.ps1
Configuration Sample_xService_CreateService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String] ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xDscWebService.ps1
Sample_xDscWebService.ps1
# DSC configuration for Pull Server and Compliance Server # Prerequisite: Certificate "CN=PSDSCPullServerCert" in "CERT:\LocalMachine\MY\" store # Note: A Certificate may be generated using MakeCert.exe: http://msdn.microsoft.com/en-us/library/windows/desktop/aa386968%28v=vs.85%29.aspx configuration Sample_xDscWeb...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_WithCredential.ps1
Sample_xWindowsProcess_WithCredential.ps1
Configuration Sample_xWindowsProcess_WithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Notepad.exe" ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressMultipleDirs.ps1
Sample_xArchive_CompressMultipleDirs.ps1
Configuration Sample_xArchive_CompressMultipleDirs { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_ExpandArchive.ps1
Sample_xArchive_ExpandArchive.ps1
Configuration Sample_xArchive_ExpandArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false)]...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xPSSessionConfiguration.ps1
Sample_xPSSessionConfiguration.ps1
configuration Sample_xPSEndpoint_NewWithDefaults { param ( [Parameter(Mandatory)] [String]$Name ) Import-DscResource -module xPSDesiredStateConfiguration xPSEndpoint PSSessionConfiguration { Name = $Name Ensure = 'Present' } } configuration...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressArchive.ps1
Test_Sample_xArchive_CompressArchive.ps1
$zipFilePath = "$pwd\Target.zip" del "$pwd\Sample-1.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-2.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-3.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/Examples/Sample_xFileUpload.ps1
Sample_xFileUpload.ps1
Configuration FileUploadConfiguration { param ( [parameter(Mandatory = $true)] [String] $destinationPath, [parameter(Mandatory = $true)] [String] $sourcePath, [PSCredential] $credential, [String] $certificateThumbprint ) Import-DscResource -modulename xPSDesiredStateConfiguration node localhost { ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1
New-PSSessionConfigurationResource.ps1
ipmo xDSCResourceDesigner $resProperties = @{ Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' ` -Name Name -Type String -Attribute Key RunAsCred = New-xDscResourceProperty -Description 'Credential for Running under d...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1
GenerateXRemoteFileSchema.ps1
$DestinationPath = New-xDscResourceProperty -Name DestinationPath -Type String -Attribute Key -Description 'Path under which downloaded or copied file should be accessible after operation.' $Uri = New-xDscResourceProperty -Name Uri -Type String -Attribute Required -Description 'Uri of a file which should be copied or ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xPowerShellExecutionPolicy/Examples/SetPowerShellExecutionPolicy.ps1
SetPowerShellExecutionPolicy.ps1
#--------------------------------------------------------------------------------- #The sample scripts are not supported under any Microsoft standard support #program or service. The sample scripts are provided AS IS without warranty #of any kind. Microsoft further disclaims all implied warranties including, #wit...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/cWebAdministration/DSCResources/cIisModule/cIisModuleDesigner.ps1
cIisModuleDesigner.ps1
$diff = join-Path ${env:ProgramFiles(x86)} "Beyond compare 2\bc2.exe" $friendlyName = "xIisModule" $resourceName = "MSFT_$friendlyName" $classVersion = "1.0.0" $scriptRoot = Split-Path $MyInvocation.MyCommand.Path $originalModuleRoot = join-Path $scriptroot "..\.." $originalModuleRootPath = Resolve-Path $origin...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xWebAdministration/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1
xIisModuleDesigner.ps1
$diff = join-Path ${env:ProgramFiles(x86)} "Beyond compare 2\bc2.exe" $friendlyName = "xIisModule" $resourceName = "MSFT_$friendlyName" $classVersion = "1.0.0" $scriptRoot = Split-Path $MyInvocation.MyCommand.Path $originalModuleRoot = join-Path $scriptroot "..\.." $originalModuleRootPath = Resolve-Path $origin...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xWebAdministration/Examples/Sample_xWebsite_NewWebsiteFromConfigurationData.ps1
Sample_xWebsite_NewWebsiteFromConfigurationData.ps1
Configuration Sample_xWebsite_FromConfigurationData { # Import the module that defines custom resources Import-DscResource -Module xWebAdministration # Dynamically find the applicable nodes from configuration data Node $AllNodes.where{$_.Role -eq "Web"}.NodeName { # Install the IIS ...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xWebAdministration/Examples/Sample_xWebsite_NewWebsite.ps1
Sample_xWebsite_NewWebsite.ps1
configuration Sample_xWebsite_NewWebsite { param ( # Target nodes to apply the configuration [string[]]$NodeName = 'localhost', # Name of the website to create [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$WebSiteName, # Source P...
PowerShellCorpus/Github/absmart_PowerShell/DSC/Resources/xWebAdministration/Examples/Sample_xWebsite_RemoveDefault.ps1
Sample_xWebsite_RemoveDefault.ps1
configuration Sample_xWebsite_StopDefault { param ( # Target nodes to apply the configuration [string[]]$NodeName = 'localhost' ) # Import the module that defines custom resources Import-DscResource -Module xWebAdministration Node $NodeName { # Install ...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-DirectorySize.ps1
Get-DirectorySize.ps1
param ( [string[]] $computers, [string] $folder, [string] $out = [string]::empty ) $sb = { param( [string] $root ) Get-ChildItem $root | Where { $_.PsIsContainer -eq $false } | Measure-Object -Sum -Property Length | Select-Object @{N="Computer";E={$ENV:ComputerName}}...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Collect-Logs.ps1
Collect-Logs.ps1
#region Functions Function New-LogCollectionInfo() { $LogCollectionInfo = New-Object System.Object $LogCollectionInfo | Add-Member -MemberType NoteProperty -Name SetupLogs -Value $false $LogCollectionInfo | Add-Member -MemberType NoteProperty -Name PSCLogs -Value $false $LogCollectionInf...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-DirectoryStatistics.ps1
Get-DirectoryStatistics.ps1
param ( [string] $directory ) if ( -not ( Test-Path $directory ) ) { Write-Host $directory " does not exist" return } $DirectoryStatistics = @() Get-ChildItem -Recurse $directory | Where-Object { $_.GetType().Name -eq "DirectoryInfo" } | % { $LargeFiles = $nul $FullName = $_.FullName Write-Pr...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-FileShares.ps1
Get-FileShares.ps1
param( $ComputerName ) foreach($Computer in $ComputerName){ Get-WmiObject -Class Win32_Share -ComputerName $Computer | Export-CSV .\$Computer-ShareReport.csv -NoTypeInformation -Append }
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-FolderInheritance.ps1
Get-FolderInheritance.ps1
param( $Path ) $directoryChildItems = (Get-ChildItem -Path $Path -Recurse -Directory) $results = @() foreach($directory in $directoryChildItems) { #$inheritance = ($directory | Get-Acl).Access | Where-Object {$_.InheritanceFlags -eq $false} $acls = (Get-Acl -Path $directory.FullName).Access ...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-InactiveComputers.ps1
Get-InactiveComputers.ps1
param( $DaysInactive = 90, $Path = ".\inactiveComputerReport.csv" ) Import-Module -Name ActiveDirectory $Time = (Get-Date).AddDays(-($DaysInactive)) # Get all AD computers with lastLogonTimestamp less than our time Get-ADComputer -Filter {LastLogonTimeStamp -lt $Time} -Properties LastLogonTimeStam...
PowerShellCorpus/Github/absmart_PowerShell/Audit/Get-ComputerDetail.ps1
Get-ComputerDetail.ps1
function Get-ComputerDetail { param( $ComputerName = $env:COMPUTERNAME ) foreach($Computer in $ComputerName) { $Audit = New-Object System.Object $ComputerSystem = Get-WmiObject Win32_ComputerSystem -ComputerName $Computer $OS = Get-WmiObject Win32_OperatingSystem -ComputerName $Com...
PowerShellCorpus/Github/absmart_PowerShell/Clustering/TroubleShootClusterStorageSpaces.ps1
TroubleShootClusterStorageSpaces.ps1
$user = $env:USERNAME # Get the ID and security principal of the current user account $myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent(); $myWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($myWindowsID); # Get the security principal for the administrator role $adm...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Azure_Functions.ps1
Azure_Functions.ps1
Import-Module (Join-Path $env:POWERSHELL_HOME "\Azure\Azure_Variables.psm1") function Select-AzureRmVSTSSubscription { Get-AzureRmSubscription -SubscriptionName "Visual Studio Enterprise" | Select-AzureRmSubscription | Out-Null Get-AzureRmContext } New-Alias -Name vstsselect -Value Select-AzureRmVSTSSubs...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Setup-DemoDomainController.ps1
Setup-DemoDomainController.ps1
# # Windows PowerShell script for AD DS Deployment # Import-Module ServerManager Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools Import-Module ADDSDeployment Install-ADDSForest ` -CreateDnsDelegation:$false ` -DatabasePath "C:\Windows\NTDS" ` -DomainMode "Win2012R2" ` ...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Set-AzureRmResourceGroupLock.ps1
Set-AzureRmResourceGroupLock.ps1
param( $resourceGroup = (Get-AzureRmResourceGroup).ResourceGroupName ) foreach($rg in $resourceGroup){ New-AzureRmResourceLock -ResourceGroupName $rg -LockName CannotDelete -LockLevel CanNotDelete -Verbose -Force }
PowerShellCorpus/Github/absmart_PowerShell/Azure/ConfigureCertName.ps1
ConfigureCertName.ps1
################################################################################################################################# # Name : Configure-WinRM.ps1 # # ...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Start-AzureVirtualNetworkGatewayDiagnostics.ps1
Start-AzureVirtualNetworkGatewayDiagnostics.ps1
param( $ResourceGroupName, $StorageAccountName, $Location, [PsCredential] $Credential = (Get-Credential) ) Import-Module (Join-Path $env:POWERSHELL_HOME "Azure\Azure_Functions.psm1") # Select Azure Subscription $subscriptionId = ( Get-AzureRmSubscription | Out-GridView ` -...
PowerShellCorpus/Github/absmart_PowerShell/Azure/New-AzureCertificateLoginByTenantId.ps1
New-AzureCertificateLoginByTenantId.ps1
param( $Name, $ExportPassphrase, $TenantId = (Get-AzureRmContext).Tenant.TenantId ) # Login to Azure PowerShell and Login-AzureRmAccount Import-Module AzureRM.Resources # Create the self signed cert $CertificateName = $Name $thumbprint = (New-SelfSignedCertificate -CertStoreLocation Cert:\Loca...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Get-DtuCounters.ps1
Get-DtuCounters.ps1
[CmdletBinding()] param ( [String] $DatabaseName = $null, $SampleInterval = 1, $MaxSamples = 3600, $ExportPath = "C:\sql-perfmon-log.csv" ) $ErrorActionPreference = "Stop" $VerbosePreference = "Continue" cls if($DatabaseName -eq $null){ $DatabaseName = "_Total"; Write-Output "Collectin...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Create-AzureRmVM.ps1
Create-AzureRmVM.ps1
param( $vmName = "SERVER01", $vmSize = "Standard_A2", $rgName = "dc-rg", $asName = "dc-as", $vnetName = "vnet", $subnetName = "dc-subnet", $storageAccountName = "companydc01", $vnetRgName = "vnet-rg", [ValidateSet("Dynamic","Static")]$publicIpAllocation = "Dynamic", $Cr...
PowerShellCorpus/Github/absmart_PowerShell/Azure/Create-AzureSPN.ps1
Create-AzureSPN.ps1
param ( [Parameter(Mandatory=$true, HelpMessage="Enter Azure Subscription name. You need to be Subscription Admin to execute the script")] [string] $subscriptionName, [Parameter(Mandatory=$true, HelpMessage="Provide a password for SPN application that you would create")] [string] $password, ...
PowerShellCorpus/Github/absmart_PowerShell/Azure/WebApp/New-WebApp.ps1
New-WebApp.ps1
# https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/ $WebAppName = "fAzureWebAppTest" $WebAppResourceGroupName = "WebApp" $AzureNetworkResourceGroupName = "AzureNetwork" $Location = "northcentralus" # Create resource groups for the webapp and network to peer to $rgWebApp = N...
PowerShellCorpus/Github/absmart_PowerShell/Azure/WebApp/Swap-WebAppSlot.ps1
Swap-WebAppSlot.ps1
param( $WebAppName = "AzureWebAppTest", $SourceSlot = "Staging", $TargetSlot = "production", $ResourceGroupName = "WebApp", [ValidateSet("Swap","Revert","Apply")] $SwapType ) switch ($SwapType) { "Apply" # not working { # Initiate multi-phase swap and apply target slot configuration to so...
PowerShellCorpus/Github/absmart_PowerShell/Azure/WebApp/New-AzureNetwork.ps1
New-AzureNetwork.ps1
# https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-create-site-to-site-rm-powershell/ param( $ResourceGroupName = "AzureNetwork", $Location = "northcentralus" ) $VirtualNetworkName = "AzureNetwork" $subnet1 = New-AzureRmVirtualNetworkSubnetConfig -Name 'vm-priv-01' -AddressPrefix...
PowerShellCorpus/Github/absmart_PowerShell/Azure/azure-site-recovery/Setup-AzureSiteRecovery.ps1
Setup-AzureSiteRecovery.ps1
param( $UserName = "", $Password = "", $AzureSubscriptionName = "", $VaultName = "ASR-Vault-01", $VaultLocation = "Central US", $OutputPathForSettingsFile = "C:\", $StorageAccountName = "ASR-StorageAccount-01", $StorageAccountLocation = "Central US" ) # ASR Setup #Invoke-W...
PowerShellCorpus/Github/absmart_PowerShell/Azure/azure-site-recovery/Verify-ASRConnectivity.ps1
Verify-ASRConnectivity.ps1
$AzureASRSites = @( "hypervrecoverymanager.windowsazure.com" "accesscontrol.windows.net", "backup.windowsazure.com", "blob.core.windows.net", "store.core.windows.net", "http://cdn.mysql.com/archives/mysql-5.5/mysql-5.5.37-win32.msi", "http://www.msftncsi.com/ncsi.txt" ) foreach($Site in $AzureASRSites) { ...
PowerShellCorpus/Github/absmart_PowerShell/Azure/azure-site-recovery/Setup-ASRProxyServiceAgent.ps1
Setup-ASRProxyServiceAgent.ps1
param( $PortNumb = 9443, # Or the proxy port defined during installation $Domain, # The domain used to authenticate with the proxy $UserName, # The user on the domain to authenticate with the proxy $ProxyUserPassword, # UserName's password $ProxyServerURL # URL of the proxy server ) $pwd = ...
PowerShellCorpus/Github/absmart_PowerShell/Azure/azure-site-recovery/Setup-ASRManagementServer.ps1
Setup-ASRManagementServer.ps1
param( [ValidateSet("CS","PS")]$ServerMode, $InstallPath = "$env:SystemDrive\Program Files (x86)\Microsoft Azure Site Recovery", $MySQLCredFilePath, $VaultCredFilePath, [ValidateSet("VMware","NonVMware")] $EnvType, $ProcessServerIPAddress, $ConfigurationServerIPAddress, $Passphra...
PowerShellCorpus/Github/absmart_PowerShell/Azure/automation/AutoShutdownSchedule.ps1
AutoShutdownSchedule.ps1
<# .SYNOPSIS This Azure Automation runbook automates the scheduled shutdown and startup of virtual machines in an Azure subscription. .DESCRIPTION The runbook implements a solution for scheduled power management of Azure virtual machines in combination with tags on virtual machin...
PowerShellCorpus/Github/absmart_PowerShell/Azure/automation/Stop-AzureRmVMs.ps1
Stop-AzureRmVMs.ps1
<# .SYNOPSIS Connects to Azure and starts of all VMs in the specified Azure subscription or resource group .DESCRIPTION This runbook connects to Azure and starts all VMs in an Azure subscription or resource group. You can attach a schedule to this runbook to run it at a specific time. Note that this runb...
PowerShellCorpus/Github/absmart_PowerShell/Azure/automation/Start-AzureRmVMs.ps1
Start-AzureRmVMs.ps1
<# .SYNOPSIS Connects to Azure and starts of all VMs in the specified Azure subscription or resource group .DESCRIPTION This runbook connects to Azure and starts all VMs in an Azure subscription or resource group. You can attach a schedule to this runbook to run it at a specific time. Note that this runb...
PowerShellCorpus/Github/absmart_PowerShell/LogParse/LogParse_ToSQL.ps1
LogParse_ToSQL.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $ConfigFile ) $Config = [xml] ( Get-Content $ConfigFile ) function Get-IISFileName { param( [string] $LogFormat, [ValidateSet("Daily","Monthly")] $Range = "Daily" ) Switch ($Range){ "Daily...
PowerShellCorpus/Github/absmart_PowerShell/LogParse/LogParse_ToSQL_Local.ps1
LogParse_ToSQL_Local.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $ConfigFile ) $Config = [xml] ( Get-Content $ConfigFile ) function Get-IISFileName { param( [string] $LogFormat, [ValidateSet("Daily","Monthly")] $Range = "Daily" ) Switch ($Range){ "Daily...
PowerShellCorpus/Github/absmart_PowerShell/SharePoint/Get-SPCrawlStatus.ps1
Get-SPCrawlStatus.ps1
param( $ComputerName ) $sources = Invoke-Command -ComputerName $ComputerName -ScriptBlock { Add-PSSnapin Microsoft.SharePoint.PowerShell $searchApp = Get-SPServiceApplication | Where-Object {$_.DisplayName -eq "Search Service Application"} if($searchApp -eq $null){ $searchApp = Get...
PowerShellCorpus/Github/absmart_PowerShell/SharePoint/Get-SPTimerStatus.ps1
Get-SPTimerStatus.ps1
param( $JobName, $ComputerName ) foreach($job in $jobName){ $status = Invoke-Command -ComputerName $ComputerName -ArgumentList $JobName -ScriptBlock { param( $JobName ) Add-PSSnapin Microsoft.SharePoint.PowerShell $return = (Get-SPTimerJob -Ide...
PowerShellCorpus/Github/absmart_PowerShell/IIS/Recycle-AppPoolGracefully.ps1
Recycle-AppPoolGracefully.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param ( [Parameter(Mandatory=$true)] [string] $server, [string] $log ) . (Join-Path $ENV:POWERSHELL_HOME "Libraries\SharePoint_Functions.ps1") . (Join-Path $ENV:POWERSHELL_HOME "Libraries\General_Functions.psm1") . (Join-Path $ENV:POWERSHELL_HOME "Libr...
PowerShellCorpus/Github/absmart_PowerShell/IIS/Set-IISProcotols.ps1
Set-IISProcotols.ps1
# Disable insecure RC4 ciphers foreach($KeyName in @( "RC4 128/128" "RC4 40/128" "RC4 56/128" ) ) { reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\$KeyName /f reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers...
PowerShellCorpus/Github/absmart_PowerShell/IIS/Get-IISCurrentConnections.ps1
Get-IISCurrentConnections.ps1
# IIS - Get Current Connections [CmdletBinding(SupportsShouldProcess=$true)] param ( [Parameter(Mandatory=$true)] [string[]] $computers, [int] $samples = 10, [ValidateSet("realtime", "csv", "chart")] [string] $operation = "realtime" ) . (Join-Path $ENV:SCRIPTS_HOME "Libraries\SharePoint_Functions.ps1") ....
PowerShellCorpus/Github/absmart_PowerShell/IIS/Get-IISLongRunningRequests.ps1
Get-IISLongRunningRequests.ps1
# IIS - Get long running requests param ( [Alias("ComputerName")] [string[]] $servers, [int] $duration = "10000", [string] $appPool ) . (Join-Path $ENV:SCRIPTS_HOME "Libraries\SharePoint_Functions.ps1") . (Join-Path $ENV:SCRIPTS_HOME "Libraries\Standard_Functions.ps1") $sb = { param( [...
PowerShellCorpus/Github/absmart_PowerShell/Profile/Setup-PSClient.ps1
Setup-PSClient.ps1
param( $PowerShellPath, $DscPath, $EnableCredSSPClient = "*", $ExecutionPolicy = "Unrestricted" ) if($PowerShellPath){ try{ [Environment]::SetEnvironmentVariable("POWERSHELL_HOME", $PowerShellPath, "Machine") | Out-Null } catch{ $ErrorMsg = $_.Exception.Message ...
PowerShellCorpus/Github/absmart_PowerShell/Profile/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
<# .SYNOPSIS This is a PowerShell profile used to import many different modules (custom, for specific apps and more!) automatically when PowerShell is started. Place this file in "%USERPROFILE%\Documents\windowsPowerShell" to have it run on PowerShell startup. Don't forget to have the POWERSHELL_HOME folder copied...
PowerShellCorpus/Github/absmart_PowerShell/O365/ConvertString-ToByteBase64.ps1
ConvertString-ToByteBase64.ps1
$enc = [system.Text.Encoding]::UTF8 $string1 = "DEF456" $data1 = $enc.GetBytes($string1) # Create a New SHA1 Crypto Provider $sha = New-Object System.Security.Cryptography.SHA1CryptoServiceProvider # Now hash and display results $result1 = $sha.ComputeHash($data1) [System.Convert]::ToBase64String($resul...
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/Get-RDPSession.ps1
Get-RDPSession.ps1
param( $Username = $env:USERNAME, $ComputerName = "localhost" ) foreach($Computer in $ComputerName){ $Query = $null $Result = $null $Query = qwinsta /server:$Computer | foreach { (($_.trim() -replace "\s+",","))} | ConvertFrom-Csv $Q = $Query | where {$_.USERNAME -match $Username} ...
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/Install-NETFrameworkX64.ps1
Install-NETFrameworkX64.ps1
param( [string] $Computers, $SourcePath ) Invoke-Command -ComputerName $Computers -Authentication Credssp -Credential $env:USERDOMAIN\$env:USERNAME -ScriptBlock{ $DestinationPath = "C:\TempNETFramework" Copy-Item -Path $SourcePath -Destination $DestinationPath -Force -Rec...
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/Install-PowerShell4.ps1
Install-PowerShell4.ps1
param( [string] $Computers, $SourcePath ) Invoke-Command -ComputerName $Computers -Authentication Credssp -Credential $env:USERDOMAIN\$env:USERNAME -ScriptBlock{ $DestinationPath = "C:\MSU" Copy-Item -Path $SourcePath -Destination $DestinationPath -Force -Recurse Start-Process...
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/Get-SPUserForSite.ps1
Get-SPUserForSite.ps1
$CentralAdminServer = "ServerName" $Credentials = Get-Credential -UserName "$env:USERDOMAIN\$env:USERNAME" $User = "US12345" $Web = "http://team.gt.com/sites/ApplicationOperations/applicationsupport" Invoke-Command -ComputerName $CentralAdminServer -Authentication Credssp -Credential $Credentials -ArgumentList ...
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/EnableRDP-AndNewName.ps1
EnableRDP-AndNewName.ps1
param( $NewComputerName ) Get-NetFirewallRule -DisplayGroup "Remote Desktop*" | Enable-NetFirewallRule Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0 Rename-Computer -NewName $ComputerName Restart-Computer
PowerShellCorpus/Github/absmart_PowerShell/MiscScripts/Remove-PowerShell4.ps1
Remove-PowerShell4.ps1
param( [string] $Computers, $SourcePath ) Invoke-Command -ComputerName $Computers -Authentication Credssp -Credential $env:USERDOMAIN\$env:USERNAME -ScriptBlock{ $DestinationPath = "C:\MSU" Copy-Item -Path $SourcePath -Destination $DestinationPath -Force -Recurse Start...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Check-XenAppServerAvailability.ps1
Check-XenAppServerAvailability.ps1
param( $SmtpTo, $SmtpFrom, $SmtpServer ) Import-Module (Join-Path $env:POWERSHELL_HOME "\Libraries\Sharepoint_Functions.ps1") Import-Module (Join-Path $env:POWERSHELL_HOME "\Libraries\General_Variables.psm1") $XAServer = $citrix_environment.Farm01.DATA_COLLECTOR $SharePointUrl = $deployment_trac...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Create-XAApplication.ps1
Create-XAApplication.ps1
<# .SYNOPSIS This function is used to assist with creating applications in a 7.x Citrix farm in a consistent and easier method than the GUI. .EXAMPLE .\Create-XAApplication.ps1 -ApplicationName "Notepad" -DesktopGroup "XenApp Servers" -ServerName XaServer -WorkingDirectory C:\windows\system32\ -CommandLineEx...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Trending-XADiskSpace.ps1
Trending-XADiskSpace.ps1
Import-Module (Join-Path $env:POWERSHELL_HOME "Libraries\General_Functions.psm1") Import-Module (Join-Path $env:POWERSHELL_HOME "Libraries\General_Variables.psm1") Import-Module (Join-Path $env:POWERSHELL_HOME "Libraries\SharePoint_Functions.ps1") Import-Module (Join-Path $env:POWERSHELL_HOME "Citrix\Citrix_Function...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Check-XenAppServerRemoteLogins.ps1
Check-XenAppServerRemoteLogins.ps1
param( $SmtpTo, $SmtpFrom, $SmtpServer ) Import-Module (Join-Path $env:POWERSHELL_HOME "\Libraries\Sharepoint_Functions.ps1") Import-Module (Join-Path $env:POWERSHELL_HOME "\Libraries\General_Variables.psm1") $XAServer = $citrix_environment.Farm01.DATA_COLLECTOR $SharePointUrl = $deployment_trac...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Citrix_Functions.ps1
Citrix_Functions.ps1
Import-Module -Name (Join-PATH $env:POWERSHELL_HOME "Citrix\Modules\PvsPSSnapin.dll") Import-Module -Name (Join-PATH $env:POWERSHELL_HOME "Citrix\Modules\Citrix.Common.Commands.Data.dll") Import-Module -Name (Join-PATH $env:POWERSHELL_HOME "Citrix\Modules\Citrix.Common.Commands.dll") Import-Module -Name (Join-PATH $...
PowerShellCorpus/Github/absmart_PowerShell/Citrix/Trending-XAServerLoad.ps1
Trending-XAServerLoad.ps1
<# .SYNOPSIS This script was developed to provide a way to schedule a job (in this example every 5min) to get the server load values as calculated by the XenApp platform. These logs were used to understand and better provide information on the frequency and usage on multiple systems in 6.x and 7.x farms. #> ...