MicrosoftnPowerShell Management Cmdlets
Microsoft.PowerShell.Management Cmdlets
Add-Computer
Add the local computer to a domain or workgroup.
Add-Content
Adds content to the specified items, such as adding words to a file.
Checkpoint-Computer
Creates a system restore point on the local computer.
Clear-Content
Deletes the contents of an item, but does not delete the item.
Clear-EventLog
Clears all entries from specified event logs on the local or remote computers.
Clear-Item
Clears the contents of an item, but does not delete the item.
Clear-ItemProperty
Clears the value of a property but does not delete the property.
Clear-RecycleBin
Complete-Transaction
Commits the active transaction.
Convert-Path
Converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
Copy-Item
Copies an item from one location to another.
Copy-ItemProperty
Copies a property and value from a specified location to another location.
Debug-Process
Debugs one or more processes running on the local computer.
Disable-ComputerRestore
Disables the System Restore feature on the specified file system drive.
Enable-ComputerRestore
Enables the System Restore feature on the specified file system drive.
Get-ChildItem
Gets the items and child items in one or more specified locations.
Get-Clipboard
Gets the current Windows clipboard entry.
Get-ComputerInfo
Gets a consolidated object of system and operating system properties.
Get-ComputerRestorePoint
Gets the restore points on the local computer.
Get-Content
Gets the content of the item at the specified location.
Get-ControlPanelItem
Gets control panel items.
Get-EventLog
Gets the events in an event log, or a list of the event logs, on the local or remote computers.
Get-HotFix
Gets the hotfixes that have been applied to the local and remote computers.
Get-Item
Gets the item at the specified location.
Get-ItemProperty
Gets the properties of a specified item.
Get-ItemPropertyValue
Gets the value for one or more properties of a specified item.
Get-Location
Gets information about the current working location or a location stack.
Get-Process
Gets the processes that are running on the local computer or a remote computer.
Get-PSDrive
Gets drives in the current session.
Get-PSProvider
Gets information about the specified Windows PowerShell provider.
Get-Service
Gets the services on a local or remote computer.
Get-TimeZone
Gets the current time zone or a list of available time zones.
Get-Transaction
Gets the current (active) transaction.
Get-WmiObject
Gets instances of WMI classes or information about the available classes.
Invoke-Item
Performs the default action on the specified item.
Invoke-WmiMethod
Calls WMI methods.
Join-Path
Combines a path and a child path into a single path.
Limit-EventLog
Sets the event log properties that limit the size of the event log and the age of its entries.
Move-Item
Moves an item from one location to another.
Move-ItemProperty
Moves a property from one location to another.
New-EventLog
Creates a new event log and a new event source on a local or remote computer.
New-Item
Creates a new item.
New-ItemProperty
Creates a new property for an item and sets its value.
New-PSDrive
Creates temporary and persistent mapped network drives.
New-Service
Creates a new Windows service.
New-WebServiceProxy
Creates a Web service proxy object that lets you use and manage the Web service in Windows PowerShell.
Pop-Location
Changes the current location to the location most recently pushed onto the stack.
Push-Location
Adds the current location to the top of a location stack.
Register-WmiEvent
Subscribes to a Windows Management Instrumentation (WMI) event.
Remove-Computer
Removes the local computer from its domain.
Remove-EventLog
Deletes an event log or unregisters an event source.
Remove-Item
Deletes the specified items.
Remove-ItemProperty
Deletes the property and its value from an item.
Remove-PSDrive
Deletes temporary Windows PowerShell drives and disconnects mapped network drives.
Remove-WmiObject
Deletes an instance of an existing Windows Management Instrumentation (WMI) class.
Rename-Computer
Renames a computer.
Rename-Item
Renames an item in a Windows PowerShell provider namespace.
Rename-ItemProperty
Renames a property of an item.
Reset-ComputerMachinePassword
Resets the machine account password for the computer.
Resolve-Path
Resolves the wildcard characters in a path, and displays the path contents.
Restart-Computer
Restarts ("reboots") the operating system on local and remote computers.
Restart-Service
Stops and then starts one or more services.
Restore-Computer
Starts a system restore on the local computer.
Resume-Service
Resumes one or more suspended (paused) services.
Set-Clipboard
Sets the current Windows clipboard entry.
Set-Content
Writes or replaces the content in an item with new content.
Set-Item
Changes the value of an item to the value specified in the command.
Set-ItemProperty
Creates or changes the value of a property of an item.
Set-Location
Sets the current working location to a specified location.
Set-Service
Starts, stops, and suspends a service, and changes its properties.
Set-TimeZone
Sets the system time zone to a specified time zone.
Set-WmiInstance
Creates or updates an instance of an existing Windows Management Instrumentation (WMI) class.
Show-ControlPanelItem
Opens control panel items.
Show-EventLog
Displays the event logs of the local or a remote computer in Event Viewer.
Split-Path
Returns the specified part of a path.
Start-Process
Starts one or more processes on the local computer.
Start-Service
Starts one or more stopped services.
Start-Transaction
Starts a transaction.
Stop-Computer
Stops (shuts down) local and remote computers.
Stop-Process
Stops one or more running processes.
Stop-Service
Stops one or more running services.
Suspend-Service
Suspends (pauses) one or more running services.
Test-ComputerSecureChannel
Tests and repairs the secure channel between the local computer and its domain.
Test-Connection
Sends ICMP echo request packets ("pings") to one or more computers.
Test-Path
Determines whether all elements of a path exist.
Undo-Transaction
Rolls back the active transaction.
Use-Transaction
Adds the script block to the active transaction.
Wait-Process
Waits for the processes to be stopped before accepting more input.
Write-EventLog
Writes an event to an event log.
Repair print spooler - printing problem
When you print a document, you may receive an error Which will no printing capabilities.
The printer will be available printing process does not start.
One of these problems is to stop the print spooler.
The easiest way to repair to restart the computer after the restart the spooler service prices should start again.
If not, we can not restart the computer to restart, we can proce single.
The first single way START Process
How we do it.
Turn snap Services
Click Start -> Run -> service.msc OR press Win + R and type in services.msc
The process of searching for the name of the Print Spooler and click on it with the right button start the run.
If the problem does not repair the printer Cause can be locked print folder
We can check if the printout is not in this folder by typing the path:
Start -> Run -> %systemroot%\system32\spool\Printers
The second way repair services from the Command Line
We do as follows:
Win + R and In the run enter cmd.
In Black box enter:
Buffer net stop
Stop Process Print
Buffer net start
START Process Print
We can also type net stop "Print Spooler"
To quickly delete the documents in the Printers folder, type the following command
Del /F /S C:\WINDOWS\system32\spool\Printers\*.*
The /F - Force deleting read-only files
Parameter /S - Erases files from all the subfolders
Even you can add paramter /P thanks to him not not have to confirm the deletion of the file.
The third way if the problem occurs often you can write a script .bat That run will do for us Dating Steps. Stop the print spooler, deletes the files in the folder PRINTERS and restart the print spooler.
@echo off
echo Repair spooler
stop buffer Net
echo Deleting documents in the print queue - Confirm the deletion by pressing Y
del /F /S "%systemroot% \system32\spool\PRINTERS\*. *"
net start spooler
echo Completed repair Printers
pause
The above list is written to make the file name sachets dowalną NP. naprawa_drukarki oo rozszerzreniem .bat
Run the file by clicking the mouse on it and selecting Run as administrator!
Google Translate for Business:Translator ToolkitWebsite TranslatorGlobal Market Finder
About Google TranslateCommunityMobile
About GooglePrivacy & TermsHelpSend feedback
How to disable printer redirection on Windows Server 2008 print server
How to disable printer redirection on Windows Server 2008 print server
You may notice that when RDP’ing into the Print Server, you are having print drivers being installed that were installed on the client (workstation or laptop).
This could be due to the RDP (RDS/TS) printer redirection being enabled.
GPO or GPEdit.msc (Local policy)
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Printer Redirection > Do not allow client printer redirection
or via the registry key:
HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
fDisableCpm set to 1
Users can also control printer redirection settings through the Remote Desktop Connection (RDC) client, or when starting a connection to a RemoteApp program.
-
Start the Remote Desktop Connection client.
-
Click Options.
-
On the Local Resources tab, under Local devices and resources, select or clear the Printers check box.
Available policy setting in GPO
| Explanation | ||
|---|---|---|
|
Do not allow client printer redirection |
This policy setting allows you to specify whether to prevent the mapping of client printers in Terminal Services sessions. You can use this policy setting to prevent users from redirecting print jobs from the remote computer to a printer attached to their local (client) computer. By default, Terminal Services allows this client printer mapping. If you enable this policy setting, users cannot redirect print jobs from the remote computer to a local client printer in Terminal Services sessions. If you disable this policy setting, users can redirect print jobs with client printer mapping. If you do not configure this policy setting, client printer mapping is not specified at the Group Policy level. However, an administrator can still disable client printer mapping by using the Terminal Services Configuration tool. |
|
|
Do not set default client printer to be default printer in a session |
This policy setting allows you to specify whether the client default printer is automatically set as the default printer in a Terminal Services session. By default, Terminal Services automatically designates the client default printer as the default printer in a Terminal Services session. You can use this policy setting to override this behavior. If you enable this policy setting, the default printer is the printer specified on the remote computer. If you disable this policy setting, the terminal server automatically maps the client default printer and sets it as the default printer upon connection. If you do not configure this policy setting, the default printer is not specified at the Group Policy level. However, an administrator can configure the default printer for client sessions by using the Terminal Services Configuration tool. |
|
|
Redirect only the default client printer |
This policy setting allows you to specify whether the default client printer is the only printer redirected in Terminal Services sessions. If you enable this policy setting, only the default client printer is redirected in Terminal Services sessions. If you disable or do not configure this policy setting, all client printers are redirected in Terminal Services sessions. |
|
|
Specify terminal server fallback printer driver behavior |
This policy setting allows you to specify the terminal server fallback printer driver behavior. By default, the terminal server fallback printer driver is disabled. If the terminal server does not have a printer driver that matches the client's printer, no printer will be available for the terminal server session. If you enable this policy setting, the fallback printer driver is enabled, and the default behavior is for the terminal server to find a suitable printer driver. If one is not found, the client's printer is not available. You can choose to change this default behavior. The available options are: Do nothing if one is not found If there is a printer driver mismatch, the server will attempt to find a suitable driver. If one is not found, the client's printer is not available. This is the default behavior. Default to PCL if one is not found If no suitable printer driver can be found, default to the Printer Control Language (PCL) fallback printer driver. Default to PS if one is not found If no suitable printer driver can be found, default to the PostScript (PS) fallback printer driver. Show both PCL and PS if one is not found If no suitable driver can be found, show both PS and PCL-based fallback printer drivers. If you disable this policy setting, the terminal server fallback driver is disabled and the terminal server will not attempt to use the fallback printer driver. If you do not configure this policy setting, the fallback printer driver behavior is off by default. |
|
|
Use Terminal Services Easy Print printer driver first |
This policy setting allows you to specify whether the Terminal Services Easy Print printer driver is used first to install all client printers. If you enable or do not configure this policy setting, the terminal server first tries to use the Terminal Services Easy Print printer driver to install all client printers. If for any reason the Terminal Services Easy Print printer driver cannot be used, a printer driver on the terminal server that matches the client printer is used. If the terminal server does not have a printer driver that matches the client printer, the client printer is not available for the Terminal Services session. If you disable this policy setting, the terminal server tries to find a suitable printer driver to install the client printer. If the terminal server does not have a printer driver that matches the client printer, the server tries to use the Terminal Services Easy Print printer driver to install the client printer. If for any reason the Terminal Services Easy Print printer driver cannot be used, the client printer is not available for the Terminal Services session. |
|
Powershell - Delete File
Use Powershell to Delete File
Using PowerShell commnads to delete a file
# Using PowerShell commnads to delete a file
Remove-Item -Path "C:\test\TestFile.txt"
You can also use wildcard '*' characters to remove multiple items.
For example, this command removes all the files in C:\test:with .txt extension.
# Using PowerShell commnads to delete all file with .txt extension
Remove-Item -Path "C:\test\*.txt"
Here also you can use -Force command to delete all files from directory -Force
# Using PowerShell commnads to delete all file force fully
Remove-Item -Path "C:\test\*.*" -Force
Here also you can use -Force command to delete all files and folders -recurse
# Using PowerShell commnads to delete all file and folders
Remove-Item -Path "C:\test\*.*" -recurse





