Access Exchange shared folder via powershell - powershell

I need to access a public Exchange folder from my machine using PowerShell. I've found a guide saying that Get-PublicFolder is what I need, but I get this error:
The term 'Get-PublicFolder' is not recognized as a cmdlet, function, operable program, or script file. Verify the term
and try again.
Another guide suggests to add the exchange management snapin before calling it
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
but again i get no luck as it is not installed on my PC. So, what's the easiest way to cccess a public Exchange folder via PowerShell? Thanks

If your machine and the Exchange server have PowerShell v2 remoting enabled then you can create a remote session to the server and work as if you were locally on the Exchange box. Otherwise, you need to install the Exchange admin tools on your machine.

Related

PSSnapin Microsoft.Sharepoint.Powershell is not installed on this computer

When I try to run the command Add-PSSnapin Microsoft.SharePoint.Powershell in SharePoint Online Management Shell
I get the following error:
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.Powershell` is not installed on this computer
+ CategoryInfo: InvalidArgument: (Microsoft.SharePoint.Powershell:string) [Add-PSSnapin], PSArgumentException
From what I understand this is supposed to come installed with SharePoint Online Management Shell anyway (this is a fresh download) so why won't it let me install it
I can login to Sharepoint using the $AdminURL, $AdminName & $Password so it's not the end of the world (and proves that this should work), but obviously makes the script less easy to run across sites as it has to be modified everytime to change the url and adminname
EDIT: I read on another post that adding this module (not snapin) would fix my issue of the error Get-SPSite is not recognized as the name of a cmdlet, function, script file, or operable program and Get-SPWebApplication is not recognized as the name of a cmdlet, function, script file, or operable program However, this did not fix my problem...
As mentioned by user #kuzimoto the commands I was using were not compatible with SharePoint Online and were designed to be used in conjunction with SharePoint Server.
The correct way to connect is using the command Connect-SPOService and passing through the credentials through there or just have them hard coded into your script.

Azure Powershell - Add-AzureVirtualIP cmdlet not found

I need to add another VIP for my Azure cloud service using Powershell for Azure, since there is no way to do it via the web console. In the past I was able to do it by using the Add-AzureVirtualIP command.
However, that command seems to no longer be found since MS switched everything to Azure Resource Manager mode. How can I use this command again, or is there another way to add a VIP to my cloud service?
Add-AzureVirtualIP : The term 'Add-AzureVirtualIP' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
According to your error code, it seems the Azure PowerShell is not loaded correctly. we can install Azure PowerShell with this command:
Install-Module -Name Azure
More information about Azure PowerShell, please refer to the link.

'Set-AdfsGlobalWebContent' is not recognized as the name of a cmdlet

I am trying to change company name using 'Set-AdfsGlobalWebContent' of powershell 4.0 .
I am using power-shell ISE but I am not able to get this command.
I am working on windows server 2012 R2
Anybody explain me Why that command is not showing in intelligence? is I am missing something?
after executing this command forcefully it gives "'Set-AdfsGlobalWebContent' is not recognized as the name of a cmdlet" error.
Thanks in Advance !!!
From technet:
To use these cmdlets you must have previously installed the AD FS server role. This can be done using the Add Roles and Features Wizard in Server Manager or optionally, you can use the Install-WindowsFeature AD-Federation-Services cmdlet at a Windows PowerShell prompt to add the role.

Load Azure PowerShell Cmdlets onto Remote VM

I am using PowerShell to automate the creation of a virtual machine in Azure, then using Remote PowerShell to run commands on that machine. I can run any PowerShell command that ships with Windows perfectly well, but when I try to run something like:
Set-AzureSubscription or Get-AzureStorageBlobContent
I get the following message:
The term 'Set-AzureSubscription' is not recognized as the name of a cmdlet, function, script file, or operable program.
Of course, because the Azure module is not preloaded on the VM in Azure. Is it possible to copy the Azure Module up to the VM using PowerShell? Or any other way to go about this assuming everything must be automated with PowerShell (so I can't log into the VM to run the Azure PowerShell installer or copy and paste over a remote desktop session)?
Did use the Azure Powershell? If not you can install it here:
http://azure.microsoft.com/en-gb/documentation/articles/install-configure-powershell/
This is because you don't have Azure module installed
Try this to check:
Get-AzureModule Azure
You shoud get the module here:
http://azure.microsoft.com/en-us/downloads/#cmd-line-Tools

Running a Powershell script on multiple PCs

I have modified a script to standardise our organisations signatures in Outlook. The script uses a Word document as a template for the signature and extracts user details from the Active Directory info on our SBS 2003 server.
I am logged in as a Domain Admin and the script works ok for my Outlook signature (there are a couple of errors but it creates the 3x outlook signature files that I need). I can't get it to run on any other computer (but this is the only one with Powershell installed) nor will it run for any other user on this computer.
I would really like to be able to run the script from each workstation. This would be easy if it was a batch file, but it won't work as a powershell script. Do I need to install Powershell on every workstation or is there a simpler way to get it to work?
Also,
I wonder if there is a problem with the script that is not allowing other users to run it from this computer (even with Powershell installed).
Cheers,
Greg
Yes, you need Powershell installed on every machine where you want the script to run. It's included with OS on everything from Server 2008 and Windows 7, but otherwise you'll need to install Powershell manually.
You will also have to enable remote scripting on each machine, since this is disabled by default (for security reasons). Take a look at the following help pages for information and instructions on how to set up:
Get-Help about_remote
Get-Help about_remote_FAQ
Get-Help about_remote_requirements
Get-Help about_remote_troubleshooting
If you want to use PowerShell remotely you will need to install it. If you don't want to do that you could look at psexec - that's one of Sys Internals great tools. It will enable you to run commands\scripts remotely.
I have a different suggestion. Could you generate these signature files for your employees on your machine and then push the signatures out to all the other machines?