Reply To: Remote Logoff inactive user profiles
I would typically configure RDP to end disconnected sessions after a fixed amount of time like 30 minutes. This is also settable via GPO http://technet.microsoft.com/en-us/library/cc754272.aspx
View ArticleReply To: Adding error capturing to script
oh i see, i did wonder why some would take the try / catch block and others would not. Ah yes that's true regarding ping. Probably not worth the added complication in that case.
View ArticleChanging TCP to dynamic using PowerShell
That's my code and I'm having difficulties making it work. It does not change my adapter settings. #DHCP Function To Enable DCHP On The Local Computer...
View ArticleDoubt on handling non-terminating error
Hi, I've been reading "The big book of PowerShell error handling" since Don Jones indicated it to me. On page 9, the author says: "A value of SilentlyContinue only adds the error to the $Error...
View ArticleReply To: Changing TCP to dynamic using PowerShell
Part of a bigger code– Function Main { $Host.UI.RawUI.Backgroundcolor = "Black" $Host.UI.RawUI.ForegroundColor = "Green" } Main #MenuHelper Function To Create A Box...
View ArticleReply To: Changing TCP to dynamic using PowerShell
Possibly because you have a spelling error its $_.IPenabled not $_.IPenable
View ArticleAttempting to Run Application on Remote Machine
I'm writing a PowerShell script that takes a series of remote computer names and runs a custom malware scan on a targeted subdirectory on each computer. I have successfully used psexec to accomplish...
View ArticleReply To: Changing TCP to dynamic using PowerShell
Tried that and this error message comes. Attachments:You must be logged in to view attached files.
View ArticleReply To: Changing TCP to dynamic using PowerShell
Looking back I also found one more error - $_.SetDNSServersearchobject()} suppose to be SetDNSServerSearchOrder() But still not working
View ArticleReply To: Changing TCP to dynamic using PowerShell
looks like another typo its 'SetDNSServerSearchOrder' not 'SetDNSServerSearchObject'
View ArticleReply To: Changing TCP to dynamic using PowerShell
oh soz misread your message – ignore that
View ArticleReply To: Remote Logoff inactive user profiles
Great, check out the function Get-SBRDPSession in the SBTools module at http://gallery.technet.microsoft.com/scriptcenter/SBTools-module-adds-38992422 .Synopsis Function to get RDP sessions on one or...
View ArticleReply To: Changing TCP to dynamic using PowerShell
Function Set-DHCP { $Adapt = Get-WMIObject Win32_NetworkAdapterConfiguration -filter "IPenabled = 'True'" ; $Adapt.EnableDHCP(); $Adapt.SetDNSServerSearchOrder(); Write-Host "Rebooting Now in 10...
View ArticleReply To: Changing TCP to dynamic using PowerShell
Function Set-DHCP { $Adapt = Get-WMIObject Win32_NetworkAdapterConfiguration -filter "IPenabled = 'True'" ; $Adapt.EnableDHCP(); $Adapt.SetDNSServerSearchOrder(); Write-Host "Rebooting Now in 10...
View ArticleReply To: Changing TCP to dynamic using PowerShell
You could save it as a module which is a psm1 file. Check your module locations: $env:PSModulePath -split ";" I tend to put it in C:\Program Files\WindowsPowerShell\Modules\**Your Function Name** then...
View ArticleReply To: Changing TCP to dynamic using PowerShell
In fact you wouldn't even have to load the module you would just type DHCP into Powershell. Really it should be verb-noun so Set-DHCP something like that and then it will run.
View ArticleCopy Folder and add Registry Key/Value
I am Trying to copy a folder from a UNC path to a remote PC and add registry Key and value on that remote PC also. The Registry piece seems to work but the file copy dose not. Any ideas? Thanks...
View ArticleReply To: Changing TCP to dynamic using PowerShell
when i save it as psm1 file all i get is a blank notepad Also, I need to make a shortcut on desktop that will execute when double clicked
View Article