Tag Archives: powershell

New-MailboxExportRequest error on NetApp share. Workaround.

When I tried using New-MailboxExportRequest to export a mailbox to a .pst file I kept getting this error: New-MailboxExportRequest -FilePath “\\server.domain.com\mailboxexport$\billy.pst” -MailBox “billy” The server or share name specified in the path may be invalid, or the file could be … Continue reading

Posted in Exchange, Powershell, Uncategorized, Windows Server | Tagged , , , , , , , , | Leave a comment

Configure NIC Teaming with PowerShell (Server Core)

This is how to configure NIC teaming with powershell on a server running Windows Server 2012 R2 Server Core. Basic NIC team Run the following command to list what network adapters (NICs) are available: Get-NetAdapter -Physical In my case the server … Continue reading

Posted in Powershell, Windows Server | Tagged , , , , , , , , , , , , , , | Leave a comment

Use Powershell to check if Windows Update patch is installed

Here is a powershell function to check if a windows update patch is installed or not. It will return $True if it is installed and $False if it is not installed. function Check-IsPatchInstalled { #Øyvind Nilsen, oyvindnilsen.com PARAM ( [Parameter(Mandatory=$false,ValueFromPipeline=$false)][String]$computer … Continue reading

Posted in Scripting | Tagged , , , , , , , , , , , , | 1 Comment

Powershell function to check if Active Directory users exists

Here is a little powershell function I made to see check if specific active directory users exists or not. #POWERSHELL function userExists ([string]$name){ #written by: Øyvind Nilsen (oyvindnilsen.com) [bool]$ret = $false #return variable $domainRoot = [ADSI]” $dirSearcher = New-Object System.DirectoryServices.DirectorySearcher($domainRoot) … Continue reading

Posted in Scripting | Tagged , , , , , , , , , | Leave a comment

One line in powershell to check if remote port is open

Here is an easy way to use powershell to see if a remote machine is listening on a specific port. If the command finishes without returning anything the remote machine is listening on the port. If the commands times out … Continue reading

Posted in Scripting | Tagged , , , , , , , , , , , | Leave a comment