Fwd: [scripting] Re: powershell script to pull the machine last rebooted information from active directory

2016-12-02 Thread It's Mike Mitchell
- Original Message - Some powershell fragments…   Machine On line?  test-connection $computername -erroraction silentlyContinue -count 1   Last reboot… $LastBoot=[System.Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject win32_operatingsystem -ComputerName $com

Re: [scripting] RE: powershell trimstart?

2016-10-04 Thread It's Mike Mitchell
$addr = '0-24.254.16.172.in-addr.arpa' -split '\.',2 Then $addr[1] contains the meat. On Oct 4, 2016, at 12:05 PM, Chris Muster wrote: TrimStart() removes characters from the start of a string, so when you pass ‘0-24.’, you’re actually telling it to remove the characters ‘0’, ‘-‘, ‘2’, ‘4’,

RE: [scripting] MDT scripting / command line issue

2014-10-20 Thread it's mike
Can you run the msiexec from a command prompt? I'm not an msiexec giant, but as written (and ignoring 'smart' quotes using only the straight ones) - assuming it's running from C:\temp, the msiexec command line would expanded as (for the 32 bit one): msiexec /i "C:\temp\SSEP_12.1.4013.4013_

RE: [scripting] Is this possible?

2014-01-23 Thread it's mike
The last person to touch the file isn't normally recorded. You'll need to turn file auditing on (now there's a can of worms!) From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Heaton, Joseph@Wildlife Sent: Thursday, January 23, 2014 8:41 am To: 'scripting

RE: [scripting] Simple KIX Question

2013-11-25 Thread it's mike
There is a KIX function called "SPLIT" which will let you parse the IP address into its 4 octet components. $mysubnetList = Split ($myaddress,".") The second octet would be $mysubnetList[1] (array indexes start at 0). From: listsad...@lists.myitforum.com [mailto:listsad...@li

RE: [scripting] Simple KIX Question

2013-11-25 Thread it's mike
Substr.. Substring traditionally takes a start and length parameter and extracts the portion of a string. If the ip address is 192.168.x.x, then the substr grabs the 2nd octet. The starting position is a char position (the first char is at position 1. in .NET the first char is at position 0).

RE: [scripting] Temporary Local Admin rights

2013-10-18 Thread it's mike
We've had to do this, but the time window was measured in hours - admin access required for the afternoon to allow installation of some software or something like that. We had to rely on obfuscation - eg bury the sched task deep inside the scheduled tasks tree under an unlikely name. Still, a