Powershell ISE
Right click on "PowerShell ISE" then run as administrator.
August 9th, 2015 10:55pm

Right click on "PowerShell ISE" then run as administrator.
Free Windows Admin Tool Kit Click here and download it now
August 9th, 2015 10:55pm

Right click on "PowerShell ISE" then run as administrator.
August 9th, 2015 10:55pm

guys,

when using the following simple code in ISE

New-SmbShare -name setup -path C:\setup

i get an acces denied.

New-SmbShare : Access is denied. 
At line:1 char:1
+ New-SmbShare -name setup -path C:\setup
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (MSFT_SMBShare:ROOT/Microsoft/Windows/SMB/MSFT_SMBShare) [New-SmbShare], CimException
    + FullyQualifiedErrorId : Windows System Error 5,New-SmbShare

i am a local admin and uac is disabled.

anyone with the golden sollution?

thanks in advance.

Free Windows Admin Tool Kit Click here and download it now
August 10th, 2015 7:45am

many thanks for the reply, that doesnt sound logical to me. Uac is disabled and  am the local admin.

Whats different when running "as administrator" ?

August 10th, 2015 11:17am

I believe this huge thread will help you to understand reality of UAC https://social.technet.microsoft.com/forums/windows/en-US/60d3a7af-cd21-4ea4-ac97-ebfab2aa6ed4/apps-not-allowed-when-uac-is-disabled
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2015 1:17pm

Right click on "PowerShell ISE" then run as administrator.
August 10th, 2015 7:08pm

runnins as admin still gives me the following error:

WARNING: Oupps, you need to run this script from an elevated PowerShell prompt!
Please start the PowerShell prompt as an Administrator and re-run the script.
WARNING: Aborting script

tried powershell x32, powershell ise and powershell x32 ise

Free Windows Admin Tool Kit Click here and download it now
August 12th, 2015 10:40am

You were not running powershell as admin.  Did your powershell windows say "administrator"?

August 12th, 2015 11:49am

nope, it doesn't. noticed that running as administrator doesn't work.

i created a shortcut and enabled the 'run as admin' option and now it works.

thanks for the help.

Free Windows Admin Tool Kit Click here and download it now
August 12th, 2015 11:54am

Thanks for letting us know & happy to help.  Good luck
August 12th, 2015 12:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics