How to keep the shell window open after running a PowerShell script??

I have a very short PowerShell script that connects to a server and imports the AD module. I'd like to run the scrip...

Creating Zip files using PowerShell?

I have these below files at a location C:\Desktop\Mobile. Apple_iphone6.dat Apple_iphone7.dat Samsung_e...

PowerShell Create Folder on Remote Server?

The following script does not add a folder to my remote server. Instead it places the folder on My machine! Why do...

How do I concatenate two text files in PowerShell??

I am trying to replicate the functionality of the cat command in Unix. I would like to avoid solutions where I expl...

Powershell argument passing to function seemingly not working?

I sense that I am doing something silly, but here is the issue: Function getPropertyOfFile($a, $b, $c) { $a.Get...

How to get all groups that a user is a member of??

PowerShell's Get-ADGroupMember cmdlet returns members of a specific group. Is there a cmdlet or property to get all ...

Import-Module : The specified module 'activedirectory' was not loaded because no valid module file was found in any module directory?

I am having trouble doing an import-module ActiveDirectory on a Server 2008 SP2 (64 bit). NET Framework 3.5 SP1 is...

Extract the filename from a path?

I want to extract filename from below path: D:\Server\User\CUST\MEA\Data\In\Files\CORRECTED\CUST_MEAFile.csv Now I...

Copy file remotely with PowerShell?

I am writing a PowerShell script that I want to run from Server A. I want to connect to Server B and copy a file to ...

GetType used in PowerShell, difference between variables?

What is the difference between variables $a and $b? $a = (Get-Date).DayOfWeek $b = Get-Date | Select-Object DayOfWe...

powershell - extract file name and extension?

I need to extract file name and extension from e.g. my.file.xlsx. I don't know the name of file or extension and the...

Stop Powershell from exiting?

I know that there is that little -noexit switch for PowerShell. Is there anyway of staying in the shell without usi...