Jump to content

Can someone suggest an alternative to this powershell as I'm having security issues?


Recommended Posts

Posted

I have this rather fabulous script which launches a page for users which is different depending on their ip address...

 

function getipthirdoctet {
ipconfig | where-object {$_ –match “IPv4 Address”} | foreach-object{$_.Split(“.")[-2]} 
}
$ipaddress = getipthirdoctet

if ($ipaddress.length -eq 1)
   {
   $ipaddress ='0'+$ipaddress 
   }



C:\Progra~1\Intern~1\iexplore.exe  -k "http://intranet/?i=$ipaddress"

 

However I am having serious problems with powershell security so i am seeing if any edugeekers can suggest an alternative to powershell that might do the same thing.

 

Can anyone help? :confused:

Posted

It's frustrating because originally I had a half working batch file which would have been the easiest solution.

 

I have group policy set to allow powershell but it still seems to fail when running.

 

I'm not at my usual PC at the moment so I'll report back shortly!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...