Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Reply To: Little scripting help

This is the guideline I must follow.

View Article


Reply To: Little scripting help

I got a friend to help me out. Thanks.

View Article


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 Article

Reply 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 Article

Changing 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 Article


Image may be NSFW.
Clik here to view.

Doubt 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 Article

Reply 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 Article

Reply To: Changing TCP to dynamic using PowerShell

Possibly because you have a spelling error its $_.IPenabled not $_.IPenable

View Article


Attempting 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 Article


Reply 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 Article

Reply 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 Article

Reply To: Changing TCP to dynamic using PowerShell

looks like another typo its 'SetDNSServerSearchOrder' not 'SetDNSServerSearchObject'

View Article

Reply To: Changing TCP to dynamic using PowerShell

oh soz misread your message – ignore that

View Article


Reply 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 Article

Image may be NSFW.
Clik here to view.

Reply 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 Article


Image may be NSFW.
Clik here to view.

Reply 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 Article

Reply 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 Article


Reply 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 Article

Copy 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 Article

Reply 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
Browsing all 13067 articles
Browse latest View live